Docs Guide
fivetaku/gptaku-plugins-codex
Fetch and explain official documentation for any library, framework, API, or service using an llms.txt-first strategy — triggers on "How do I…", "What is…", "How does X work", "Best practice for…"…
Expose an AG2 beta Agent over the AG-UI protocol so a frontend (CopilotKit, custom React/Next.js, or any AG-UI client) can stream responses, render tool calls, sync shared state, and surface…
$ npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-ag-ui --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-ag-ui .claude/skills/ag2-ag-ui && rm -rf skills-srcUse ~/.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/
Install the "ag2-ag-ui" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-ag-ui into .claude/skills/ag2-ag-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-ag-ui", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-ag-uiType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-ag-ui --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/ag2-ag-ui .agents/skills/ag2-ag-ui && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ag2-ag-ui" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-ag-ui into .agents/skills/ag2-ag-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-ag-ui", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-ag-ui --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/ag2-ag-ui .cursor/skills/ag2-ag-ui && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ag2-ag-ui" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-ag-ui into .cursor/skills/ag2-ag-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-ag-ui", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ag2ai/build-with-ag2.git --path .agents/skills/ag2-ag-ui--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-ag-ui --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/ag2-ag-ui .gemini/skills/ag2-ag-ui && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ag2-ag-ui" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-ag-ui into .gemini/skills/ag2-ag-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-ag-ui", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ag2ai/build-with-ag2 ag2-ag-uiInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/ag2-ag-ui .github/skills/ag2-ag-ui && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ag2-ag-ui" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-ag-ui into .github/skills/ag2-ag-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-ag-ui", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ag2ai/build-with-ag2 ag2-ag-ui --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ag2ai/build-with-ag2.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/ag2-ag-ui .opencode/skills/ag2-ag-ui && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ag2-ag-ui" agent skill from https://github.com/ag2ai/build-with-ag2/tree/main/.agents/skills/ag2-ag-ui into .opencode/skills/ag2-ag-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ag2-ag-ui", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ag2-ag-uiExpose an AG2 beta Agent over the AG-UI protocol so a frontend (CopilotKit, custom React/Next.js, or any AG-UI client) can stream responses, render tool calls, sync shared state, and surface…
Ag2 Ag UI is an agent skill from ag2ai/build-with-ag2. Expose an AG2 beta Agent over the AG-UI protocol so a frontend (CopilotKit, custom React/Next.js, or any AG-UI client) can stream responses, render tool calls, sync shared state, and surface human-input checkpoints. Wraps the agent with AGUIStream(agent) and mounts it in FastAPI via stream.dispatch(...) or stream.buildasgi(). Use when the user wants a web frontend in front of an AG2 agent rather than a CLI / script.
Its SKILL.md is about 1.7k 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 Backend & APIs, covering Backend development. It works with Next.js, React and FastAPI. The repository describes itself as: Sample code and application showcases to get you going with AG2 (formally AutoGen). The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 29eeac3. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pipcurluvicornnpxFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
github.comAlso links to:
docs.ag-ui.comdojo.ag-ui.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ag2 Ag UI loads about 1.7k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 426 words of instructions outside code blocks.
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.
The automated check found no risky patterns in SKILL.md.
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.
The full file from ag2ai/build-with-ag2 at commit 29eeac3, republished under its Apache-2.0 licence (© ag2ai). 426 words, ~1,658 tokens.
.claude/skills/ag2-ag-ui/SKILL.md (or your agent's skills folder).For a custom narrow-purpose API where you own the contract end-to-end, skip AG-UI and write a plain endpoint instead.
| Feature | Status |
|---|---|
Streaming text events (TEXT_MESSAGE_*, TEXT_MESSAGE_CHUNK) | ✓ |
Backend tool lifecycle (TOOL_CALL_START / _ARGS / _RESULT / _END) | ✓ |
Frontend-tool dispatch (TOOL_CALL_CHUNK for client tools in RunAgentInput.tools) | ✓ |
Shared-state snapshots (STATE_SNAPSHOT) | ✓ |
| Human input checkpoints (surfaced as user-visible message events) | ✓ |
pip install "ag2[ag-ui]"from fastapi import FastAPI, Header
from fastapi.responses import StreamingResponse
from autogen.beta import Agent
from autogen.beta.ag_ui import AGUIStream, RunAgentInput
from autogen.beta.config import OpenAIConfig
agent = Agent(
name="support_bot",
prompt="You help users with billing questions.",
config=OpenAIConfig(model="gpt-4o-mini"),
)
stream = AGUIStream(agent)
app = FastAPI()
@app.post("/chat")
async def run_agent(message: RunAgentInput, accept: str | None = Header(None)) -> StreamingResponse:
return StreamingResponse(
stream.dispatch(message, accept=accept),
media_type=accept or "text/event-stream",
)uvicorn run_ag_ui:app --reload --port 8000Test:
curl -N -X POST http://127.0.0.1:8000/chat \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{"thread_id":"t1","run_id":"r1","messages":[{"id":"m1","role":"user","content":"Hello"}],"state":{},"context":[],"tools":[]}'build_asgi()If you don't need custom auth / middleware, mount the ASGI endpoint directly:
from autogen.beta.ag_ui import AGUIStream
from fastapi import FastAPI
app = FastAPI()
stream = AGUIStream(agent)
app.mount("/chat", stream.build_asgi())Two ways to start:
# Option A — CopilotKit bootstrap
npx copilotkit@latest create -f ag2
# Option B — clone the reference starter
# https://github.com/ag2ai/ag2-copilotkit-starterThe starter layout:
ag2-copilotkit-starter/
├── agent-py/ # Python backend (AG2 + AG-UI)
└── ui-react/ # React + CopilotKit frontendBackend serves /chat on port 8008 by default. The Next.js route at ui-react/app/api/copilotkit/route.ts bridges the UI to the backend:
import { HttpAgent } from "@ag-ui/client";
import { CopilotRuntime, ExperimentalEmptyAdapter, copilotRuntimeNextJSAppRouterEndpoint } from "@copilotkit/runtime";
import { NextRequest } from "next/server";
const agent = new HttpAgent({ url: "http://localhost:8008/chat" });
const runtime = new CopilotRuntime({ agents: { weather_agent: agent } });
export async function POST(req: NextRequest) {
const { handleRequest } = copilotRuntimeNextJSAppRouterEndpoint({
runtime,
serviceAdapter: new ExperimentalEmptyAdapter(),
endpoint: "/api/copilotkit",
});
return handleRequest(req);
}Wrap your app:
import { CopilotKit } from "@copilotkit/react-core";
import "@copilotkit/react-ui/styles.css";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<CopilotKit agent="weather_agent" runtimeUrl="/api/copilotkit">
{children}
</CopilotKit>
</body>
</html>
);
}Render chat (<CopilotChat />), and use useCopilotAction({...}) in client components to render generative UI tied to backend tool calls.
POST, OPTIONS, auth headers)./api/copilotkit (Next.js route) and backend /chat. Don't rely on client-only secrets.Content-Type: text/event-stream and that proxy layers (Nginx, CloudFront, etc.) don't buffer SSE.useCopilotAction name must match backend @tool name exactly.website/docs/beta/ag-ui/index.mdx — AGUIStream, supported events, basic server.website/docs/beta/ag-ui/copilotkit-quickstart.mdx — full React + CopilotKit walkthrough (file layout, route, layout, chat component, weather-card example).ag-ui extra — pip install "ag2[ag-ui]" is required; without it from autogen.beta.ag_ui import AGUIStream will fail.CORSMiddleware to the FastAPI app for the dev origin.Content-Type issue. Test with raw curl -N first to isolate.useCopilotAction({ name: "..." })) doesn't exactly match the backend @tool name.AGUIStream with classic ConversableAgent — the description here covers autogen.beta.Agent. Classic AG2 agents can be exposed differently; check the AG2 docs for that path.© 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
Just SKILL.md in .agents/skills/ag2-ag-ui of ag2ai/build-with-ag2.
Open the folder on GitHubat commit 29eeac3
Ag2 Ag UI 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ag2 Ag UI this skillag2ai/build-with-ag2 | 252 | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Docs Guidefivetaku/gptaku-plugins-codex | 128 | — | ~3.5k | Automated safety check: Pass | MIT | |
| Htmxericrisco/rsc-harness | 180 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Senior Fullstackalirezarezvani/claude-skills | 28k | 1 repos | ~3.7k | Automated safety check: Notes | MIT | |
| Senior Fullstackborghei/Claude-Skills | 891 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Clean Code Refactorerfike/fastapi-blog | 101 | — | ~402 | Automated safety check: Pass | MIT |
fivetaku/gptaku-plugins-codex
Fetch and explain official documentation for any library, framework, API, or service using an llms.txt-first strategy — triggers on "How do I…", "What is…", "How does X work", "Best practice for…"…
ericrisco/rsc-harness
A skill your agent uses when adding interactivity to a server-rendered app (FastAPI/Jinja, Django, Rails, Laravel, Go templates, Express) without adopting a JS framework — hx-get/post/put/delete…
alirezarezvani/claude-skills
Fullstack development toolkit with project scaffolding for Next.js, FastAPI, MERN, and Django stacks, code quality analysis with security and complexity scoring, and stack selection guidance.
borghei/Claude-Skills
Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis.
fike/fastapi-blog
Skill for identifying code smells and refactoring code using Clean Code, SOLID, and DRY principles.
nazarli-shabnam/clevis
Andrej Karpathy的思维框架与表达方式。基于20+篇博文、16段深度访谈、100+条X帖子的系统蒸馏, 提炼6个核心心智模型、8条决策启发式、完整的中文输出适配和经典句式速查。
ag2ai/build-with-ag2
Add a custom Python tool to an AG2 beta Agent using the @tool decorator.
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).
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…
ag2ai/build-with-ag2
Persist agent state across runs, shape what the LLM sees per turn, and cap history to fit a context window.
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.
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).
Categories
Expose an AG2 beta Agent over the AG-UI protocol so a frontend (CopilotKit, custom React/Next.js, or any AG-UI client) can stream responses, render tool calls, sync shared state, and surface…. Ag2 Ag UI is an agent skill from ag2ai/build-with-ag2.js, or any AG-UI client) can stream responses, render tool calls, sync shared state, and surface human-input checkpoints.
Ag2 Ag UI fits situations like: the user wants a web frontend in front of an AG2 agent rather than a CLI / script; tasks that involve Backend development.
Run `npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a claude-code`. Or copy the skill folder (.agents/skills/ag2-ag-ui in ag2ai/build-with-ag2) into .claude/skills/ag2-ag-ui in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ag2ai/build-with-ag2 --skill ag2-ag-ui -a codex`. Or copy the skill folder (.agents/skills/ag2-ag-ui in ag2ai/build-with-ag2) into .agents/skills/ag2-ag-ui in your project. Codex loads it when a task matches its description.
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-ag-ui -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-ag-ui, .gemini/skills/ag2-ag-ui, .github/skills/ag2-ag-ui and .opencode/skills/ag2-ag-ui in your project.
Going by SKILL.md and its folder, Ag2 Ag UI needs the command-line tools its instructions call (pip, curl, uvicorn and npx). Our summary lists: Python 3; Node.js.
SKILL.md names 3 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: docs.ag-ui.com and dojo.ag-ui.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Ag2 Ag UI 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.
About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Ag2 Ag UI: Docs Guide (fivetaku/gptaku-plugins-codex, 128 stars), Htmx (ericrisco/rsc-harness, 180 stars), Senior Fullstack (alirezarezvani/claude-skills, 28k stars) and Senior Fullstack (borghei/Claude-Skills, 891 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.