Agent skill

Ag2 Overview

by ag2ai in ag2ai/build-with-ag2

Map of AG2 beta capabilities and which sibling skill to reach for.

Apache-2.0Auto-check: notesAI & LLM Engineering

Install Ag2 Overview

skills CLI
$ npx skills add ag2ai/build-with-ag2 --skill ag2-overview -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ag2ai/build-with-ag2 ag2-overview --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ag2-overview .claude/skills/ag2-overview && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ag2-overview
GitHub stars
252
Token cost
~1.3k tokens
SKILL.md length
521 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

Map of AG2 beta capabilities and which sibling skill to reach for.

  • Works in 3 steps: Install the right provider extra — pip… → Set the matching API key —… → Sanity-check the install — python -c…
  • Mentions building with AG2 beta (autogen.beta) but the specific feature isnt yet clear — agents
  • SKILL.md covers When to use, Before you start, Pick the right skill and Project conventions for any…, plus 1 more section
  • Calls pip and python; needs OPENAI_API_KEY and ANTHROPIC_API_KEY

What it does

Ag2 Overview is an agent skill from ag2ai/build-with-ag2. Map of AG2 beta capabilities and which sibling skill to reach for. Load first when the user mentions building with AG2 beta (autogen.beta) but the specific feature isn't yet clear — agents, tools, model config, delegation, memory, observers, structured output, HITL, AG-UI, telemetry, or testing.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Building AI agents and Structured output and tool calling. It works with Python. The repository describes itself as: Sample code and application showcases to get you going with AG2 (formally AutoGen). The licence is Apache-2.0.

When your agent uses it

  • Mentions building with AG2 beta (autogen.beta) but the specific feature isnt yet clear — agents
  • Structured output

Example prompts

  • “/ag2-overview”

Requirements

  • Python 3
  • A credential in OPENAI_API_KEY
  • A credential in ANTHROPIC_API_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Install the right provider extra — pip install "ag2[openai]", ag2[anthropic], ag2[gemini], etc. The *Config class will raise ImportError…
  2. Set the matching API key — OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY (or GOOGLE_API_KEY). Loading from a project-root .env via…
  3. Sanity-check the install — python -c "import sys, autogen; print(sys.executable, autogen.version)". If you have multiple Python…

What it can do on your machine

