ACP v2 (Preview) TypeScript SDK — EXPERIMENTAL - v2.12.1
    Preparing search index...

    Type Alias NewSessionRequestExperimental

    Request parameters for creating a new session.

    See protocol docs: Creating a Session

    type NewSessionRequest = {
        cwd: AbsolutePath;
        additionalDirectories?: AbsolutePath[];
        mcpServers?: McpServer[];
        systemPrompt?: SystemPrompt | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index

    The working directory for this session. Must be an absolute path.

    additionalDirectories?: AbsolutePath[]

    Additional workspace roots for this session. Each path MUST be absolute.

    These expand the session's workspace scope without changing cwd, which remains the base for relative paths. When omitted or empty, no additional roots are activated for the new session.

    mcpServers?: McpServer[]

    List of MCP (Model Context Protocol) servers for the Agent to connect to.

    systemPrompt?: SystemPrompt | null

    System-level instructions for the new session.

    Optional. Omitted and null are equivalent and mean the Agent uses its own default instructions. Clients MUST only send this when the Agent advertises session.systemPrompt.

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

    The _meta property is reserved by ACP to allow Clients and Agents to attach additional metadata to their interactions. Omitted and null are equivalent and mean no metadata. Implementations MUST NOT assign meaning to keys they do not recognize.

    See protocol docs: Extensibility