Library API Guide
telos_agent is the library crate. It is published to crates.io and documented with rustdoc.
Install it with Cargo:
cargo add telos_agentMain Entry Points
| Area | Public API | Use |
|---|---|---|
| Session runtime | AgentSession, AgentConfig, TurnEvent, TurnResult | Run blocking or streaming agent turns. |
| Providers | ModelProvider, DeepSeekProvider, RoutedProvider, MockProvider | Connect the runtime to LLM backends. |
| Tools | Tool, ToolRegistry, ToolDefinition, ToolOutput, ToolContext | Define and register callable capabilities. |
| Built-in tools | register_core_tools, register_core_tools_with_shell, ShellTool, PowerShellTool, file tools, code index tools, browser tools, WebFetchTool, WebSearchTool | Add filesystem, the platform/default configured shell, search, browser, and web tools. |
| Human approval | ApprovalHandler, ApprovalRequest, ApprovalDecision, PermissionEngine, PermissionRule | Gate dangerous tool execution. |
| Persistence | Storage, JsonlStorage, NoopStorage | Save and resume sessions. |
| Prompt | PromptAssembly, PromptSection, built-in prompt sections | Build dynamic system prompts. |
| Memory | MemoryStore, ProfileManager, memory tools | Persist cross-session knowledge. |
| Tasks | TaskManager, Task, task tools | Track agent-visible tasks. |
| MCP | McpManager, McpClient, McpToolBridge | Bridge MCP tools into the registry. |
| Plugins | PluginRegistry, PluginId, PluginError, BUILTIN_MARKETPLACE | Load plugin-defined tools, skills, prompts, MCP servers, and subagents. |
| Subagents | SubagentTool, SubagentRegistry, AgentDefinition, Synapse, ForkLens | Run nested or forked agent work. |
| Diagnostics | ToolDiagnosticsSink, JsonlToolDiagnosticsSink, ToolFailureEvent | Record sanitized tool failures. |
Minimal Runtime Flow
use telos_agent::{ AgentConfig, AgentSession, DeepSeekConfig, DeepSeekProvider, ToolRegistry, register_core_tools,};
# async fn example() -> Result<(), telos_agent::AgentError> {let provider = DeepSeekProvider::new(DeepSeekConfig::from_env("deepseek-v4-pro")?);let mut tools = ToolRegistry::new();register_core_tools(&mut tools);
let mut session = AgentSession::new(AgentConfig::default())?;let result = session.run_turn(&provider, &tools, "Summarize this project").await?;println!("{}", result.final_message.text_content());# Ok(())# }DeepSeekConfig::from_env reads DEEPSEEK_API_KEY directly from the process
environment. If you want to use the CLI config file’s [env] table in a custom
client, read that file yourself and pass the key with DeepSeekConfig::new.
For item-level signatures and module details, use the generated Rust API reference.