Skip to main content

Crate rs_agent

Crate rs_agent 

Source
Expand description

§rs-agent

Lattice AI Agent Framework for Rust

rs-agent provides clean abstractions for building production AI agents with:

  • Pluggable LLM providers (Gemini, Ollama, Anthropic)
  • Tool calling with async support
  • Memory systems with RAG capabilities
  • UTCP integration for universal tool calling
  • Multi-agent coordination

§Quick Start

use rs_agent::{Agent, AgentOptions};
use rs_agent::memory::{InMemoryStore, SessionMemory};
use std::sync::Arc;

#[tokio::main]
async fn main() {
    // Setup will go here
}

Re-exports§

pub use agent::Agent;
pub use catalog::StaticSubAgentDirectory;
pub use catalog::StaticToolCatalog;
pub use error::AgentError;
pub use error::Result;
pub use memory::mmr_rerank;
pub use memory::InMemoryStore;
pub use memory::MemoryRecord;
pub use memory::MemoryStore;
pub use memory::SessionMemory;
pub use models::LLM;
pub use tools::Tool;
pub use tools::ToolCatalog;
pub use types::AgentOptions;
pub use types::AgentState;
pub use types::File;
pub use types::GenerationResponse;
pub use types::Message;
pub use types::Role;
pub use types::SubAgent;
pub use types::SubAgentDirectory;
pub use types::ToolRequest;
pub use types::ToolResponse;
pub use types::ToolSpec;
pub use models::GeminiLLM;

Modules§

agent
Core Agent orchestrator
agent_orchestrators
CodeMode orchestration and tool integration
agent_tool
UTCP tool integration and adapters
catalog
Tool and SubAgent catalog implementations
error
helpers
Helper utilities for agent operation
memory
models
query
Query classification utilities
tools
types
utcp

Structs§

CodeModeArgs
Arguments accepted by the codemode tool.
CodeModeUtcp
Minimal facade exposing UTCP calls to Rhai scripts executed by CodeMode.
CodemodeOrchestrator
High-level orchestrator that mirrors go-utcp’s CodeMode flow: