
Spawn Agent
https://github.com/millionco/spawn-agent- Category
- AI Agents
- Rank
- No. 1107Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- millionco
- GitHub
- 167 stars
- Date
About
Spawn local coding agents on the user's machine — discover and launch whatever agents are installed without per-app integration.
What it does
Spawn Agent turns several coding-agent programs into Vercel AI SDK language models. Requests travel to a subprocess through the Agent Client Protocol, while responses arrive as streamed text, reasoning, tool activity, plans, permissions, and usage data. It also supports persistent multi-turn sessions and custom protocol-compatible adapters.
Why it's ranked here
The design solves a real integration problem with a focused abstraction. One provider API covers Claude Code, Codex, Cursor, Copilot, Gemini, OpenCode, Factory Droid, and Pi. Stateful sessions, typed events, cancellation, and explicit failure classes make it credible for application code, not just one-off scripts.
What's good
The event model preserves more than final text: callers can observe thinking, tool calls, plans, permission requests, configuration changes, and completion data. Permission handling supports automatic approval, one-time approval, rejection, streamed human decisions, or a custom policy. Inactivity limits, protocol checks, bounded diagnostic buffers, and graceful subprocess disposal address common operational failures.
Tradeoffs
It requires Node.js 22 or newer, plus separately installed and authenticated agent programs. Claude Code and Codex need additional protocol adapter packages. The default permission policy automatically approves requests, so safety-sensitive applications should change it deliberately. Behavior still depends on each agent's advertised capabilities, protocol support, authentication, and local process stability.
How to use it well
Use it in TypeScript applications already built around the Vercel AI SDK that need interchangeable coding agents or durable local conversations. Set the working directory, permission policy, timeout, and extra tool servers explicitly. Choose streamed permissions for human oversight. It does not supply agent installations, authentication, or a remote execution service.
Technical notes+
The public surface in packages/spawn-agent/src/index.ts exports the core client, AI SDK provider, detection helpers, permission policies, adapters, protocol types, and typed errors. packages/spawn-agent/src/connect.ts launches child processes with piped standard streams, wraps newline-delimited JSON using the ACP SDK, filters stdout noise, retains bounded stderr context, supports tracing, and escalates disposal from SIGTERM to SIGKILL. packages/spawn-agent/src/types.ts defines the async event stream and turn result contracts. packages/spawn-agent/vite.config.ts builds ESM entries with declarations and source maps. package.json defines a pnpm and Turborepo workspace requiring Node.js 22 or newer.
Observed
- License
- MIT
- Primary language
- TypeScript
- Install surface
- npm package installed with spawn-agent and ai
- Interfaces
- TypeScript library, Vercel AI SDK provider, and Agent Client Protocol client
- Runtime
- Node.js 22 or newer
- Packaging
- ESM output with TypeScript declarations and source maps
- Agent support
- Claude Code, Codex, Cursor Agent, GitHub Copilot CLI, Gemini CLI, OpenCode, Factory Droid, and Pi
- Repository structure
- pnpm and Turborepo monorepo with apps and packages workspaces
Read from README.md, package.json, packages/spawn-agent/vite.config.ts, packages/spawn-agent/src/index.ts, packages/spawn-agent/src/types.ts, packages/spawn-agent/src/detect.ts, packages/spawn-agent/src/errors.ts, packages/spawn-agent/src/adapter.ts, packages/spawn-agent/src/connect.ts, packages/spawn-agent/src/constants.ts, packages/spawn-agent/src/permission.ts, packages/spawn-agent/src/spawn-agent.ts, packages/spawn-agent/src/adapters/pi.ts, packages/spawn-agent/src/utils/clock.ts, packages/spawn-agent/src/ai-sdk/index.ts.
What it can do
Discover installed coding agents
Local machine file system → List of available coding agents
Launch coding agents
Selected agent from discovered list → Running agent instance
Spawn multiple agents simultaneously
Multiple agent selections → Multiple running agent instances
Manage agent execution
Running agent instances → Agent status and control interface
Provide unified agent access
Heterogeneous installed agents → Standardized agent interface
Intel on Spawn Agent
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.