A hands-on workshop where you build a real-time chat app powered by Claude Managed Agents and Vercel Workflows — guided by a coding agent.
A chat interface where Claude can run tools, browse the web, and stream responses back in real-time. The backend uses a durable Vercel Workflow that polls the Anthropic events API, streams results via SSE, and pauses between turns with zero compute cost.
git clone https://github.com/mbaiza27/WRKSHP-workflows-claudema.git --branch starter
cd WRKSHP-workflows-claudema
pnpm installEverything you need is in WORKSHOP.md. It walks you through each step with your coding agent (Claude Code, Cursor, etc.).
Before starting, make sure you have:
- Claude Code or another coding agent
- A Vercel account
- An Anthropic account with credits loaded
- A Managed Agent created in the Anthropic console (you'll need the Agent ID and Environment ID)
- Node.js 20+ and pnpm
| Branch | Description |
|---|---|
starter |
Scaffolding only — clone this to follow the workshop |
main |
Completed reference implementation — check this if you get stuck |
- Next.js 16 with React 19
- Vercel Workflows for durable agent orchestration
- Anthropic Managed Agents for the AI runtime
- Neon Postgres via Vercel Marketplace
- Drizzle ORM for database access
- shadcn/ui + Tailwind CSS v4 for the UI
- Server-Sent Events for real-time streaming
Browser Next.js / Workflow Anthropic
| | |
| POST /api/session | sessions.create() |
|------------------------------->|------------------------------>|
| { id, runId } | start(sessionWorkflow) |
|<-------------------------------| |
| | |
| GET /api/readable/{runId} | sendMessage (step) |
|------------------------------->|------------------------------>|
| (SSE stream opens) | |
| | sleep("3s") |
| | pollAndStream (step) |
| |------------------------------>|
| data: { agent.message } | writer.write(event) |
|<-------------------------------| |
| | session.status_idle |
| | hook.create() (pauses) |
| | |
| POST /api/message | messageHook.resume() |
|------------------------------->| (workflow wakes up) |