roboto.ai.agent_session.event#
Module Contents#
- class roboto.ai.agent_session.event.AgentErrorEvent(/, **data)#
Bases:
pydantic.BaseModelSignals that message generation failed or was cancelled.
- Parameters:
data (Any)
- error_code: str | None = None#
Optional error code for programmatic handling.
- error_message: str#
User-friendly error message describing what went wrong.
- type roboto.ai.agent_session.event.AgentEvent = Union[AgentStartTextEvent, AgentTextDeltaEvent, AgentTextEndEvent, AgentToolUseEvent, AgentToolResultEvent, AgentErrorEvent]#
- class roboto.ai.agent_session.event.AgentStartTextEvent(/, **data)#
Bases:
pydantic.BaseModelSignals the beginning of text generation in a chat response.
- Parameters:
data (Any)
- class roboto.ai.agent_session.event.AgentTextDeltaEvent(/, **data)#
Bases:
pydantic.BaseModelContains incremental text content as the AI generates its response.
- Parameters:
data (Any)
- text: str#
Text fragment from the streaming response.
- class roboto.ai.agent_session.event.AgentTextEndEvent(/, **data)#
Bases:
pydantic.BaseModelSignals the completion of text generation in a chat response.
- Parameters:
data (Any)
- class roboto.ai.agent_session.event.AgentToolResultEvent(/, **data)#
Bases:
pydantic.BaseModelContains the result of a tool invocation.
- Parameters:
data (Any)
- name: str#
Name of the tool that was invoked.
- output: dict[str, Any] | None = None#
Raw tool output payload (from the underlying tool_result’s
raw_response). May beNonefor errored invocations or for tools that return no data.
- runtime_ms: int | None = None#
Wall-clock execution time of the tool in milliseconds, as reported by the tool-result content.
Noneonly if the underlying content omits it.
- success: bool#
Whether the tool invocation succeeded.
- tool_use_id: str#
Unique identifier for this tool invocation.
- class roboto.ai.agent_session.event.AgentToolUseEvent(/, **data)#
Bases:
pydantic.BaseModelSignals that the AI is invoking a tool to gather information.
- Parameters:
data (Any)
- input: dict[str, Any] | None = None#
Parsed tool input parameters chosen by the LLM.
- name: str#
Name of the tool being invoked.
- tool_use_id: str#
Unique identifier for this tool invocation.