Expand description
§Daimon
A Rust-native AI agent framework for building LLM-powered agents with tool use, memory, and streaming. Daimon implements the ReAct (Reason-Act-Observe) pattern: the agent calls a model, optionally invokes tools, observes results, and repeats until it produces a final response.
§Quick Start
ⓘ
use daimon::prelude::*;
#[tokio::main]
async fn main() -> daimon::Result<()> {
let agent = Agent::builder()
.model(daimon::model::openai::OpenAi::new("gpt-4o"))
.system_prompt("You are a helpful assistant.")
.build()?;
let response = agent.prompt("What is Rust?").await?;
println!("{}", response.text());
Ok(())
}§Feature Flags
| Feature | Description |
|---|---|
openai | OpenAI API provider (default) |
anthropic | Anthropic Claude API provider (default) |
gemini | Google Gemini / Vertex AI provider |
azure | Azure OpenAI Service provider |
bedrock | AWS Bedrock provider |
full | All model providers |
The core framework compiles with no features; enable providers as needed.
§Module Overview
Re-exports§
pub use error::DaimonError;pub use error::Result;
Modules§
- agent
- Agent construction and ReAct loop execution.
- error
- Error types for the Daimon agent framework.
- hooks
- Lifecycle hooks for observing and controlling agent execution.
- memory
- Conversation memory for persisting message history across agent turns.
- model
- LLM provider abstraction and implementations.
- prelude
- Convenience re-exports for common Daimon types.
- stream
- Streaming response types for token-by-token or event-by-event model output.
- tool
- Tool abstraction and registry.