Read from SKILL.md and the folder at commit 29eeac3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY
    • ANTHROPIC_API_KEY
    • GEMINI_API_KEY
    • GOOGLE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ag2 Overview loads about 1.3k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 521 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:20
    _API_KEY`). Loading from a project-root `.env` via `from dotenv import load_dotenv; load_dotenv()` is the common pattern

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ag2ai/build-with-ag2 at commit 29eeac3, republished under its Apache-2.0 licence (© ag2ai). 521 words, ~1,282 tokens.

Download SKILL.mdSave it as .claude/skills/ag2-overview/SKILL.md (or your agent's skills folder).
name
ag2-overview
description
Map of AG2 beta capabilities and which sibling skill to reach for. Load first when the user mentions building with AG2 beta (autogen.beta) but the specific feature isn't yet clear — agents, tools, model config, delegation, memory, observers, structured output, HITL, AG-UI, telemetry, or testing.
license
Apache-2.0

AG2 Beta — capability map

AG2 beta (autogen.beta) is an async, protocol-driven agent framework. The full reference docs live under website/docs/beta/. 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 beta", "autogen.beta", 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:

  1. Install the right provider extra — pip install "ag2[openai]", ag2[anthropic], ag2[gemini], etc. The *Config class will raise ImportError: ... requires optional dependencies without it.
  2. Set the matching API key — OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY (or GOOGLE_API_KEY). Loading from a project-root .env via from dotenv import load_dotenv; load_dotenv() is the common pattern.
  3. Sanity-check the install — python -c "import sys, autogen; print(sys.executable, autogen.__version__)". If you have multiple Python environments, this confirms which ag2 your script will actually import.

Full per-provider table (install + env var + config class) lives in ag2-quickstart → "Prerequisites".

Pick the right skill

User intentSkillWhat it covers
Build an Agent from scratch, pick a modelag2-quickstartAgent, ModelConfig, ask() / reply.ask() chaining, providers, env vars
Give the Agent a custom Python toolag2-add-custom-tool@tool, sync/async, ToolResult, Context, Inject, Variable, Depends
Use shipped tools (web search, code exec, MCP, etc.)ag2-use-builtin-toolsWebSearchTool, WebFetchTool, CodeExecutionTool, MCPServerTool, ImageGenerationTool, MemoryTool, FilesystemToolkit, DuckDuckSearchTool, ExaToolkit, TavilySearchTool
Run shell commands from an agentag2-shell-toolLocalShellTool (any provider), provider-side ShellTool, sandboxing (allowed/blocked/ignore/readonly)
Get typed Pydantic / dataclass outputag2-structured-outputresponse_schema=, ResponseSchema, @response_schema, PromptedSchema, reply.content(), retries
Multi-agent: parallel subtasks or named delegatesag2-subagent-delegationtasks=TaskConfig(), run_subtasks(parallel=True), Agent.as_tool(), persistent_stream
Pause for human input or gate a tool with approvalag2-hitlcontext.input(), hitl_hook, approval_required() middleware
Logging, retry, history-trim, custom interceptionag2-middlewareBaseMiddleware, LoggingMiddleware, RetryMiddleware, HistoryLimiter, TokenLimiter, tool middleware
Test agents and toolsag2-testingTestConfig, mocking LLM responses, simulating ToolCallEvent
Persistent memory across runs, history compaction, assemblyag2-knowledge-and-memoryKnowledgeStore, KnowledgeConfig, WorkingMemoryAggregate, AssemblyPolicy, SlidingWindowPolicy, TokenBudgetPolicy, TailWindowCompact, SummarizeCompact
Observability, alerts, haltsag2-observers-and-alertsBaseObserver, TokenMonitor, LoopDetector, EventWatch, CadenceWatch, AlertPolicy, HaltEvent
Send images / audio / video / PDFs inag2-multimodal-inputImageInput, AudioInput, VideoInput, DocumentInput, FilesAPI
Web frontend via the AG-UI protocolag2-ag-uiAGUIStream, FastAPI mount, CopilotKit
OpenTelemetry traces / metricsag2-telemetryTelemetryMiddleware, GenAI semconv attributes, content capture
Show full SKILL.md (130 more words)Show less

Project conventions for any skill that writes code into the AG2 repo

These are repo-wide rules from CLAUDE.md. Apply them whenever generating code that lands in autogen/beta/:

  • Do not use from __future__ import annotations.
  • All top-level imports — no function-level imports unless explicitly allowed.
  • No nested functions in runtime execution paths (decorator factories are fine).
  • No side effects in __init__ — apply them at runtime.
  • Internal filesystem paths use pathlib.Path; public signatures accept str | os.PathLike[str].
  • Common reusable APIs come from the autogen.beta top-level (e.g. from autogen.beta import Agent, tool, Context); advanced/specialised APIs come from sub-modules (autogen.beta.middleware, autogen.beta.config, etc.).

Beta-doc cross-reference

If a skill's recipe is incomplete for the case at hand, the source docs are at website/docs/beta/. Each sibling skill points to its primary .mdx files in its own "Going deeper" section.

© ag2ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/ag2-overview of ag2ai/build-with-ag2.

Open the folder on GitHubat commit 29eeac3

Compare with similar skills

Ag2 Overview next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ag2 Overview compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ag2 Overview this skillag2ai/build-with-ag2252—~1.3kAutomated safety check: NotesApache-2.0
Google Agents CLI Adk Codepifferologo/cloud-agents-cli1291 repos~768Automated safety check: PassApache-2.0
E2b Code Interpreteragent-sandbox/agent-sandbox218—~2.3kAutomated safety check: PassApache-2.0
Building Pydantic AI Agentsdocling-project/docling69k—~2.8kAutomated safety check: PassMIT
LangGraph Decision Modelslangchain-ai/langchain-skills1.3k—~2.3kAutomated safety check: PassMIT
Tool Designagentailor/fullstack-langgraph-nextjs-agent132—~3.2kAutomated safety check: PassMIT

Similar skills

  • Google Agents CLI Adk Code

    pifferologo/cloud-agents-cli

    This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management", or needs ADK (Agent…

    129 GitHub starsUsed in 1 repo~768 tokens
    AI & LLM EngineeringAuto-check passed
  • E2b Code Interpreter

    agent-sandbox/agent-sandbox

    Execute code in E2B sandboxes and integrate with LLMs for tool calling.

    218 GitHub stars~2.3k tokensUpdated 19 days ago
    AI & LLM EngineeringAuto-check passed
  • Building Pydantic AI Agents

    docling-project/docling

    Patterns and tested examples for building agents with Pydantic AI: tools, capabilities, structured output, dependency injection, hooks, YAML specs, streaming and testing.

    69k GitHub stars~2.8k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • LangGraph Decision Models

    langchain-ai/langchain-skills

    Official

    Routes LangGraph agents with typed decision models that return probabilities, and finds LLM calls that only exist to produce a routing decision.

    1.3k GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Tool Design

    agentailor/fullstack-langgraph-nextjs-agent

    Design and verify tools that AI agents can actually use — for any framework or language (MCP servers, LangChain/LangGraph, function-calling, raw JSON schema; TypeScript, Python, or otherwise).

    132 GitHub stars~3.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Official

    Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), structured output, streaming, testing, and multi-agent patterns.

    140 GitHub stars~5.4k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed

More from ag2ai/build-with-ag2

All 16 skills in this repo
  • Ag2 Add Custom Tool

    ag2ai/build-with-ag2

    Add a custom Python tool to an AG2 beta Agent using the @tool decorator.

    252 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Ag2 Middleware

    ag2ai/build-with-ag2

    Intercept the AG2 beta agent loop with BaseMiddleware — wrap full turns (onturn), each LLM call (onllmcall), each tool execution (ontoolexecution), or each human-input request (onhumaninput).

    252 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Ag2 Use Builtin Tools

    ag2ai/build-with-ag2

    Wire AG2 beta's shipped tools into an Agent — both provider-native server-side tools (web search, web fetch, code execution, MCP, image generation, memory) and locally-executed common toolkits…

    252 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Ag2 Knowledge And Memory

    ag2ai/build-with-ag2

    Persist agent state across runs, shape what the LLM sees per turn, and cap history to fit a context window.

    252 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Ag2 Observers And Alerts

    ag2ai/build-with-ag2

    Monitor an AG2 beta agent's stream — log events, detect repeated tool calls, track token spend, build trigger-driven observers, route observer alerts to the model, and halt on FATAL conditions.

    252 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Ag2 Quickstart

    ag2ai/build-with-ag2

    Build a minimal AG2 beta Agent end to end — pick a model provider, set a prompt, call agent.ask(), then continue the conversation with reply.ask() (multi-turn).

    252 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check: notes

Works with

Questions about Ag2 Overview

What does Ag2 Overview do?

Map of AG2 beta capabilities and which sibling skill to reach for. Ag2 Overview is an agent skill from ag2ai/build-with-ag2. Map of AG2 beta capabilities and which sibling skill to reach for.

When should I use Ag2 Overview?

Ag2 Overview fits situations like: mentions building with AG2 beta (autogen.beta) but the specific feature isnt yet clear — agents; structured output.

How do I install Ag2 Overview in Claude Code?

Run `npx skills add ag2ai/build-with-ag2 --skill ag2-overview -a claude-code`. Or copy the skill folder (.agents/skills/ag2-overview in ag2ai/build-with-ag2) into .claude/skills/ag2-overview in your project. Claude Code loads it when a task matches its description.

How do I install Ag2 Overview in Codex?

Run `npx skills add ag2ai/build-with-ag2 --skill ag2-overview -a codex`. Or copy the skill folder (.agents/skills/ag2-overview in ag2ai/build-with-ag2) into .agents/skills/ag2-overview in your project. Codex loads it when a task matches its description.

Can I use Ag2 Overview in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ag2ai/build-with-ag2 --skill ag2-overview -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ag2-overview, .gemini/skills/ag2-overview, .github/skills/ag2-overview and .opencode/skills/ag2-overview in your project.

What does Ag2 Overview need to run?

Going by SKILL.md and its folder, Ag2 Overview needs the command-line tools its instructions call (pip and python) and credentials named OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY and GOOGLE_API_KEY. Our summary lists: Python 3; A credential in OPENAI_API_KEY; A credential in ANTHROPIC_API_KEY.

Does Ag2 Overview access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ag2 Overview safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Ag2 Overview use?

Ag2 Overview is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ag2 Overview use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ag2 Overview?

Skills that share tags, products or a category with Ag2 Overview: Google Agents CLI Adk Code (pifferologo/cloud-agents-cli, 129 stars), E2b Code Interpreter (agent-sandbox/agent-sandbox, 218 stars), Building Pydantic AI Agents (docling-project/docling, 69k stars) and LangGraph Decision Models (langchain-ai/langchain-skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ag2 Overview?

ag2ai (a GitHub organization) maintains it in ag2ai/build-with-ag2, which has 252 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 6, 2026.

Source: ag2ai/build-with-ag2 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.