agentleFS
ag2aiag2ai/ag2-skills/skills/ag2-overview/SKILL.md

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

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
  1. Very specific:

    Read this first when a request mentions AG2 / ag2 or building agents with it and you don't yet know which feature is needed.

    line 15
  2. Very specific:

    When two or more *registered* agents collaborate through a shared Hub, load ag2-network-quickstart first (hub setup, consulting 1Q1R and …

    line 63

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Install the provider extra — pip install "ag2[openai]", ag2[anthropic], ag2[gemini], … Without it the *Config raises ImportError: ... 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.
  2. Set the API key — OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY (or GOOGLE_API_KEY). from dotenv import load_dotenv; load_dotenv() is the common pattern.
  3. 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

OldUse insteadSkill
OpenAIConfig(...) (Chat Completions)OpenAIResponsesConfig (default), or OpenAICompletionsConfig (Chat Completions / OpenAI-compatible base_url=)ag2-quickstart
AnthropicConfig(temperature=/top_p=/top_k=)omit sampling paramsag2-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 toolsag2-subagent-delegation
agent.task(...)Task(owner_id=..., spec=TaskSpec(...)) from ag2.task, or ask(..., capability=)ag2-network-governance

Pick the right skill

User intentSkillKey APIs
Build an Agent, pick a model, multi-turnag2-quickstartAgent, OpenAIResponsesConfig, AnthropicConfig, GeminiConfig, ask() / reply.ask(), reply.body
Custom Python tool, DI, shared stateag2-add-custom-tool@tool, Inject, Depends, Variable, Scope/ScopedValue, reply.context.variables
Shipped tools; consume an MCP serverag2-use-builtin-toolsWebSearchTool, WebFetchTool, CodeExecutionTool, MCPServerTool, MCPToolkit, FilesystemToolkit, search toolkits, SkillsTool
Run shell commands / codeag2-shell-toolSandboxShellTool + LocalEnvironment/Docker, ShellTool, AnthropicBashTool, SandboxCodeTool
Typed Pydantic / dataclass outputag2-structured-outputresponse_schema=, reply.content(), PromptedSchema, retries
Images / audio / video / PDFs inag2-multimodal-inputImageInput, DocumentInput, BinaryInput, FilesAPI
Coordinator + worker agents, parallel fan-outag2-subagent-delegationAgent.as_tool(), subagent tools, TaskStarted/ChildEvent, shared concurrency cap
Human input / tool approvalag2-hitlcontext.input(), hitl_hook, approval_required(), ToolApprovalRequest
Logging, retry, interception, context assemblyag2-middlewareBaseMiddleware (pass the class), Middleware(Cls, **kw), RetryMiddleware, AssemblerMiddleware, statusbar_middleware
Unit-test agents without API callsag2-testingTestConfig, TrackingConfig, ToolCallEvent(arguments=...)
Offline evaluation, CI gateag2-evaluationSuite, run_agent, scorers, agent_judge, diff() (needs ag2[tracing])
Compare models / promptsag2-eval-comparisonrun_variants, run_pairwise, pairwise_judge, human_pairwise
Memory across runs, history caps, compactionag2-knowledge-and-memoryKnowledgePlugin, SqliteKnowledgeStore/DiskKnowledgeStore, WorkingMemoryPolicy, SlidingWindowPolicy, SummarizeCompact
Token / loop monitoring, alerts, haltsag2-observers-and-alertsBaseObserver, TokenMonitor, LoopDetector, AlertPolicy + HaltCheckMiddleware (only FATAL halts)
OpenTelemetry traces / metricsag2-telemetryTelemetryMiddleware, GenAI semconv
Web frontend (AG-UI 1.0 / CopilotKit)ag2-ag-uiAGUIStream, read_run_input, event types
Serve an agent over MCPag2-mcpMCPServer, @mcp_tool, Elicit/Sample, MCPApp
A2A protocol (serve / consume)ag2-a2aA2AServer, A2AConfig, AgentCard, card signing
ACP — drive coding agents / serve to editorsag2-acpACPConfig, ACPAgent, ACPRemoteConfig
Realtime voice, STT, TTSag2-liveLiveAgent, 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 intentSkill
N-party round-robin discussionag2-network-discussion
Declarative orchestration, TransitionGraph, GroupChat migrationag2-network-workflow
Rate limits, access rules, expectations, audit, task observationag2-network-governance
Network tools (delegate/peers/…), custom handlers, views, envelopesag2-network-tools-and-views

Not a network task: one coordinator calling worker agents as tools → ag2-subagent-delegation (no hub, no channels).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.