A deep comparison of six TypeScript agentic frameworks, evaluated for edge cloud deployment — one agent instance per user, running at the network edge with durable state.
Scoring each framework on the key requirement: can I spin up a separate, stateful agent instance per user on the network edge with zero infrastructure management?
| Edge capability | Vercel AI SDK | Mastra | Inngest | Claude Agent | CF Agents | PersistentAI |
|---|---|---|---|---|---|---|
| Instance-per-user | ✗ Stateless | ~ Via external storage | ~ Via step state | ~ Per-session files | ✓ DO per user/session | ~ Per-workspace |
| Co-located compute + state | ✗ | ✗ | ✗ | ~ Disk-local | ✓ Same-thread SQLite | ~ PostgreSQL (not co-located) |
| Hibernation (zero cost when idle) | N/A | ✗ | ✗ | ✗ | ✓ Hibernatable WebSockets | ✗ |
| Global edge locations | ✓ Vercel Edge | ✓ Via CF deployer | ✗ Centralized | ✗ Server only | ✓ 300+ cities | ✗ Docker host |
| Scale to millions of instances | N/A | ~ Depends on backend | ~ Via cloud tier | ✗ | ✓ Millions of DOs | ✗ |
| WebSocket per agent | ✗ SSE only | ✗ SSE only | ~ Via useAgent | ✗ | ✓ Built-in per-DO | ✓ tRPC WebSocket |
| Scheduling / cron per agent | ✗ | ~ Via workflow | ✓ Inngest cron | ✗ | ✓ DO alarms + schedule() | ✓ DBOS scheduled |
| Dimension | Vercel AI SDK | Mastra | Inngest | Claude Agent | CF Agents | PersistentAI |
|---|---|---|---|---|---|---|
| Durability | ✗ Statelessuse workflow add-on | ~ Suspend/resumehuman-in-the-loop | ✓ Step checkpointssurvives crashes | ~ Session filesfile checkpointing | ✓ DO + Workflowsauto-retry, hibernate | ✓ DBOS exactly-oncetime-travel debug |
| Storage model | BYO (KV, Postgres…) | Built-in memory (short + long) | Inngest cloud state + KV | Filesystem transcripts | SQLite per-DO + KV/D1/R2 | PostgreSQL + LakeFS VFS |
| Multi-agent | Tool handoffs (manual) | Supervisor + parallel/branch | Networks + typed state router | Subagents (fg/bg) | Cross-DO RPC + Workflows | Swarm delegation + messaging |
| Observability | Vercel Observability | Built-in evals + tracing | Dev server traces + dashboard | Event stream + usage metrics | Workers Logs + AI Gateway | Flow debugger + breakpoints |
| Blockchain / payments | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ Tetra L2 + x402 + NFT agents |
| Human-in-the-loop | Tool approval (v6) | Workflow suspend | Durable steps | AskUserQuestion tool | waitForEvent | DBOS signal await |
| Dimension | Vercel AI SDK | Mastra | Inngest | Claude Agent | CF Agents | PersistentAI |
|---|---|---|---|---|---|---|
| Getting started | npm i ai |
npx create mastra@latest |
npm i @inngest/agent-kit |
npm i @anthropic-ai/claude-agent-sdk |
npm create cloudflare -- --template agents-starter |
git clone + pnpm + docker |
| Local dev | Next.js dev server | Mastra Studio (:4111) | Inngest Dev Server | Node.js / CLI direct | wrangler dev |
Docker Compose |
| Deploy target | Vercel, any Node host | Vercel, CF, standalone | Any host + Inngest Cloud | Any server with CLI | Cloudflare Workers | Docker / self-hosted |
| Vendor lock-in | Low | Low | Medium | High (Claude only) | Medium (CF infra) | Low (self-hosted) |
| Maturity / traction | Very high (20M/mo) | High (150K/wk, enterprise) | Medium (growing) | Medium (rapid v0.2.x) | Medium (GA) | Early (pre-traction) |
| Cost model | Free SDK + hosting | Free OSS + Cloud | Free tier + usage | Free SDK + API tokens | Free tier + DO/Workers | Infra costs only |