agent_responses
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ArchiveSessionResponse aclientp.schema.agent_responses **UNSTABLE**: Response to ``session/archive``. |
||
| AuthStatusResponse aclientp.schema.agent_responses **UNSTABLE**: Response to ``auth/status``. |
||
| AuthenticateResponse aclientp.schema.agent_responses Response to authenticate method. |
||
| CloseSessionResponse aclientp.schema.agent_responses Response from closing a session. |
||
| CustomResponse aclientp.schema.agent_responses Response for custom/extension methods. |
||
| DeleteSessionResponse aclientp.schema.agent_responses Response to ``session/delete``. |
||
| ForkSessionResponse aclientp.schema.agent_responses **UNSTABLE**: Response from forking an existing session. |
||
| InitializeResponse aclientp.schema.agent_responses Response from the initialize method. |
||
| ListSessionsResponse aclientp.schema.agent_responses Response from listing sessions. |
||
| LoadSessionResponse aclientp.schema.agent_responses Response from loading an existing session. |
||
| LogoutResponse aclientp.schema.agent_responses Response to the ``logout`` method. |
||
| NewSessionResponse aclientp.schema.agent_responses Response from creating a new session. |
||
| PromptResponse aclientp.schema.agent_responses Response from processing a user prompt. |
||
| ResumeSessionResponse aclientp.schema.agent_responses Response from resuming an existing session. |
||
| SessionOptionsResponse aclientp.schema.agent_responses **UNSTABLE**: The modes and config options a session would start with. |
||
| SessionStatusResponse aclientp.schema.agent_responses **UNSTABLE**: Response to ``session/status``. |
||
| SetSessionConfigOptionResponse aclientp.schema.agent_responses Response to `session/set_config_option` method. |
||
| SetSessionModeResponse aclientp.schema.agent_responses Response to `session/set_mode` method. |
||
| SetSessionTitleResponse aclientp.schema.agent_responses **UNSTABLE**: Response to ``session/set_title``. |
||
| UnarchiveSessionResponse aclientp.schema.agent_responses **UNSTABLE**: Response to ``session/unarchive``. |
🛈 DocStrings¶
ArchiveSessionResponse
¶
AuthStatusResponse
¶
Bases: Response
UNSTABLE: Response to auth/status.
Source code in src/aclientp/schema/agent_responses.py
accounts
class-attribute
instance-attribute
¶
accounts: Sequence[AuthAccount] = Field(default_factory=list)
The accounts the agent has configured, for display.
AuthenticateResponse
¶
CloseSessionResponse
¶
CustomResponse
¶
DeleteSessionResponse
¶
ForkSessionResponse
¶
Bases: Response
UNSTABLE: Response from forking an existing session.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The full list of config options with updated values.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
session_id
instance-attribute
¶
Unique identifier for the newly created forked session.
create
classmethod
¶
create(
session_id: str,
config_options: Sequence[SessionConfigOption] | None = None,
modes: Sequence[SessionMode] | None = None,
current_mode: str | None = None,
) -> Self
Create a response with the given session ID and config options.
Source code in src/aclientp/schema/agent_responses.py
InitializeResponse
¶
Bases: Response
Response from the initialize method.
Contains the negotiated protocol version and agent capabilities.
See protocol docs: Initialization
Source code in src/aclientp/schema/agent_responses.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
agent_capabilities
class-attribute
instance-attribute
¶
agent_capabilities: AgentCapabilities | None = Field(default_factory=AgentCapabilities)
Capabilities supported by the agent.
agent_info
class-attribute
instance-attribute
¶
agent_info: Implementation | None = None
Information about the Agent name and version sent to the Client.
Note: in future versions of the protocol, this will be required.
auth_methods
class-attribute
instance-attribute
¶
auth_methods: Sequence[AuthMethod] | None = Field(default_factory=list)
Authentication methods supported by the agent.
protocol_version
class-attribute
instance-attribute
¶
The protocol version the client specified if supported by the agent.
Or the latest protocol version supported by the agent. The client should disconnect, if it doesn't support this version.
create
classmethod
¶
create(
name: str,
title: str,
version: str,
protocol_version: int,
load_session: bool | None = False,
http_mcp_servers: bool = False,
sse_mcp_servers: bool = False,
audio_prompts: bool = False,
embedded_context_prompts: bool = False,
image_prompts: bool = False,
list_sessions: bool = False,
resume_session: bool = False,
close_session: bool = False,
auth_methods: Sequence[AuthMethod] | None = None,
) -> Self
Create an instance of AgentCapabilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the agent. |
required |
title
|
str
|
The title of the agent. |
required |
version
|
str
|
The version of the agent. |
required |
protocol_version
|
int
|
The protocol version of the agent. |
required |
load_session
|
bool | None
|
Whether the agent supports |
False
|
http_mcp_servers
|
bool
|
Whether the agent supports HTTP MCP servers. |
False
|
sse_mcp_servers
|
bool
|
Whether the agent supports SSE MCP servers. |
False
|
audio_prompts
|
bool
|
Whether the agent supports audio prompts. |
False
|
embedded_context_prompts
|
bool
|
Whether the agent supports embedded context prompts. |
False
|
image_prompts
|
bool
|
Whether the agent supports image prompts. |
False
|
list_sessions
|
bool
|
Whether the agent supports |
False
|
resume_session
|
bool
|
Whether the agent supports |
False
|
close_session
|
bool
|
Whether the agent supports |
False
|
auth_methods
|
Sequence[AuthMethod] | None
|
The authentication methods supported by the agent. |
None
|
Source code in src/aclientp/schema/agent_responses.py
ListSessionsResponse
¶
Bases: Response
Response from listing sessions.
Source code in src/aclientp/schema/agent_responses.py
next_cursor
class-attribute
instance-attribute
¶
Opaque cursor token. If present, pass this in the next request's cursor parameter to fetch the next page. If absent, there are no more results.
sessions
class-attribute
instance-attribute
¶
sessions: Sequence[SessionInfo] = Field(default_factory=list)
Array of session information objects.
LoadSessionResponse
¶
Bases: Response
Response from loading an existing session.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The full list of config options with updated values.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
LogoutResponse
¶
NewSessionResponse
¶
Bases: Response
Response from creating a new session.
See protocol docs: Creating a Session
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
**Configuration options for this session.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
session_id
instance-attribute
¶
Unique identifier for the created session.
Used in all subsequent requests for this conversation.
PromptResponse
¶
Bases: Response
Response from processing a user prompt.
See protocol docs: Check for Completion
Source code in src/aclientp/schema/agent_responses.py
ResumeSessionResponse
¶
Bases: Response
Response from resuming an existing session.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The full list of config options with updated values.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
create
classmethod
¶
create(
config_options: Sequence[SessionConfigOption] | None = None,
modes: Sequence[SessionMode] | None = None,
current_mode: str | None = None,
) -> Self
Create a response with the given config options and modes.
Source code in src/aclientp/schema/agent_responses.py
SessionOptionsResponse
¶
Bases: Response
UNSTABLE: The modes and config options a session would start with.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The config options the session would start with.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
The mode state the session would start with, if the Agent supports modes.
SessionStatusResponse
¶
Bases: Response
UNSTABLE: Response to session/status.
Source code in src/aclientp/schema/agent_responses.py
SetSessionConfigOptionResponse
¶
Bases: Response
Response to session/set_config_option method.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] = []
The full list of config options with updated values.