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

    Type Alias AgentMessageExperimental

    An agent message upsert.

    Only [AgentMessage::message_id] is required. content has patch semantics: an omitted field leaves existing message content unchanged, null clears the value, and a concrete array replaces the previous value. For a new messageId, omitted fields use client defaults. content is replaced as a whole array; send [] or null to clear it.

    Message updates and chunks are applied in the order they are received. When an agent_message update includes content, that array replaces any content previously accumulated for the message, including content from earlier chunks. Later chunks with the same messageId append to the current content.

    type AgentMessage = {
        messageId: MessageId;
        content?: ContentBlock[] | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index
    messageId: MessageId

    A unique identifier for the message.

    content?: ContentBlock[] | null

    Complete replacement content for this message.

    _meta?: { [key: string]: unknown } | null

    The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys. Omitted means no metadata update; null is an explicit clear signal.

    See protocol docs: Extensibility