Build AI-Powered Applications with ACP
The official Dart implementation of the Agent Client Protocol (ACP) — a standardized communication protocol between code editors and AI-powered coding agents. Build robust agents and clients with full type safety.
Key Features
Type-Safe Communication
Full Dart type annotations with null safety and sealed union types for exhaustive message handling
Complete Protocol Support
Comprehensive implementation of ACP stable features with support for unstable and extension methods
Stream-Based Architecture
NDJSON-based communication over stdio with built-in error handling and automatic JSON-RPC error mapping
Terminal & File Operations
Built-in support for terminal management, file system operations, and session lifecycle control
Quick Example
Build an agent in minutes with the ACP Dart SDK:agent.dart
Getting Started
Installation
Add the SDK to your Dart project with pub
Quickstart
Build your first agent or client in 5 minutes
Core Concepts
Learn about agents, clients, and the ACP protocol
Protocol Support
The SDK provides comprehensive support for the Agent Client Protocol:Agent Methods
initialize, session/new, session/load, session/prompt, session/cancel, and moreClient Methods
fs/read_text_file, fs/write_text_file, terminal/create, session/request_permissionSession Updates
Real-time streaming of message chunks, tool calls, plans, and execution updates
Error Handling
JSON-RPC error mapping with typed error responses and cancellation support
Resources
API Reference
Complete API documentation for all types and methods
Examples
Working examples of agents and clients
Protocol Spec
Official ACP protocol documentation