ag2-overview
Skill12 starsChanged 9 days agoApache-2.0View on GitHub
Map of AG2 (ag2 1.3) capabilities and which sibling skill to reach for. Load first when the user mentions building with AG2 (ag2) but the specific feature isn't yet clear — agents, model config, tools, MCP, delegation/subagents, memory and context assembly, middleware, observers, structured output, HITL approval, testing, evaluation, AG-UI, A2A, ACP, realtime voice, telemetry, or multi-agent networks. Also lists the 1.3 APIs that are deprecated and removed in 1.4.
- Reads credentials
- Installs packages
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- ag2ai/build-with-ag2edited, first seen Oct 9, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- ag2ai/build-with-ag2★ 25215% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ag2-a2aSkill
- ag2-acpSkill
- ag2-add-custom-toolSkill
- ag2-ag-uiSkill
- ag2-eval-comparisonSkill
- ag2-evaluationSkill
- ag2-hitlSkill
- ag2-knowledge-and-memorySkill
- ag2-liveSkill
- ag2-mcpSkill
- ag2-middlewareSkill
- ag2-multimodal-inputSkill
- ag2-network-discussionSkill
- ag2-network-governanceSkill
- ag2-network-quickstartSkill
- ag2-network-tools-and-viewsSkill
- ag2-network-workflowSkill
- ag2-observers-and-alertsSkill
- ag2-quickstartSkill
- ag2-shell-toolSkill
- ag2-structured-outputSkill
- ag2-subagent-delegationSkill
- ag2-telemetrySkill
- ag2-testingSkill
- ag2-use-builtin-toolsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Read this first when a request mentions AG2 / ag2 or building agents with it and you don't yet know which feature is needed.
- Very specific: line 63
When two or more *registered* agents collaborate through a shared Hub, load ag2-network-quickstart first (hub setup, consulting 1Q1R and …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AG2 — capability map
AG2 (ag2) is an async, protocol-driven agent framework. These skills target ag2 1.3. Full reference docs live under website/docs/user-guide/ in the ag2 repo. This skill is the index: pick the sibling skill below, then load its SKILL.md.
When to use
Read this first when a request mentions AG2 / ag2 or building agents with it and you don't yet know which feature is needed. Pick the sibling skill from the tables below, then load its SKILL.md.
Before you start
- Install the provider extra —
pip install "ag2[openai]",ag2[anthropic],ag2[gemini], … Without it the*ConfigraisesImportError: ... requires optional dependencies. Feature extras are separate (e.g.ag2[tracing]for evaluation/telemetry,ag2[ag-ui],ag2[a2a],ag2[redis]); each skill states its own. Run the install before delivering code, or state the exact command if you can't. - Set the API key —
OPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY(orGOOGLE_API_KEY).from dotenv import load_dotenv; load_dotenv()is the common pattern. - Check which ag2 you import —
python -c "import sys; from importlib.metadata import version; print(sys.executable, version('ag2'))".
Per-provider table (install + env var + config class) → ag2-quickstart.
Deprecated in 1.3, removed in 1.4 — don't write these
| Old | Use instead | Skill |
OpenAIConfig(...) (Chat Completions) | OpenAIResponsesConfig (default), or OpenAICompletionsConfig (Chat Completions / OpenAI-compatible base_url=) | ag2-quickstart |
AnthropicConfig(temperature=/top_p=/top_k=) | omit sampling params | ag2-quickstart |
Agent(knowledge=KnowledgeConfig(...)) | plugins=[KnowledgePlugin(store, ...)] | ag2-knowledge-and-memory |
Agent(assembly=[...]) | middleware=[Middleware(AssemblerMiddleware, policies=[...]), Middleware(HaltCheckMiddleware)] | ag2-middleware |
TaskConfig, Agent(tasks=...), run_subtask(s) | explicit workers: worker.as_tool(), subagent tools | ag2-subagent-delegation |
agent.task(...) | Task(owner_id=..., spec=TaskSpec(...)) from ag2.task, or ask(..., capability=) | ag2-network-governance |
Pick the right skill
| User intent | Skill | Key APIs |
Build an Agent, pick a model, multi-turn | ag2-quickstart | Agent, OpenAIResponsesConfig, AnthropicConfig, GeminiConfig, ask() / reply.ask(), reply.body |
| Custom Python tool, DI, shared state | ag2-add-custom-tool | @tool, Inject, Depends, Variable, Scope/ScopedValue, reply.context.variables |
| Shipped tools; consume an MCP server | ag2-use-builtin-tools | WebSearchTool, WebFetchTool, CodeExecutionTool, MCPServerTool, MCPToolkit, FilesystemToolkit, search toolkits, SkillsTool |
| Run shell commands / code | ag2-shell-tool | SandboxShellTool + LocalEnvironment/Docker, ShellTool, AnthropicBashTool, SandboxCodeTool |
| Typed Pydantic / dataclass output | ag2-structured-output | response_schema=, reply.content(), PromptedSchema, retries |
| Images / audio / video / PDFs in | ag2-multimodal-input | ImageInput, DocumentInput, BinaryInput, FilesAPI |
| Coordinator + worker agents, parallel fan-out | ag2-subagent-delegation | Agent.as_tool(), subagent tools, TaskStarted/ChildEvent, shared concurrency cap |
| Human input / tool approval | ag2-hitl | context.input(), hitl_hook, approval_required(), ToolApprovalRequest |
| Logging, retry, interception, context assembly | ag2-middleware | BaseMiddleware (pass the class), Middleware(Cls, **kw), RetryMiddleware, AssemblerMiddleware, statusbar_middleware |
| Unit-test agents without API calls | ag2-testing | TestConfig, TrackingConfig, ToolCallEvent(arguments=...) |
| Offline evaluation, CI gate | ag2-evaluation | Suite, run_agent, scorers, agent_judge, diff() (needs ag2[tracing]) |
| Compare models / prompts | ag2-eval-comparison | run_variants, run_pairwise, pairwise_judge, human_pairwise |
| Memory across runs, history caps, compaction | ag2-knowledge-and-memory | KnowledgePlugin, SqliteKnowledgeStore/DiskKnowledgeStore, WorkingMemoryPolicy, SlidingWindowPolicy, SummarizeCompact |
| Token / loop monitoring, alerts, halts | ag2-observers-and-alerts | BaseObserver, TokenMonitor, LoopDetector, AlertPolicy + HaltCheckMiddleware (only FATAL halts) |
| OpenTelemetry traces / metrics | ag2-telemetry | TelemetryMiddleware, GenAI semconv |
| Web frontend (AG-UI 1.0 / CopilotKit) | ag2-ag-ui | AGUIStream, read_run_input, event types |
| Serve an agent over MCP | ag2-mcp | MCPServer, @mcp_tool, Elicit/Sample, MCPApp |
| A2A protocol (serve / consume) | ag2-a2a | A2AServer, A2AConfig, AgentCard, card signing |
| ACP — drive coding agents / serve to editors | ag2-acp | ACPConfig, ACPAgent, ACPRemoteConfig |
| Realtime voice, STT, TTS | ag2-live | LiveAgent, CascadeConfig, realtime configs, transcribers, TTSObserver |
Multi-agent networks
When two or more registered agents collaborate through a shared Hub, load ag2-network-quickstart first (hub setup, consulting 1Q1R and conversation adapters, reading what was said). Then:
| User intent | Skill |
| N-party round-robin discussion | ag2-network-discussion |
Declarative orchestration, TransitionGraph, GroupChat migration | ag2-network-workflow |
| Rate limits, access rules, expectations, audit, task observation | ag2-network-governance |
Network tools (delegate/peers/…), custom handlers, views, envelopes | ag2-network-tools-and-views |
Not a network task: one coordinator calling worker agents as tools → ag2-subagent-delegation (no hub, no channels).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

