klieo 0.41.2

Open-source Rust agent framework — typed agents, durable inter-agent comms, local-first.
Documentation
# klieo

Open-source Rust agent framework — typed agents, durable inter-agent comms, local-first.

[![crates.io](https://img.shields.io/crates/v/klieo)](https://crates.io/crates/klieo)
[![docs.rs](https://img.shields.io/docsrs/klieo)](https://docs.rs/klieo)
[![MIT](https://img.shields.io/crates/l/klieo)](https://github.com/mohrimic/klieo/blob/main/LICENSE)

## What it is

klieo is a Rust agent framework that wires LLM clients, tools, memory,
and inter-agent messaging behind a clean trait surface. Build agents that
call local or remote LLMs, persist memory to SQLite/Qdrant/Neo4j,
communicate over NATS or in-process bus, and expose themselves as MCP
servers or A2A endpoints.

## Feature flags

| Flag | Adds | Default |
|---|---|---|
| `local` | `tools`, `macros`, `llm-ollama`, `memory-sqlite`, `bus-memory` | **on** |
| `all-foundation` | `tools`, `macros`, `llm-ollama`, `memory-sqlite`, `bus-memory`, `bus-nats`, `mcp` | off |
| `all-llm` | `llm-openai`, `llm-anthropic`, `llm-gemini` (+ `llm-ollama`) | off |
| `all-memory` | `memory-sqlite`, `memory-neo4j`, `memory-qdrant`, `embed-common` | off |
| `all-observability` | `runlog`, `otel`, `provenance` | off |
| `full` | All flags above | off |

## Quickstart

```toml
[dependencies]
klieo = { version = "0.38", features = ["full"] }
tokio = { version = "1", features = ["full"] }
anyhow = "1"
```

```rust
use klieo::prelude::*;

#[klieo::tool(description = "Returns a greeting.")]
async fn greet(_ctx: &ToolCtx, name: String) -> Result<String, ToolError> {
    Ok(format!("Hello, {name}!"))
}

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let app = App::local_at("klieo.db")
        .tool(GreetTool)
        .build()
        .await?;
    let agent = SimpleAgent::new("greeter", "Be helpful.", app.tools_catalogue().to_vec());
    let reply = app.run(&agent, "say hi to Alex".into()).await?;
    println!("{reply}");
    Ok(())
}
```

## Crate catalogue

| Crate | Purpose |
|---|---|
| [`klieo-core`]https://docs.rs/klieo-core | Trait surface: Agent, Tool, LlmClient, memory, bus |
| [`klieo-mcp-server`]https://docs.rs/klieo-mcp-server | Expose tools as an MCP server over stdio or HTTP |
| [`klieo-a2a`]https://docs.rs/klieo-a2a | Durable A2A v1.0 protocol over NATS |
| [`klieo-bus-nats`]https://docs.rs/klieo-bus-nats | Production NATS JetStream bus |
| [`klieo-bus-memory`]https://docs.rs/klieo-bus-memory | In-process bus for dev and testing |
| [`klieo-llm-ollama`]https://docs.rs/klieo-llm-ollama | Local Ollama LLM client |
| [`klieo-llm-openai`]https://docs.rs/klieo-llm-openai | OpenAI Chat Completions |
| [`klieo-llm-anthropic`]https://docs.rs/klieo-llm-anthropic | Anthropic Messages API |
| [`klieo-llm-gemini`]https://docs.rs/klieo-llm-gemini | Google Gemini |
| [`klieo-memory-sqlite`]https://docs.rs/klieo-memory-sqlite | SQLite memory backends |
| [`klieo-memory-qdrant`]https://docs.rs/klieo-memory-qdrant | Qdrant vector memory |
| [`klieo-memory-neo4j`]https://docs.rs/klieo-memory-neo4j | Neo4j graph memory |
| [`klieo-flows`]https://docs.rs/klieo-flows | Multi-agent composition |
| [`klieo-ops`]https://docs.rs/klieo-ops | Production operations layer |

## Resources

- [API docs]https://docs.rs/klieo
- [User guide]https://github.com/mohrimic/klieo/tree/main/docs/book
- [SEMVER policy]https://github.com/mohrimic/klieo/blob/main/docs/SEMVER.md

## Status

`0.38.x` — pre-1.0; patch releases are backward-compatible, minor releases
may add public items. See [`docs/SEMVER.md`](https://github.com/mohrimic/klieo/blob/main/docs/SEMVER.md).

## License

MIT — see [`LICENSE`](https://github.com/mohrimic/klieo/blob/main/LICENSE).