Pydantic schemas used by the REST API and WebSocket protocol. Mirror these in Python integration code to get type-safe request/response handling.
For the user-facing REST documentation see REST API.
src.api.schemas.session
Session CRUD types: create, update, list, delete request/response.
Key types: SessionCreate, SessionUpdate, SessionOut, SessionList.
src.api.schemas.message
Message send/list/clear types. The shape used by both POST /sessions/{id}/messages and the WebSocket user_message event.
Key types: MessageIn, MessageOut, MessageList, ToolCallOut.
src.api.schemas.agent
Agent state and configuration types. Used by GET /agents and the streaming agent_state WebSocket event.
src.api.schemas.config
Config file schema — every field that can appear in .cogtrix.yml. Used by the setup wizard and the /config REST endpoints.
src.api.schemas.auth
Auth flow types: register, login, refresh, logout, API-key CRUD.
Key types: LoginRequest, TokenPair, UserOut, APIKeyOut.
src.api.schemas.tool
Tool catalogue types — what GET /tools/catalog returns and what POST /tools/load accepts.
src.api.schemas.memory
Memory state response types — used by GET /sessions/{id}/memory to expose facts, goals, and recall stats.
src.api.schemas.rag
RAG ingestion and query types.
src.api.schemas.mcp
MCP server connection types.
src.api.schemas.workflow
Workflow definition + binding types — see Workflows for the user-facing guide.