Skip to main content

oharness_loop/
lib.rs

1//! Agent + `Loop` trait + shipped loops.
2//!
3//! Shipped loops are feature-gated:
4//! - `react` (default): [`ReactLoop`] — thought → action → observation.
5//! - `conversation`: [`ConversationLoop`] — alternates agent + user simulator.
6//! - `reflexion`: [`run_reflexion`] helper (not a `Loop` impl).
7
8pub mod agent;
9pub mod config;
10pub mod loop_trait;
11pub mod user_simulator;
12
13#[cfg(feature = "react")]
14pub mod react;
15
16#[cfg(feature = "conversation")]
17pub mod conversation;
18
19#[cfg(feature = "reflexion")]
20pub mod reflexion;
21
22pub use agent::{Agent, AgentBuilder};
23pub use config::AgentConfig;
24pub use loop_trait::{Loop, LoopContext};
25pub use user_simulator::{
26    LlmUserSimulator, ScriptedUserSimulator, UserAction, UserError, UserSimulator,
27};
28
29#[cfg(feature = "react")]
30pub use react::ReactLoop;
31
32#[cfg(feature = "conversation")]
33pub use conversation::ConversationLoop;
34
35#[cfg(feature = "reflexion")]
36pub use reflexion::run_reflexion;
37
38pub use oharness_core::AgentError;