Skip to main content

agentcarousel/
lib.rs

1//! Evaluate agents and skills from YAML/TOML fixtures, run cases with mocks or live
2//! backends, persist runs to SQLite, and export evidence for reporting or registry upload.
3//!
4//! # Audience
5//!
6//! - **CLI users** — run the [`agentcarousel`](crate::cli::Cli) or `agc` binary for
7//!   `validate`, `test`, `eval`, `report`, `bundle`, `publish`, `export`, and `trust-check`.
8//! - **Library embedders** — use [`runner`] to execute fixtures programmatically,
9//!   [`fixtures`] to load them, [`evaluators`] for scoring, [`reporters`] for output, and
10//!   [`core`] for shared types ([`Run`], [`Case`], [`FixtureFile`], …).
11//!
12//! # Crate layout
13//!
14//! | Module | Role |
15//! |--------|------|
16//! | [`cli`] | Clap-based CLI; [`cli::run`] is the process entrypoint. |
17//! | [`core`] | Serializable models, errors, and judge provider helpers. |
18//! | [`runner`] | Async execution: [`runner::run_fixtures`], [`runner::run_eval`]. |
19//! | [`evaluators`] | Rules, golden, process, and LLM judge evaluators. |
20//! | [`fixtures`] | Load and validate fixtures; [`fixtures::MockEngine`] for stubbed tool/LLM responses. |
21//! | [`reporters`] | Terminal, JSON, JUnit, history persistence, and run diffs. |
22//!
23//! # Quick start (CLI)
24//!
25//! ```text
26//! agentcarousel validate path/to/fixture.yaml
27//! agentcarousel test path/to/fixture.yaml --offline true
28//! ```
29//!
30//! Install and full options are described in the repository README and on
31//! [docs.rs](https://docs.rs/agentcarousel) for this crate version.
32//!
33//! # Library quick start
34//!
35//! Typical flow: load fixtures with [`fixtures::load_fixture`], build [`runner::RunnerConfig`]
36//! or [`runner::EvalConfig`], then call [`runner::run_fixtures`] or [`runner::run_eval`]
37//! inside a [`tokio`] runtime. See [`runner`] for configuration fields.
38//!
39//! [`Run`]: crate::core::Run
40//! [`Case`]: crate::core::Case
41//! [`FixtureFile`]: crate::core::FixtureFile
42//! [`tokio`]: https://docs.rs/tokio
43
44pub mod cli;
45pub mod core;
46pub mod evaluators;
47pub mod fixtures;
48pub mod reporters;
49pub mod runner;
50
51pub use cli::*;
52pub use core::*;
53pub use evaluators::*;
54pub use fixtures::*;
55pub use reporters::*;
56pub use runner::*;
57
58extern crate self as agentcarousel_cli;
59extern crate self as agentcarousel_core;
60extern crate self as agentcarousel_evaluators;
61extern crate self as agentcarousel_fixtures;
62extern crate self as agentcarousel_reporters;
63extern crate self as agentcarousel_runner;