Skip to content

Choose the right Agent SDK example

The examples progress from one-channel assistants to durable, event-driven workflows. Start with the smallest agent for your use case. Each guide explains its request flow, framework features, verification path, and reusable design.

The source projects live under examples/. Run the commands below from packages/agent-serve. See Run the CLI if the agent-sdk command isn't installed.

Compare the examples

AgentRuntimeIntakeFramework focusWhat sets it apart
Weather agentLocalHTTP and two Slack transportsTools, stdio MCP, approvals, skill, subagent, schedule, hook, A/B, and evalsIt demonstrates the broad local-runtime surface in one domain.
Slack agentLocalAccount-linked SlackChannel identity, threads, and suggested promptsIt reaches Slack without authored tools.
ConciergeLocalBuilt-in HTTPPeer MCP and multi-agent servingIt delegates to a separate agent with its own tools, sessions, and context.
Playbook routerLocal with repo contextTwo Slack transportsChannel watching, inherited skills, custom cwd, and an evalAn allowlisted Slack channel becomes an intake queue for repo playbooks.
Alert investigatorLocalWatched Slack alerts channelBot-post channel watching, per-thread debounce, reminder tools, and host Slack callsEvery alert gets a thread-pinned investigation that schedules its own re-checks.
PR evidence reviewerLocalCustom HTTP and SlackHost tool, skill, seeded workspaces, and an evalThe model receives a prepared diff-first evidence tree instead of a checkout.
Approval BuddyLocalGitHub and SlackPolicy tools, two subagents, durable storage, and evalsCode decides whether a PR may be approved. Reviews stay informational.
Security ReviewerLocal host pipelineGitHub and chatStaged tools, parallel SDK agents, progress UI, durable storage, A/B, and evalsLives in factory/security-reviewer/. Reviewers and triage overlap while the playground shows every stage.
Remote PR coordinatorLocal coordinator and remote PR sessionsHTTP, GitHub, and SlackRemote handoff, hooks, affinity, buffering, reminders, and workflow MCPOne remote conversation follows a PR across chat, webhooks, and timed wakes.
Knowledge baseLocalBuilt-in HTTP chatDurable host-side state, a conventions skill, a schedule, unit tests, and evalsPeople curate shared facts in chat, and fresh sessions retrieve them from markdown.
Codebase wikiLocalGitHub and chatTask-dispatch webhooks, seeded digests, a mapping skill, a schedule, and evalsMerged PRs accumulate into per-feature wiki pages with a daily digest.
Codeowners reviewLocalGitHub, chat, and fixturesOwnership routing in code, playbook data files, parallel subagents, and evalsEach product area reviews with its own playbook, and verdicts aggregate mechanically.

Pick a learning path

Use this order when you want to learn the Agent SDK one capability at a time:

  1. Start with Weather agent to explore the filesystem conventions and local runtime.
  2. Strip the project back to Slack agent to see the minimum channel surface.
  3. Read Playbook router when Slack should route requests into repo playbooks.
  4. Continue to Alert investigator when the intake is bot posts and the agent must pace its own engagement and re-checks.
  5. Add composition with Concierge.
  6. Study PR evidence reviewer before giving a model repository evidence.
  7. Move policy into code with Approval Buddy.
  8. Compare Security Reviewer and Remote PR coordinator for host-side versus remote PR work.
  9. See parallel subagent delegation carry team judgment in Codeowners review.
  10. Curate team context through conversation with Knowledge base, then let GitHub events maintain product documentation in Codebase wiki.

Common prerequisites

All examples require:

  • Node 22.13 or newer. Don't run the Agent SDK under Bun.
  • Workspace dependencies installed.
  • An agent-runtime credential for model turns.

Several examples need more:

  • Account-linked Slack channels require a connected host account.
  • Alert investigator needs a dedicated Socket Mode app with channel-post events and membership in the watched alerts channel.
  • GitHub examples require access to the target repository. Codebase wiki and Codeowners review call the host gh CLI for PR data; the codeowners fixtures run without network.
  • Example agents use cursorHostedStorage (agent/storage.ts) for Cursor-hosted session storage (control-plane proxy).
  • Remote PR coordinator starts remote agent sessions and needs access to its workflow backend.

Each guide lists its own credentials, services, and side effects.

Validate any example

Discovery commands don't start a model turn:

bash
agent-sdk validate --dir examples/weather-agent
agent-sdk info --dir examples/weather-agent --json

Start one development server with agent-sdk dev examples/<name>. Concierge depends on Weather agent, so its guide creates an isolated two-project mount. Don't mount the whole examples directory to test one agent; several advanced examples subscribe to live GitHub events.

Read by framework feature