Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ag2ai/ag2-skills --skill ag2-overviewgit clone --depth 1 https://github.com/ag2ai/ag2-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ag2ai/ag2-skills/ag2-overview)<a href="https://agentmods.dev/skills/ag2ai/ag2-skills/ag2-overview"><img src="https://agentmods.dev/badge/skills/ag2ai/ag2-skills/ag2-overview/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ag2ai/ag2-skills/ag2-overview"><img src="https://agentmods.dev/badge/skills/ag2ai/ag2-skills/ag2-overview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00082 | $0.01913 |
| Opus 5 | $0.00041 | $0.00957 |
| Sonnet 5 | $0.00016 | $0.00383 |
| Haiku 4.5 | $0.00008 | $0.00191 |
Grade A, and why
ag2-overview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AG2 — capability map
AG2 (ag2) is an async, protocol-driven agent framework. The full reference docs live under website/docs/user-guide/. This skill is the index of sibling skills that cover the common build paths.
When to use
Read this file first when a request mentions "AG2", "ag2", or building agents in this repo and you don't yet know which feature is needed. Use the table below to pick the right specialised skill, then load that skill's SKILL.md for the recipe.
Before you start
Anything you build with AG2 needs three things in place. Get these right once and the rest of the skills run cleanly:
- Install the right provider extra —
pip install "ag2[openai]",ag2[anthropic],ag2[gemini], etc. The*Configclass will raiseImportError: ... requires optional dependencieswithout it. Run the install before delivering code. If you cannot run commands, state the exactpip installcommand. This is a required step. - Set the matching API key —
OPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY(orGOOGLE_API_KEY). Loading from a project-root.envviafrom dotenv import load_dotenv; load_dotenv()is the common pattern. - Sanity-check the install —
python -c "import sys, ag2; from importlib.metadata import version; print(sys.executable, version('ag2'))". If you have multiple Python environments, this confirms whichag2your script will actually import.
Full per-provider table (install + env var + config class) lives in ag2-quickstart → "Prerequisites".
Pick the right skill
| User intent | Skill | What it covers |
|---|---|---|
Build an Agent from scratch, pick a model |
ag2-quickstart |
Agent, ModelConfig, ask() / reply.ask() chaining, providers, env vars |
| Give the Agent a custom Python tool | ag2-add-custom-tool |
@tool, sync/async, ToolResult, Context, Inject, Variable, Depends |
| Use shipped tools (web search, code exec, MCP, etc.) | ag2-use-builtin-tools |
WebSearchTool, WebFetchTool, CodeExecutionTool, MCPServerTool, ImageGenerationTool, MemoryTool, FilesystemToolkit, DuckDuckSearchTool, ExaToolkit, TavilySearchTool |
| Run shell commands from an agent | ag2-shell-tool |
SandboxShellTool + LocalEnvironment (any provider), provider-side ShellTool (OpenAI Responses), sandboxing (allowed/blocked/ignore/readonly) |
| Get typed Pydantic / dataclass output | ag2-structured-output |
response_schema=, ResponseSchema, @response_schema, PromptedSchema, reply.content(), retries |
| Multi-agent: parallel subtasks or named delegates | ag2-subagent-delegation |
tasks=TaskConfig(), run_subtasks(parallel=True), Agent.as_tool(), persistent_stream |
| Pause for human input or gate a tool with approval | ag2-hitl |
context.input(), hitl_hook, approval_required() middleware |
| Logging, retry, history-trim, custom interception | ag2-middleware |
BaseMiddleware, LoggingMiddleware, RetryMiddleware, HistoryLimiter, TokenLimiter, tool middleware |
| Test agents and tools | ag2-testing |
TestConfig, mocking LLM responses, simulating ToolCallEvent |
| Evaluate / benchmark an agent offline, CI gate, scorers | ag2-evaluation |
Suite, run_agent, final_answer_matches / tool_called / agent_judge, @scorer, RunResult, TestConfig, evaluate_traces, diff().regressions |
| Compare models / prompts — leaderboard or head-to-head | ag2-eval-comparison |
run_variants (Variants({name: Agent}, axis=...)), run_pairwise + pairwise_judge (win-rate, Wilson CI, flips, κ), human_pairwise |
| Persistent memory across runs, history compaction, assembly | ag2-knowledge-and-memory |
KnowledgeStore, KnowledgeConfig, WorkingMemoryAggregate, AssemblyPolicy, SlidingWindowPolicy, TokenBudgetPolicy, TailWindowCompact, SummarizeCompact |
| Observability, alerts, halts | ag2-observers-and-alerts |
BaseObserver, TokenMonitor, LoopDetector, EventWatch, CadenceWatch, AlertPolicy, HaltEvent |
| Send images / audio / video / PDFs in | ag2-multimodal-input |
ImageInput, AudioInput, VideoInput, DocumentInput, FilesAPI |
| Web frontend via the AG-UI protocol | ag2-ag-ui |
AGUIStream, FastAPI mount, CopilotKit |
| Serve an agent as an MCP server (server side) | ag2-mcp |
MCPServer, stdio / HTTP, prompts, resources, SessionConfig, AskContext |
| Expose an agent over the A2A protocol | ag2-a2a |
A2AServer, build_jsonrpc / build_rest / build_grpc, AgentCard, A2AConfig (consume remote) |
| Realtime voice / live audio (talking agent, STT, TTS) | ag2-live |
LiveAgent, GeminiRealTimeConfig / OpenAIRealTimeConfig, SoundDeviceRecorder / Player, OpenAITranscriber, TTSObserver |
| OpenTelemetry traces / metrics | ag2-telemetry |
TelemetryMiddleware, GenAI semconv attributes, content capture |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 61 lines · 82 tokens per session scan A 0b057154079d
ag2-overview is a skill published in the GitHub repository ag2ai/ag2-skills (10 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 82 tokens to every session and 1,913 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…