> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/agentclientprotocol/typescript-sdk/llms.txt
> Use this file to discover all available pages before exploring further.

# ACP TypeScript SDK

> Build standardized communication between code editors and AI-powered coding agents

<div
  style={{
background: 'linear-gradient(135deg, #040404 0%, #1a1a1a 100%)',
padding: '4rem 2rem',
borderRadius: '8px',
marginBottom: '2rem',
color: 'white'
}}
>
  <h1 style={{ fontSize: '2.5rem', fontWeight: 700, marginBottom: '1rem', color: 'white' }}>
    Agent Client Protocol TypeScript SDK
  </h1>

  <p style={{ fontSize: '1.25rem', marginBottom: '2rem', opacity: 0.9 }}>
    The official TypeScript implementation of the Agent Client Protocol (ACP) — a standardized communication protocol between code editors and AI-powered coding agents.
  </p>

  <div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
    <a
      href="/quickstart"
      style={{
  background: 'white',
  color: '#040404',
  padding: '0.75rem 1.5rem',
  borderRadius: '6px',
  textDecoration: 'none',
  fontWeight: 600,
  display: 'inline-block'
}}
    >
      Get Started
    </a>

    <a
      href="https://github.com/agentclientprotocol/typescript-sdk"
      style={{
  background: 'transparent',
  color: 'white',
  padding: '0.75rem 1.5rem',
  borderRadius: '6px',
  textDecoration: 'none',
  fontWeight: 600,
  border: '2px solid white',
  display: 'inline-block'
}}
    >
      View on GitHub
    </a>
  </div>
</div>

## Key Features

<CardGroup cols={2}>
  <Card title="Bidirectional Communication" icon="arrow-right-arrow-left">
    JSON-RPC 2.0 protocol implementation for seamless agent-client communication
  </Card>

  <Card title="Type-Safe SDK" icon="shield-check">
    Full TypeScript support with Zod schema validation for all protocol messages
  </Card>

  <Card title="Session Management" icon="layer-group">
    Create, load, fork, and resume conversation sessions with state management
  </Card>

  <Card title="File System Operations" icon="file-code">
    Read and write text files within the client's environment
  </Card>

  <Card title="Terminal Support" icon="terminal">
    Execute commands and monitor terminal output for interactive workflows
  </Card>

  <Card title="Permission Handling" icon="lock">
    Request user authorization for sensitive operations with flexible permission options
  </Card>
</CardGroup>

## Quick Start

<Steps>
  <Step title="Install the SDK">
    <CodeGroup>
      ```bash npm theme={null}
      npm install @agentclientprotocol/sdk
      ```

      ```bash yarn theme={null}
      yarn add @agentclientprotocol/sdk
      ```

      ```bash pnpm theme={null}
      pnpm add @agentclientprotocol/sdk
      ```
    </CodeGroup>
  </Step>

  <Step title="Choose Your Role">
    Decide whether you're building an Agent or a Client:

    * **Agent**: AI-powered program that uses generative AI to autonomously modify code
    * **Client**: Code editor or IDE that provides the interface between users and agents
  </Step>

  <Step title="Start Building">
    <CardGroup cols={2}>
      <Card title="Build an Agent" icon="robot" href="/agents/overview">
        Create an AI agent that processes prompts and executes tool calls
      </Card>

      <Card title="Build a Client" icon="desktop" href="/clients/overview">
        Implement a code editor that connects to ACP agents
      </Card>
    </CardGroup>
  </Step>
</Steps>

## Core Concepts

<CardGroup cols={2}>
  <Card title="Protocol Overview" icon="diagram-project" href="/concepts/protocol-overview">
    Understand the ACP specification and communication model
  </Card>

  <Card title="Agents and Clients" icon="users" href="/concepts/agents-and-clients">
    Learn about the two sides of the protocol
  </Card>

  <Card title="Connections" icon="plug" href="/concepts/connections">
    Establish bidirectional communication channels
  </Card>

  <Card title="Sessions" icon="comments" href="/concepts/sessions">
    Manage conversation contexts and state
  </Card>
</CardGroup>

## API Reference

<CardGroup cols={3}>
  <Card title="AgentSideConnection" icon="server" href="/api/agent-side-connection">
    Agent's view of the connection
  </Card>

  <Card title="ClientSideConnection" icon="laptop-code" href="/api/client-side-connection">
    Client's view of the connection
  </Card>

  <Card title="Agent Interface" icon="code" href="/api/agent-interface">
    Methods agents must implement
  </Card>

  <Card title="Client Interface" icon="code" href="/api/client-interface">
    Methods clients must implement
  </Card>

  <Card title="Types & Schema" icon="brackets-curly" href="/api/types">
    TypeScript types and Zod schemas
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/api/request-error">
    Protocol error codes and handling
  </Card>
</CardGroup>

## Resources

<CardGroup cols={2}>
  <Card title="Examples" icon="flask" href="/examples/simple-agent">
    Complete working examples of agents and clients
  </Card>

  <Card title="Official Protocol Docs" icon="book" href="https://agentclientprotocol.com">
    Full ACP specification and protocol documentation
  </Card>

  <Card title="GitHub Repository" icon="github" href="https://github.com/agentclientprotocol/typescript-sdk">
    View source code and contribute
  </Card>

  <Card title="NPM Package" icon="npm" href="https://www.npmjs.com/package/@agentclientprotocol/sdk">
    Published package on npm registry
  </Card>
</CardGroup>
