Documentation Index
Fetch the complete documentation index at: https://docs.rkat.ai/llms.txt
Use this file to discover all available pages before exploring further.
Tool system
Defining tools
Define tools using JSON Schema:Implementing AgentToolDispatcher
TheAgentToolDispatcher trait connects your tools to the agent:
ToolRegistry (dynamic registration)
ToolRegistry (dynamic registration)
For dynamic tool registration:
Multimodal tool results
Tool results can carry either plain text or multimodal content blocks:ToolResult::new(...) creates a text-only result. ToolResult::with_blocks(...) passes content blocks directly into ToolResult.content, enabling tools to return images and other rich content to vision-capable models.
The built-in view_image tool uses the same content-block mechanism to read image files from disk and return them as ContentBlock::Image blocks. It is automatically hidden from models that lack vision or image tool result support.
Session stores
- JsonlStore
- MemoryStore
File-based persistence using JSONL format:
Implementing a custom store
Implementing a custom store
Implement the
SessionStore trait and pass it to AgentFactory::session_store(). Then build a runtime-backed SessionService so the custom store participates in the canonical session lifecycle instead of only a one-off direct agent.Prefer
SessionStore + session_store() over implementing AgentSessionStore directly.
SessionStore is the richer trait (with list, delete, exists) and AgentFactory
automatically wraps it via StoreAdapter. Implementing AgentSessionStore directly
bypasses the factory and loses runtime-backed session orchestration.For runtime-backed persistent services, realm persistence still flows through the
PersistenceBundle opened for that realm. Treat custom SessionStore
implementations as a storage seam for custom builders or direct agent/store
integration, not as a drop-in replacement for the entire runtime persistence
bundle.MCP integration
Route tool calls across multiple MCP servers:See also
- Rust SDK overview - getting started, sessions, events
- Rust SDK advanced - expert-only direct agent construction, providers, hooks
- Tools concept - how the tool system works
