A practical course on building AI agents — from core loop to multi-agent collaboration.
Agent 101 is a hands-on course that teaches you how to build real AI agents using TypeScript and the Anthropic SDK. Each lesson introduces one new concept by modifying a minimal working agent — you can see exactly what changed and why.
The course ships with one app:
| App | Description |
|---|---|
apps/agent |
TypeScript source files — run each lesson directly |
The foundation every agent is built on
| Lesson | Title | Concept |
|---|---|---|
| 1.1 | Agent Core Loop | One while loop, one stop condition |
| 1.2 | Tools System | Dispatch map, four file tools |
| 1.3 | Steering | Inject instructions while the agent is running |
| 1.4 | Followup | Outer loop — continue after the agent finishes |
Managing complex multi-step work
| Lesson | Title | Concept |
|---|---|---|
| 2.1 | ToDo System | Self-updating checklist + Drift Guard |
| 2.2 | Sub-Agent Delegation | Spawn a fresh agent for focused sub-tasks |
| 2.3 | Skills System | Load expert knowledge on demand |
| 2.4 | JSON File-based Task System | Persistent tasks with dependency tracking |
Managing what the agent sees
| Lesson | Title | Concept |
|---|---|---|
| 3.1 | Compaction | Run long tasks without hitting context limits |
| 3.2 | Context Engineering | What goes into the context window, and why it matters |
Doing more than one thing at a time
| Lesson | Title | Concept |
|---|---|---|
| 4.1 | Background Task Execution | Start a slow command and keep working |
Agents working together
| Lesson | Title | Concept |
|---|---|---|
| 5.1 | Agent Team System | Multiple agents, one shared filesystem |
| 5.2 | Team Protocol | Typed messages with request/response pairing |
| 5.3 | Autonomous Agents | Agents find and claim their own work |
| 5.4 | Worktree & Task Isolation | One git branch per task |
- Node.js 22+
- pnpm 9+
- An Anthropic API key
1. Clone and install
git clone https://github.com/yai-dev/a101.git
cd a101
pnpm install2. Configure environment
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY3. Run a lesson
cd apps/agent
npx tsx ch1-core/1.1-core-loop.ts4. Start the course website
pnpm dev
# Opens at http://localhost:3000| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
Yes | Your Anthropic API key |
MODEL_ID |
No | Override the default model (default: claude-opus-4-5) |
ANTHROPIC_BASE_URL |
No | Override the API endpoint (useful for proxies) |
- Runtime: Node.js, TypeScript,
tsx - AI SDK:
@anthropic-ai/sdk - Package manager: pnpm workspaces
MIT © 2026 Yaid