Skip to content

agentclientprotocol/typescript-sdk

Repository files navigation

Agent Client Protocol

ACP TypeScript Library

The official TypeScript implementation of the Agent Client Protocol (ACP) — a standardized communication protocol between code editors and AI-powered coding agents.

Learn more at https://agentclientprotocol.com

Installation

npm install @agentclientprotocol/sdk

Experimental ACP v2

Warning: ACP v2 is still a draft. Its wire protocol and this TypeScript API may change incompatibly in any SDK release. Use it only if you are prepared to track the draft as it evolves.

The stable package entry point remains ACP v1. ACP v2 requires an explicit experimental import:

import * as acp from "@agentclientprotocol/sdk/experimental/v2";

Browse the experimental v2 TypeScript API reference and the draft ACP v2 protocol documentation for the current SDK and protocol designs.

Get Started

Understand the Protocol

Start by reading the official ACP documentation to understand the core concepts and protocol specification.

Try the Examples

The examples directory contains simple implementations of both Agents and Clients in TypeScript. These examples can be run from your terminal or from an ACP Client like Zed, making them great starting points for your own integration!

Explore the API

Browse the TypeScript library reference for detailed API documentation.

If you're building an Agent, start with agent({ name }), register handlers such as initialize(...), newSession(...), and prompt(...), then call connect(stream).

If you're building a Client, start with client({ name }), register client-side handlers such as requestPermission(...) and sessionUpdate(...), then run your agent workflow with connectWith(stream, async (ctx) => ...).

Study a Production Implementation

For a complete, production-ready implementation, check out the Gemini CLI Agent.

Resources

Contributing

See the main repository for contribution guidelines.

License

By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.

About

TypeScript SDK for ACP clients and agents.

Resources

License

Stars

213 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors