behest
Rust-native building blocks for production AI agent runtimes
What this is
behest provides provider-neutral contracts for chat, streaming, tool calling, embeddings, runtime execution, storage, queues, RAG, observability, and optional gRPC serving.
It is designed for systems that need explicit control over model providers, tool execution, persistence, and operational boundaries — instead of opaque "agent framework" magic.
Status: early foundation crate. Public APIs are intentionally compact, strongly typed, and documented.
Why behest
behest /bɪˈhest/ — n. a person's orders or command.
At the behest of the user, the agent acts.
The core of an agent runtime is not "autonomous consciousness" but controlled delegation: the user issues an intent, and the system composes context, invokes models, executes tools, persists state, publishes events within explicit boundaries — auditable, recoverable, constrainable, and replaceable.
The name behest deliberately avoids inflated metaphors like "brain / cognition / intelligence". It only states an engineering fact:
tool-calling, streaming, memory, queue, RAG, snapshot — all mechanisms exist because someone gave an order.
Design goals
- Rust-native first: typed APIs, explicit errors, no hidden runtime assumptions.
- Provider-neutral core: OpenAI, Anthropic, local models, proxies, or internal providers can implement the same contracts.
- Streaming-first runtime: the agent loop is designed around streamed model events, with non-streaming fallback where appropriate.
- Typed tool boundary: tools are described by JSON Schema and executed through explicit registries.
- Pluggable persistence: memory by default, external stores behind feature flags.
- Operational surface: event publishing, snapshots, session gates, compaction, retry policy, and optional gRPC server.
- Small public API: foundation primitives over framework sprawl.
Quick start
Create a provider-neutral chat request:
Register providers in a registry and route requests:
What's inside
Documentation
- Getting Started - Installation and basic usage
- Providers - Provider adapters and custom implementations
- Tools - Tool definition and execution
- Sessions - Session management and conversation state
- Storage - Storage backends and persistence
- Configuration - Configuration options and layers
- Error Handling - Typed error categories
- Examples - Practical code examples
- Architecture - Runtime model and design
- RAG - Retrieval-Augmented Generation
- Events - Event system and observability
- Feature Flags - Available feature flags
- API Reference - Core types and traits
- Development - Development setup and contribution guide
License
Licensed under either of:
- Apache License, Version 2.0
- MIT license
at your option.