ACP v2 TypeScript SDK — EXPERIMENTAL DRAFT - v2.0.0
    Preparing search index...

    ACP v2 TypeScript SDK — EXPERIMENTAL DRAFT - v2.0.0Experimental

    Experimental TypeScript API for the draft ACP v2 protocol.

    ACP v2 is still a draft. Its wire protocol and this API may change incompatibly in any SDK release. The stable package entry point remains ACP v1. The stable-feature set of the v2 draft is available through @agentclientprotocol/sdk/experimental/v2; additional unstable protocol features require @agentclientprotocol/sdk/experimental/v2/unstable. Both entrypoints remain experimental.

    Session state updates are aggregate snapshots, not per-prompt completions. Apply repeated snapshots idempotently; a repeated idle stop reason is not a new completion, cancellation, or usage report. Every successful session/resume sends a current-state snapshot after replay and before its response, including when replay was not requested. The response does not imply idle. Agents may send live traffic after initialization even when no client request is pending.

    Top-level _meta on upsert updates patches stored metadata by key: omission leaves it unchanged, null clears it, null-valued keys are removed, and other values replace their key whole without nested merging. An empty object does nothing. Replay uses the same rule. Metadata on chunks, content items, snapshots, and plan_update is not an entity patch.

    Experimental operations follow their advertised capabilities; local schema selection does not establish peer support. When opting into unstable lifecycle systemPrompt instructions, only send them when the agent advertises session.systemPrompt, and only use override when its mode.override capability is advertised.

    RequestError
    MessageTooLargeError
    AgentProtocolRouter
    AgentContext
    ClientContext
    SessionBuilder
    ActiveSession
    AgentApp
    ClientApp
    NdJsonStreamOptions
    AgentConnectOptions
    AgentConnectionLifecycle
    AgentConnector
    AcpConnection
    AgentConnection
    ClientConnection
    ParamsParser
    AnyMessage
    AnyCall
    AnyBatchCall
    AnyBatchResponse
    AnyBatchMessage
    AnyWireMessage
    AnyRequest
    AnyResponse
    AnyNotification
    JsonRpcId
    SendRequestOptions
    BatchRequest
    BatchNotification
    BatchEntry
    BatchOutputs
    Result
    ErrorResponse
    MaybePromise
    RequestPermissionSubject
    ToolCallContent
    ContentBlock
    DiffChange
    CreateElicitationRequest
    ElicitationPropertySchema
    MultiSelectItems
    AuthMethod
    SessionConfigOption
    AvailableCommandInput
    SessionUpdate
    IdleStateUpdate
    StateUpdate
    PlanUpdateContent
    McpServer
    ReplayFrom
    SetSessionConfigOptionRequest
    RequestPermissionOutcome
    CreateElicitationResponse
    UnknownVariant
    AgentRequest
    RequestId
    RequestPermissionRequest
    SessionId
    ToolCallUpdate
    ToolCallId
    ToolKind
    ToolCallStatus
    Annotations
    Role
    TextContent
    MediaType
    ImageContent
    AudioContent
    Icon
    IconTheme
    EmbeddedResourceResource
    TextResourceContents
    BlobResourceContents
    EmbeddedResource
    Content
    DiffFileType
    AbsolutePath
    DiffPathChange
    DiffPathPairChange
    DiffPatch
    DiffPatchFormat
    Diff
    TerminalId
    Terminal
    ToolCallLocation
    ToolCallPermissionSubject
    CommandPermissionSubject
    PermissionOption
    PermissionOptionId
    PermissionOptionKind
    ElicitationSessionScope
    ElicitationRequestScope
    ElicitationSchema
    ElicitationSchemaType
    StringFormat
    EnumOption
    StringPropertySchema
    NumberPropertySchema
    IntegerPropertySchema
    BooleanPropertySchema
    StringMultiSelectItems
    TitledMultiSelectItems
    MultiSelectPropertySchema
    ElicitationFormMode
    ElicitationId
    ElicitationUrlMode
    ExtRequest
    AgentResponse
    InitializeResponse
    ProtocolVersion
    Implementation
    AgentCapabilities
    SessionCapabilities
    PromptCapabilities
    PromptImageCapabilities
    PromptAudioCapabilities
    PromptEmbeddedContextCapabilities
    McpCapabilities
    McpStdioCapabilities
    McpHttpCapabilities
    SessionDeleteCapabilities
    SessionAdditionalDirectoriesCapabilities
    AgentAuthCapabilities
    AuthMethodId
    EnvVariable
    AuthMethodTerminal
    AuthMethodAgent
    LoginAuthResponse
    LogoutAuthResponse
    NewSessionResponse
    SessionConfigId
    SessionConfigOptionCategory
    SessionConfigValueId
    SessionConfigSelectOptions
    SessionConfigSelectOption
    SessionConfigSelectGroup
    SessionConfigGroupId
    SessionConfigSelect
    SessionConfigBoolean
    AvailableCommand
    TextCommandInput
    ListSessionsResponse
    SessionInfo
    SessionListCursor
    DeleteSessionResponse
    ResumeSessionResponse
    CloseSessionResponse
    SetSessionConfigOptionResponse
    PromptResponse
    MessageId
    ExtResponse
    Error
    ErrorCode
    AgentNotification
    UpdateSessionNotification
    ContentChunk
    UserMessage
    AgentMessage
    AgentThought
    RunningStateUpdate
    ErrorStopReason
    RequiresActionStateUpdate
    ToolCallContentChunk
    TerminalOutput
    TerminalExitStatus
    TerminalUpdate
    TerminalOutputChunk
    PlanId
    PlanEntry
    PlanEntryPriority
    PlanEntryStatus
    PlanItems
    PlanUpdate
    AvailableCommandsUpdate
    ConfigOptionUpdate
    SessionInfoUpdate
    Cost
    UsageUpdate
    NoticeSeverity
    Notice
    CompactionId
    CompactionStatus
    CompactionUpdate
    CompactionSummaryChunk
    CompleteElicitationNotification
    ExtNotification
    ClientRequest
    InitializeRequest
    ClientCapabilities
    AuthCapabilities
    TerminalAuthCapabilities
    ElicitationCapabilities
    ElicitationFormCapabilities
    ElicitationUrlCapabilities
    LoginAuthRequest
    LogoutAuthRequest
    NewSessionRequest
    HttpHeader
    McpServerHttp
    McpServerStdio
    ListSessionsRequest
    DeleteSessionRequest
    ResumeSessionRequest
    ReplayFromStart
    CloseSessionRequest
    PromptRequest
    ClientResponse
    RequestPermissionResponse
    SelectedPermissionOutcome
    ElicitationContentValue
    ElicitationAcceptAction
    ClientNotification
    CancelSessionNotification
    ProtocolLevelNotification
    CancelRequestNotification
    WireStream
    Stream
    ExtensionMethod
    UnrecognizedMethod
    InitializationSnapshot
    AgentBatchEntry
    ClientBatchEntry
    ActiveSessionMessage
    AppOptions
    AgentHandlerContext
    AgentRequestContext
    AgentNotificationContext
    ClientHandlerContext
    ClientRequestContext
    ClientNotificationContext
    AgentRequestHandler
    AgentNotificationHandler
    ClientRequestHandler
    ClientNotificationHandler
    AgentConnectHandler
    ClientConnectHandler
    AgentRequestHandlersByMethod
    AgentRequestMethod
    AgentNotificationHandlersByMethod
    AgentNotificationMethod
    ClientRequestHandlersByMethod
    ClientRequestMethod
    ClientNotificationHandlersByMethod
    ClientNotificationMethod
    AgentRequestParamsByMethod
    AgentRequestResponsesByMethod
    AgentNotificationParamsByMethod
    ClientRequestParamsByMethod
    ClientRequestResponsesByMethod
    ClientNotificationParamsByMethod
    DEFAULT_MAX_MESSAGE_BYTES
    RequestPermissionSubject
    ToolCallContent
    ContentBlock
    DiffChange
    CreateElicitationRequest
    ElicitationPropertySchema
    MultiSelectItems
    AuthMethod
    SessionConfigOption
    AvailableCommandInput
    SessionUpdate
    IdleStateUpdate
    StateUpdate
    PlanUpdateContent
    McpServer
    ReplayFrom
    SetSessionConfigOptionRequest
    RequestPermissionOutcome
    CreateElicitationResponse
    AGENT_METHODS
    CLIENT_METHODS
    PROTOCOL_METHODS
    PROTOCOL_VERSION
    methods
    agentProtocolRouter
    ndJsonStream
    batchRequest
    batchNotification
    agent
    client