agnt_core/lib.rs
1//! # agnt-core
2//!
3//! The zero-I/O kernel of the agnt agent runtime. Defines the message types,
4//! tool trait, backend abstraction, persistence abstraction, observer hooks,
5//! and the synchronous agent loop itself — with no HTTP, no SQLite, and no
6//! async runtime dependencies.
7//!
8//! Users who want a working agent typically depend on the flagship [`agnt`]
9//! meta-crate which pulls in `agnt-net`, `agnt-store`, and `agnt-tools` as
10//! well. Users building custom backends, custom stores, or WASM targets can
11//! depend on `agnt-core` alone and wire up their own implementations of
12//! [`LlmBackend`] and [`MessageStore`].
13//!
14//! ## Architecture
15//!
16//! ```text
17//! agnt (flagship re-export)
18//! ├── agnt-core ← you are here
19//! ├── agnt-net (HTTP backend implementation)
20//! ├── agnt-store (SQLite message store implementation)
21//! └── agnt-tools (built-in tools: read_file, grep, fetch, etc.)
22//! ```
23//!
24//! [`agnt`]: https://crates.io/crates/agnt
25
26pub mod agent;
27pub mod backend_trait;
28pub mod builder;
29pub mod message;
30pub mod observer;
31pub mod store_trait;
32pub mod tool;
33
34pub use agent::Agent;
35pub use backend_trait::{BackendError, LlmBackend};
36pub use builder::AgentBuilder;
37pub use message::{FunctionCall, Message, ToolCall};
38pub use observer::{Observer, ToolResult};
39pub use store_trait::{MessageStore, StoreError, ToolLog};
40pub use tool::{ErasedAdapter, Registry, Tool, TypedTool};