Expand description
ARES agent library facade.
Downstream crates inject Execute, Tools, and Llm on a Cordis
Context and run an agent with no HTTP stack on the graph.
use ares_server::{Context, Execute, Tools, Llm};The ares-server binary (same package) binds the Axum router only when
the http feature is on, and ships only with http and cli. Default
features are the server defaults: postgres, openai, ares-vector, mcp,
inventory, rhai-policy, http, cli, script-tools. For an embed-only build
use default-features = false and pick the providers you need (e.g.
features = ["openai"]); no axum, clap, sqlx, ollama, boa, or rhai then
enters the graph.
Public surface: Context, Execute, Tools, Llm, Store
(postgres), Plugin, Loader, Dispatch, register_plugins.
Construct in-memory Llm with Llm::from_client for the library proof.
Modules§
- supervisor
- Daemon-side supervised-worker protocol: restart loop and child spawn. Daemon-side half of the supervised-worker protocol.
Structs§
- Agent
Config - Agent configuration binding a model to tools and behavior.
- Agent
Registry - Registry for managing agent configurations and creating agent instances
- Agent
Request - Request for unified agent execution.
- Agent
Response - Response from agent execution, including content and optional token usage
- Calculator
- Calculator tool for basic arithmetic operations.
- Calculator
Config - Empty config for CalculatorService. Default suffices; Serialize and Deserialize are required for Plugin Config via RegistryService.
- Calculator
Service - CalculatorService wraps Calculator for Cordis dependency injection.
- Context
- Conversation
Message - A message in a tool-calling conversation.
- Entry
- A single declarative loader entry.
- Events
Service - Execute
- Unified agent execution service — the single place handling:
- Execution
Metadata - Metadata about the execution of an agent
- Execution
Result - LLMResponse
- Response from an LLM generation call
- Llm
- Unified LLM capability composing provider registry, catalog, factory, and pool.
- Loader
- Declarative loader — diffs
EntryTrees incrementally. - Message
- A single message in a conversation.
- Plugin
Registry - Name-keyed directory of
PluginFactoryclosures. - Provider
Registry - Registry for managing multiple named LLM providers
- Tenant
Context - Token
Usage - Token usage statistics from an LLM generation call
- Tool
Call - A request to call a tool.
- Tool
Definition - Definition of a tool that can be called by an LLM.
- Tools
- Tenant-aware tool capability.
Enums§
- Agent
Source - Result of
Execute::runincluding resolution metadata. - AppError
- Application-wide error type.
- Cordis
Error - Dispatch
- Provider
Config - LLM provider configuration.
- Tenant
Tier
Traits§
- Context
Provider - Trait for injecting external context into agent calls.
- Disposable
- LLMClient
- Generic LLM client trait for provider abstraction
- Plugin
- A plugin is a declarative unit of configuration that can provide a service into a context. The registry calls apply to create the service value and then inserts it into the context with single-source discipline. The returned Arc is the live service instance that callers retrieve through ctx.get. Plain prose is used here to keep the docs readable and to avoid clever abstractions that would hide the simple flow of create then provide.
- RunTracker
- Trait for tracking active agent runs. Implemented by the root crate’s
ActiveRunsand injected intoExecutevia the Context. - Service
- Tool
- Trait for implementing tools that agents can invoke.
- Typed
Event - Compile-time binding between a catalog event and its payload type.
Functions§
- register_
plugins - Register capability-crate loader factories on
reg.
Type Aliases§
- FiberId
- Service
Init Future - Store
- Tenant database. Gated so
--no-default-featuresbuilds do not enable postgres.