Enki 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 in a local mesh for inter-agent communication
- LLM Integration: Built-in support for 13+ LLM providers (OpenAI, Anthropic, Ollama, Google, etc.)
- Memory Backends: Pluggable memory systems with in-memory, SQLite, and Redis support
- MCP Support: Model Context Protocol for tool integration
- Async-first: Built on Tokio for high-performance async operations
- Observability: Structured logging and metrics collection built-in
Architecture
Enki Runtime is modular, split into focused sub-crates:
| Crate | Description |
|---|---|
enki-core |
Core abstractions: Agent, Memory, Mesh, Message |
enki-llm |
LLM integration with multi-provider support |
enki-local |
Local mesh implementation |
enki-memory |
Memory backend implementations |
enki-observability |
Logging and metrics |
enki-mcp |
Model Context Protocol (optional) |
The enki-runtime umbrella crate re-exports all components for convenience.
Installation
[]
= "0.1"
Feature Flags
sqlite- Enable SQLite memory backendredis- Enable Redis memory backendmcp- Enable Model Context Protocol supportfull- Enable all optional features
[]
= { = "0.1", = ["sqlite", "redis", "mcp"] }
Quick Start
use ;
use Result;
use Mesh;
use async_trait;
async
Using LLM Agents
use LlmAgent;
async
TOML Configuration
Load agents from TOML files:
use ;
use AgentConfig;
let config = from_file?;
let agent = from_config?;
Core Components
| Component | Description |
|---|---|
Agent |
Trait for defining agent behavior |
LocalMesh |
Local multi-agent coordination |
LlmAgent |
Pre-built agent with LLM capabilities |
Memory |
Trait for memory backends |
InMemoryBackend |
In-memory storage (default) |
SqliteBackend |
SQLite persistent storage (feature: sqlite) |
RedisBackend |
Redis distributed storage (feature: redis) |
McpClient |
MCP client for external tools (feature: mcp) |
Examples
Run examples with:
Documentation
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.