Chat contract¶
The types a chat agent receives for one turn and what it may return, shared by the chat page and evals. Guide: Chat with your agent.
The chat agent contract, shared by the chat page (agent_adapter.viewer) and evals.
ChatReply = str | AsyncIterator[str | ToolCallDelta]
module-attribute
¶
Attachment
dataclass
¶
A file the user attached; path is a local copy the server stored.
ChatAgent
¶
Bases: Protocol
agent(message, session): async or sync; returns text or an async iterator of chunks.
ChatMessage
dataclass
¶
The user's message of one turn.