Expand description
§Ceylon Runtime
A Rust-based agent mesh framework for building local and distributed AI agent systems.
§Features
- Agent Framework: Build autonomous AI agents with a simple trait-based API
- Local Mesh: Connect multiple agents for inter-agent communication
- LLM Integration: Built-in support for OpenAI, Anthropic, Ollama, Google, and more
- Memory Backends: Pluggable memory systems (in-memory, SQLite, Redis)
- Async-first: Built on Tokio for high-performance async operations
- Observability: Structured logging and metrics collection
§Quick Start
use ceylon_runtime::{Agent, AgentContext, LocalMesh, Message};
use ceylon_runtime::core::error::Result;
use ceylon_runtime::core::mesh::Mesh;
use async_trait::async_trait;
struct MyAgent {
name: String,
}
#[async_trait]
impl Agent for MyAgent {
fn name(&self) -> String {
self.name.clone()
}
async fn on_message(&mut self, msg: Message, _ctx: &mut AgentContext) -> Result<()> {
println!("Received: {:?}", msg.topic);
Ok(())
}
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let agent = MyAgent { name: "my-agent".to_string() };
let mesh = LocalMesh::new("my-mesh");
mesh.add_agent(Box::new(agent)).await?;
mesh.start().await?;
Ok(())
}§Modules
core- Core abstractions: Agent, Memory, Mesh, Messagellm- LLM integration with multi-provider supportlocal- Local mesh implementationmemory- Memory backend implementationslogging- Structured logging configurationmetrics- Metrics collection and reporting
§Feature Flags
sqlite- Enable SQLite memory backendredis- Enable Redis memory backendfull- Enable all optional backends
Re-exports§
pub use core::agent::Agent;pub use core::agent::AgentContext;pub use core::memory::Memory;pub use core::memory::MemoryEntry;pub use core::memory::MemoryQuery;pub use core::memory::VectorMemory;pub use core::mesh::Mesh;pub use core::message::Message;pub use llm::LLMConfig;pub use llm::LlmAgent;pub use llm::UniversalLLMClient;pub use local::LocalMesh;pub use memory::InMemoryBackend;