Skip to content

NewSessionRequest

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970869872064["sessions.NewSessionRequest"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970869872064
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

Request parameters for creating a new session.

Source code in src/aclientp/schema/v2/sessions.py
class NewSessionRequest(AnnotatedObject):
    """Request parameters for creating a new session."""

    cwd: AbsolutePath
    """The working directory for this session. Must be an absolute path."""

    additional_directories: Sequence[AbsolutePath] | MISSING = MISSING
    """Additional workspace roots for this session. Each path must be absolute."""

    mcp_servers: Sequence[McpServer] | MISSING = MISSING
    """List of MCP (Model Context Protocol) servers the agent should connect to."""

    system_prompt: SystemPrompt | MISSING | None = MISSING
    """System-level instructions for the new session."""

    config_options: Sequence[InitialSessionConfigOption] | MISSING = MISSING
    """Initial values for the session's config options."""

additional_directories class-attribute instance-attribute

additional_directories: Sequence[AbsolutePath] | MISSING = MISSING

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

config_options class-attribute instance-attribute

config_options: Sequence[InitialSessionConfigOption] | MISSING = MISSING

Initial values for the session's config options.

cwd instance-attribute

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

mcp_servers class-attribute instance-attribute

mcp_servers: Sequence[McpServer] | MISSING = MISSING

List of MCP (Model Context Protocol) servers the agent should connect to.

system_prompt class-attribute instance-attribute

system_prompt: SystemPrompt | MISSING | None = MISSING

System-level instructions for the new session.

:fa-brands-github: Show source on GitHub