Agent SDK Examples — Development skill for Claude Code
Example SDK snippets for programmatic agent usage.
How to install Agent SDK Examples
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open przeprogramowani/agent-sdk-examples and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Agent SDK Examples does
Example SDK snippets for programmatic agent usage.
Alternatives in Development
- Anthropic Cookbook — Official examples and guides from Anthropic 36.3k ★
- Example Plugin — Reference implementation for plugin developers 14k ★
- Claude How To — by luongnv89 — Example-driven guide to mastering Claude Code through progressive tutorials with copy-paste tem 8.5k ★
README
agent-sdk-examples
Runnable, minimal examples of programmatic agent usage. Each example is a small, self-contained TypeScript script you can run with a single `npm` command — no boilerplate, just the SDK feature it demonstrates.
Examples are run with [`tsx`](https://github.com/privatenumber/tsx), so there is no build step.
Setup
npm install
cp .env.example .env # then fill in your keys
Every example loads `.env` at startup (via `dotenv`), so put your keys there:
ANTHROPIC_API_KEY=sk-ant-... # anthropic/* examples (optional — see below)
OPENROUTER_API_KEY=sk-or-v1-... # ai-sdk/* examples (required)
`.env` is gitignored; `.env.example` is the committed template.
The **Claude Agent SDK** (`anthropic/*`) also runs through the locally installed `claude` CLI and reuses its Claude Code login, so `ANTHROPIC_API_KEY` is optional if that CLI is already authenticated. The **Vercel AI SDK** examples (`ai-sdk/*`) have no implicit auth and always need `OPENROUTER_API_KEY`.
Anthropic — Claude Agent SDK
Examples live in [`anthropic/`](./anthropic) and revolve around a small code-review agent. The sample diffs they review are in [`data/`](./data) — by default the scripts read `data/sample-1.md`; pass another sample as an argument, or pipe a real diff via stdin:
npm run anthropic:review # uses data/sample-1.md
npm run anthropic:review -- sample-2 # uses data/sample-2.md
git diff | npm run anthropic:review # review your working tree
| Script | File | What it shows |
|---|---|---|
npm run anthropic:review |
`review.ts` | A focused review agent that returns structured JSON output enforced by a JSON Schema. |
npm run anthropic:session |
`review-with-session.ts` | Session resume — review once, then ask a follow-up that reuses the prior context without re-sending the diff. |
npm run anthropic:skill |
[`skill-auto |
Related Skills
Claude Agent
A comprehensive collection of examples demonstrating the Claude Agent SDK capabilities, from basic usage to ad
Claude Agent SDK
An Elixir SDK for Claude Code - provides programmatic access to Claude Code CLI with streaming message process
Claude Code Examples
Official example projects and patterns from Anthropic.
Langchain Multi Agent Example
Comprehensive tutorial and code examples for building multi-agent systems with LangChain
OpenAI Agents SDK Learn
This repository contains examples of using the OpenAI Agents SDK to build intelligent travel planning agents w
Agents Are Easy Governance Is Hard
Claude Cowork, Claude Code, and the Agent SDK — and the part every tutorial leaves out. Two examples, same job
Related Agents
Example Curator
Use this agent when you need to evaluate CLAUDE.md examples for inclusion in the awesome-claude-md repository,
General Technical Project Lead
Use this agent proactively when you need principal-level technical leadership for complex projects, performanc
Cypher Author
Writes read-only Cypher for natural-language questions given the live graph schema and few-shot examples; also