Skip to main content

troupekit_agent/
lib.rs

1//! Persona TOML agents for Troupekit: a layered persona loader with strict
2//! validation, and `AgentRun`, a serializable state machine the host steps
3//! and checkpoints, with concurrent allowed tools, typed output, evals with
4//! one repair round, layered budgets and core events.
5
6#![doc(
7    html_logo_url = "https://raw.githubusercontent.com/ChaoticQubit/troupekit/main/assets/brand/logo-mark.svg",
8    html_favicon_url = "https://raw.githubusercontent.com/ChaoticQubit/troupekit/main/assets/brand/favicon.svg"
9)]
10
11pub mod budget;
12pub mod dsl;
13pub mod error;
14pub mod eval;
15pub mod io;
16pub mod loader;
17pub mod persona;
18pub mod run;
19pub mod schema;
20
21pub use io::{AgentIo, EventSink, ModelHandle, SimpleIo, VecSink};
22pub use run::{drive, AgentRun, PendingCall, RunState, StepOutcome, RUN_FORMAT};
23
24pub use budget::{InMemoryLedger, Limits, PeriodLimit, UsageLedger};
25pub use dsl::{parse_call, Call};
26pub use error::{AgentError, PersonaError};
27pub use eval::{EvalFn, EvalRegistry};
28pub use loader::{builtin, DirSource, MemorySource, PersonaLoader, PersonaSource};
29pub use persona::{Budget, Persona, DEFAULT_MAX_TOKENS, DEFAULT_MAX_TURNS};
30pub use schema::{compile_output, validate};