Agent
🛈 DocStrings¶
Base class of a v2 agent. Override the methods the agent supports.
Source code in src/aclientp/v2/agent.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
archive_session
async
¶
archive_session(params: ArchiveSessionRequest) -> ArchiveSessionResponse
auth_status
async
¶
auth_status(params: AuthStatusRequest) -> AuthStatusResponse
cancel
async
¶
cancel(params: CancelSessionNotification) -> None
cancel_terminal
async
¶
cancel_terminal(params: CancelTerminalRequest) -> CancelTerminalResponse
cancel_tool_call
async
¶
cancel_tool_call(params: CancelToolCallRequest) -> CancelToolCallResponse
close_session
async
¶
close_session(params: CloseSessionRequest) -> CloseSessionResponse
delete_session
async
¶
delete_session(params: DeleteSessionRequest) -> DeleteSessionResponse
disable_provider
async
¶
disable_provider(params: DisableProviderRequest) -> DisableProviderResponse
ext_method
async
¶
Handle a custom (_-prefixed) request; params is None if omitted.
fork_session
async
¶
fork_session(params: ForkSessionRequest) -> ForkSessionResponse
initialize
async
¶
initialize(params: InitializeRequest) -> InitializeResponse
Handle initialize; protocol_version of params is always 2.
list_providers
async
¶
list_providers(params: ListProvidersRequest) -> ListProvidersResponse
list_sessions
async
¶
list_sessions(params: ListSessionsRequest) -> ListSessionsResponse
login
async
¶
login(params: LoginAuthRequest) -> LoginAuthResponse
logout
async
¶
logout(params: LogoutAuthRequest) -> LogoutAuthResponse
mcp_message
async
¶
mcp_message(params: MessageMcpRequest) -> MessageMcpResponse
mcp_notification
async
¶
mcp_notification(params: MessageMcpNotification) -> None
new_session
async
¶
new_session(params: NewSessionRequest) -> NewSessionResponse
prompt
async
¶
prompt(params: PromptRequest) -> PromptResponse
Handle session/prompt: insert the message and return its ID right away.
Report the turn with state_update notifications; do not wait for it here.
Source code in src/aclientp/v2/agent.py
resume_session
async
¶
resume_session(params: ResumeSessionRequest) -> ResumeSessionResponse
Handle session/resume (send replay_complete after a requested replay).
session_options
async
¶
session_options(params: SessionOptionsRequest) -> SessionOptionsResponse
session_status
async
¶
session_status(params: SessionStatusRequest) -> SessionStatusResponse
set_provider
async
¶
set_provider(params: SetProviderRequest) -> SetProviderResponse
set_session_config_option
async
¶
set_session_config_option(params: SetSessionConfigOptionRequest) -> SetSessionConfigOptionResponse
Handle session/set_config_option.
set_session_title
async
¶
set_session_title(params: SetSessionTitleRequest) -> SetSessionTitleResponse
unarchive_session
async
¶
unarchive_session(params: UnarchiveSessionRequest) -> UnarchiveSessionResponse