ACP TypeScript SDK

Official TypeScript SDK for the Agent Client Protocol connecting editors and AI coding agents

SDK
npm
v1.3.0
234stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
83/100Excellent
Development Activity96
Maintenance100
Community64
Maturity32
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture83
Code Quality84
Innovation80
Learning Curve68

The ACP TypeScript SDK is the official implementation of the Agent Client Protocol, a standardized JSON-RPC-based protocol that lets code editors and AI-powered coding agents communicate over a common interface instead of each editor integrating each agent one-off. It ships typed builders for both sides of the protocol: agent({ name }) for implementing an agent that registers initialize, newSession, and prompt handlers, and client({ name }) for implementing an editor-side client that registers handlers like requestPermission and sessionUpdate.

Beyond the core stdio JSON-RPC connection, the SDK exposes experimental transports for HTTP streaming, WebSockets, and a Node.js process adapter, plus a Zod-validated, generated schema layer so protocol messages are type-checked at compile time. It backs production integrations such as the Gemini CLI’s editor integration and is consumed directly by editors like Zed.

What You Get

  • Typed agent({ name }) and client({ name }) builder APIs for implementing either side of the ACP protocol
  • A core JSON-RPC connection layer (connection.ts, jsonrpc.ts) handling request/response correlation, notifications, and error propagation
  • Generated, Zod-validated schema types (schema/zod.gen.js, schema/types.gen.js) kept in sync with the protocol specification
  • Experimental transport adapters for HTTP streaming, WebSockets, and Node.js process I/O beyond the default stdio stream
  • Runtime narrowing helpers (declaration-merged guards) for extensible protocol unions like CreateElicitationResponse
  • Working example implementations of both Agents and Clients under src/examples

Common Use Cases

  • Building a new AI coding agent that needs to speak a standard protocol to any ACP-compatible editor
  • Adding ACP client support to a code editor so it can drive third-party coding agents
  • Wiring an agent’s prompt/sessionUpdate flow into an editor’s UI via typed handler registration
  • Prototyping agent/client behavior locally using the bundled example implementations
  • Bridging an existing agent (e.g. a CLI-based coding assistant) into ACP via the Node.js process adapter

Under The Hood

Architecture: The package is organized around a central acp.ts entrypoint (~4,200 lines) that re-exports generated schema types and guards, and layers typed agent()/client() builder functions over a lower-level JSON-RPC engine split across connection.ts (message routing/handler registration) and jsonrpc.ts (~1,400 lines: request IDs, correlation, RequestError, notification dispatch); transport concerns are decoupled from protocol logic through a Stream interface implemented separately for stdio, HTTP (http-stream.ts), WebSockets (ws-stream.ts, ws-server.ts), and Node.js child processes (node-adapter.ts). Tech Stack: Modern TypeScript (ESM-only, type: module) targeting Node.js, with Zod as a peer dependency for schema validation, ws for WebSocket transport, and a generated schema layer produced via @hey-api/openapi-ts from the protocol specification, keeping hand-written code and generated code (*.gen.ts) clearly separated. Code Quality: Every core module has a co-located .test.ts file (connection, jsonrpc, server, sse, ws-stream, schema-deserialize, cookie-store) run under Vitest, and the check script chains lint, format-check, spellcheck, build, test, and TypeDoc verification, indicating a CI-enforced quality bar; tsc strictness plus generated Zod schemas gives both compile-time and runtime type safety. API Design: The builder pattern (agent({...}).initialize(...).newSession(...).prompt(...)) reads as a fluent, discoverable surface that only requires implementing the handlers relevant to one’s role, while re-exporting protocol constants (AGENT_METHODS, CLIENT_METHODS, PROTOCOL_VERSION) keeps consumers aligned with the spec without hardcoding method name strings.

Used by 10 apps in this directory

TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
TypeScript
97%
Apache 2.0

Cline

AI Code Assistants

66,453

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
90
Repo Health
74
Technical
67
Dependency
Built with
TypeScript97%
Updated today
TypeScript
98%
MIT

Kimi Code CLI

AI Code Assistants · AI Agents · Developer Tools

6,908

A single-binary, terminal-native coding agent that reads, edits, and runs code end to end, built by Moonshot AI for Kimi models but pluggable with Anthropic, OpenAI, and Google providers too.

View details
81
Repo Health
87
Technical
66
Dependency
Built with
TypeScript98%
Updated today
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

27,294

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
88
Repo Health
73
Technical
66
Dependency
Built with
TypeScript99%
Updated today
TypeScript
89%
MIT

open-pencil

AI Design Tools · Design Tools

7,864

An open-source design editor that reads native Figma files, ships a built-in AI assistant with 100+ design tools, and offers real-time serverless collaboration — all without giving up your files.

View details
80
Repo Health
78
Technical
70
Dependency
Built with
TypeScript89%
Updated today
TypeScript
76%
MIT

OpenCode

AI Code Assistants

198,979

A fully open-source AI coding agent built for the terminal, with a TUI, desktop app, web client, plugin system, and SDK — one of the most-starred AI coding agents on GitHub.

View details
89
Repo Health
76
Technical
68
Dependency
Built with
TypeScript76%
MDX21%
Updated today
TypeScript
98%
AGPL 3.0

paseo

AI Agents · AI Code Assistants

14,283

One unified interface to orchestrate Claude Code, Codex, Copilot, OpenCode, and Pi agents in parallel from desktop, mobile, or the terminal.

View details
87
Repo Health
83
Technical
70
Dependency
Built with
TypeScript98%
Updated today
TypeScript
98%
Apache 2.0

rowboat

AI Assistants · AI Development

17,323

Build, test, and deploy multi-agent AI workflows with a visual editor, RAG data sources, MCP tool integration, and a production-ready REST API.

View details
85
Repo Health
72
Technical
65
Dependency
Built with
TypeScript98%
Updated today
TypeScript
92%
Apache 2.0

superset

AI Code Assistants · AI Development

13,068

Orchestrate an army of AI coding agents—Claude Code, Codex, Gemini CLI, and more—running simultaneously in isolated git worktrees from a single Electron desktop app.

View details
85
Repo Health
80
Technical
69
Dependency
Built with
TypeScript92%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search