Expand description
klieo — open-source Rust agent framework.
This umbrella crate re-exports klieo_core unconditionally and
exposes each implementation crate behind a Cargo feature flag so
users can start with just the trait surfaces and opt into concrete
implementations one at a time.
§Quickstart
Add to Cargo.toml:
[dependencies]
klieo = { version = "0.1", features = ["all-foundation"] }Then build an agent:
use klieo::{RunOptions, Error};
let opts = RunOptions::default();
let _ = opts;§Feature flags
§Foundation
| Feature | Crate enabled |
|---|---|
| (none) | klieo-core trait surfaces only |
tools | klieo-tools — ChainedInvoker, schema validation |
macros | klieo-macros — #[tool] proc-macro |
llm-ollama | klieo-llm-ollama — Ollama HTTP client |
memory-sqlite | klieo-memory-sqlite — SQLite-backed memory |
bus-memory | klieo-bus-memory — in-process bus |
bus-nats | klieo-bus-nats — NATS JetStream bus |
mcp | klieo-tools-mcp — MCP adapter (implies tools) |
all-foundation | All foundation features above |
§LLM providers
| Feature | Crate enabled |
|---|---|
llm-openai | klieo-llm-openai |
llm-anthropic | klieo-llm-anthropic |
llm-genai | klieo-llm-genai (Google Gemini) |
all-llm | All LLM providers (incl. Ollama) |
§Memory backends
| Feature | Crate enabled |
|---|---|
memory-neo4j | klieo-memory-neo4j |
memory-qdrant | klieo-memory-qdrant |
embed-common | klieo-embed-common — shared Embedder trait |
memory-fastembed | memory-sqlite + real CPU embeddings |
memory-sqlite-vec | memory-sqlite + k-NN sqlite-vec index |
all-memory | All memory backends |
§Composition + protocol
| Feature | Crate enabled |
|---|---|
flows | klieo-flows — Sequential/Parallel/Loop/Graph |
a2a | klieo-a2a — durable Agent-to-Agent v1.0 |
spec | klieo-spec — quality-loop runner |
§Observability + provenance
| Feature | Crate enabled |
|---|---|
runlog | klieo-runlog — RunLog projection + replay |
runlog-sqlite | runlog + SQLite store |
runlog-compaction-llm | runlog + LLM-summarise compaction |
provenance | klieo-provenance — Merkle hash chain |
otel | klieo-otel — OpenTelemetry OTLP exporter |
all-observability | runlog + provenance + otel |
§Aggregates
| Feature | Enables |
|---|---|
full | Every impl crate — heavy build, for integration tests |
test-utils | klieo-core/test-utils for downstream test deps |
Modules§
- agent
- Re-exports every public item from
klieo-core.Agenttrait andAgentContext. - bus
- Re-exports every public item from
klieo-core. Inter-agent bus traits — Pubsub, RequestReply, KvStore, JobQueue. - error
- Re-exports every public item from
klieo-core. Error types used acrossklieo-core. - guardrail
- Re-exports every public item from
klieo-core. Pre/post-LLM validation hooks for refuse + handoff workflows. - ids
- Re-exports every public item from
klieo-core. Strongly-typed IDs used throughout the framework. - llm
- Re-exports every public item from
klieo-core. LLM client trait and request/response types. - memory
- Re-exports every public item from
klieo-core. Memory traits — short-term, long-term, episodic. - rate_
limit - Re-exports every public item from
klieo-core. Client-side token-bucket rate limiter for anyLlmClient. - response
- Re-exports every public item from
klieo-core. Typed structured-output trait + parser. - runtime
- Re-exports every public item from
klieo-core. Runtime loop driving ancrate::agent::Agentthrough LLM ↔ tool exchanges. - summarize
- Re-exports every public item from
klieo-core. Rolling LLM-summary checkpoint for bounding conversation context cost. - tool
- Re-exports every public item from
klieo-core. Tool trait, invoker, and tool context.
Structs§
- AckHandle
- Re-exports every public item from
klieo-core. Acknowledgement handle attached to a deliveredMsg. - Agent
Context - Re-exports every public item from
klieo-core. Borrow-free agent execution context. HoldsArc<dyn …>so it can be cloned freely acrosstokio::spawnboundaries ('staticrequirement). - Capabilities
- Re-exports every public item from
klieo-core. Provider capability declaration. - Capabilities
Builder - Re-exports every public item from
klieo-core. Fluent builder forCapabilities. Build viaCapabilities::builder. - Chat
Chunk - Re-exports every public item from
klieo-core. One chunk of a streaming response. - Chat
Request - Re-exports every public item from
klieo-core. Chat completion request. - Chat
Response - Re-exports every public item from
klieo-core. Chat completion response. - Claim
Handle - Re-exports every public item from
klieo-core. Handle the impl uses to resolve a claim. - Claimed
Job - Re-exports every public item from
klieo-core. Job claimed by a worker. - Durable
Name - Re-exports every public item from
klieo-core. Durable consumer name for a JetStream-style subscription. - Fact
- Re-exports every public item from
klieo-core. One stored fact in long-term memory. - FactId
- Re-exports every public item from
klieo-core. Identifier for a stored fact inLongTermMemory. - Job
- Re-exports every public item from
klieo-core. Job enqueued for durable processing. - JobId
- Re-exports every public item from
klieo-core. Identifier for an enqueued job inJobQueue. - KvEntry
- Re-exports every public item from
klieo-core. One KV entry. - Lease
- Re-exports every public item from
klieo-core. Lease handle. Heartbeat to extend; drop to release. - MaxResponse
Length Guardrail - Re-exports every public item from
klieo-core. Refuses if the assistant response content is longer thanmax_charscharacters. - Message
- Re-exports every public item from
klieo-core. One message in a chat conversation. - Msg
- Re-exports every public item from
klieo-core. One message delivered to a subscriber. - Refusal
Keyword Guardrail - Re-exports every public item from
klieo-core. Refuses if any deny-keyword (case-insensitive) appears in the outgoing user message or the assistant response content. - RunFilter
- Re-exports every public item from
klieo-core. Filter passed toEpisodicMemory::list_runs. - RunId
- Re-exports every public item from
klieo-core. Unique identifier for a single agent run. - RunOptions
- Re-exports every public item from
klieo-core. Tunables forsuper::run_stepsandsuper::run_steps_streaming. - RunSummary
- Re-exports every public item from
klieo-core. Index-row summary returned bylist_runs. - Summarize
Options - Re-exports every public item from
klieo-core. Tunables forsummarize_history. - Thread
Id - Re-exports every public item from
klieo-core. Identifies a conversation thread for short-term memory scoping. - Tool
Call - Re-exports every public item from
klieo-core. One tool call requested by the assistant. - ToolCtx
- Re-exports every public item from
klieo-core. Narrowed slice ofAgentContext(seeagent.rs) passed to tools. - ToolDef
- Re-exports every public item from
klieo-core. Tool catalogue entry shown to the LLM. - Usage
- Re-exports every public item from
klieo-core. Token usage report.
Enums§
- BusError
- Re-exports every public item from
klieo-core. Inter-agent bus errors. - Config
Error - Re-exports every public item from
klieo-core. Configuration validation errors. - Episode
- Re-exports every public item from
klieo-core. One event in the episodic event stream of a single agent run. - Error
- Re-exports every public item from
klieo-core. Top-level error returned byklieo-coreruntime calls. - Finish
Reason - Re-exports every public item from
klieo-core. Reason the provider stopped generating. - Guardrail
Outcome - Re-exports every public item from
klieo-core. Validator outcome returned byGuardrail::pre_llmandGuardrail::post_llm. - LlmError
- Re-exports every public item from
klieo-core. LLM provider errors. - Memory
Error - Re-exports every public item from
klieo-core. Memory persistence errors. - Response
Format - Re-exports every public item from
klieo-core. Output format hint passed to the provider. - Role
- Re-exports every public item from
klieo-core. Speaker role. - Scope
- Re-exports every public item from
klieo-core. Namespacing for long-term memory facts. - Tool
Error - Re-exports every public item from
klieo-core. Tool invocation errors. - Tool
Result - Re-exports every public item from
klieo-core. Outcome of a tool invocation as recorded in the episodic event stream.
Traits§
- AckHandle
Impl - Re-exports every public item from
klieo-core. Implementor side of an ack handle. Exposed so impls can supply backend behaviour without callers reaching into private types. - Agent
- Re-exports every public item from
klieo-core. One agent — a typed function fromInputtoOutputplus prompt configuration. - Claim
Handle Impl - Re-exports every public item from
klieo-core. Implementor side of a claim handle. - Episodic
Memory - Re-exports every public item from
klieo-core. Append-only event log of agent runs. - Guardrail
- Re-exports every public item from
klieo-core. Pre/post-LLM validator. Implementors decide whether to allow, refuse, or hand off based on the outgoing request and incoming response. - JobQueue
- Re-exports every public item from
klieo-core. Durable competing-consumer job queue. No ordering guarantee — workloads requiring order must usePubsubon a partitioned subject with one consumer per partition instead. - Klieo
Response - Re-exports every public item from
klieo-core. Trait implemented by types that can be parsed from a structured LLM response. - KvStore
- Re-exports every public item from
klieo-core. Bucket-keyed durable KV store with CAS. - Lease
Impl - Re-exports every public item from
klieo-core. Implementor side of a lease. - LlmClient
- Re-exports every public item from
klieo-core. LLM provider trait. - Long
Term Memory - Re-exports every public item from
klieo-core. Long-term semantic memory. - Pubsub
- Re-exports every public item from
klieo-core. Pub/sub interface (subject-based, durable consumers). - Request
Reply - Re-exports every public item from
klieo-core. Synchronous request/response over the bus. - Short
Term Memory - Re-exports every public item from
klieo-core. Conversation buffer scoped to a single thread. - Tool
- Re-exports every public item from
klieo-core. One executable tool. - Tool
Invoker - Re-exports every public item from
klieo-core. Dispatches tool calls by name.
Functions§
- parse_
structured - Re-exports every public item from
klieo-core. Parse an LLM reply (raw text content) into a typedT. - run_
steps - Re-exports every public item from
klieo-core. Drive the agent’s LLM/tool loop until completion. Caller is responsible for appending the user message before invoking — this function only consumes / extends short-term memory. - run_
steps_ streaming - Re-exports every public item from
klieo-core. Drive the agent’s LLM/tool loop the same waysuper::run_stepsdoes, but expose the underlying provider chunks as they arrive. - summarize_
history - Re-exports every public item from
klieo-core. Run a rolling summarization checkpoint against the thread’s short-term history.
Type Aliases§
- Chunk
Stream - Re-exports every public item from
klieo-core. Streaming response handle. - Embedding
- Re-exports every public item from
klieo-core. Vector embedding for one input text. - Headers
- Re-exports every public item from
klieo-core. Opaque headers accompanying a bus message. - MsgStream
- Re-exports every public item from
klieo-core. Stream of messages delivered to a subscriber. - Revision
- Re-exports every public item from
klieo-core. CAS revision returned by KV writes.