Skip to main content

troupekit_kit/
lib.rs

1#![doc(
2    html_logo_url = "https://raw.githubusercontent.com/ChaoticQubit/troupekit/main/assets/brand/logo-mark.svg",
3    html_favicon_url = "https://raw.githubusercontent.com/ChaoticQubit/troupekit/main/assets/brand/favicon.svg"
4)]
5
6mod agent;
7mod built;
8mod error;
9mod graph;
10#[cfg(feature = "knowledge")]
11pub mod knowledge;
12mod laws;
13#[cfg(feature = "knowledge")]
14mod memory;
15mod model;
16mod output;
17mod route;
18mod storage;
19mod tool;
20mod trace;
21
22#[doc(hidden)]
23pub mod __private;
24
25pub use agent::{Agent, MAX_PERSONA_BYTES};
26pub use built::{
27    BuiltAgent, Input, Progress, RunOutcome, RunStream, StreamSettings, MAX_STEPS_PER_WINDOW,
28};
29pub use error::KitError;
30pub use graph::{BuiltGraph, Graph, GraphReport};
31#[cfg(feature = "knowledge")]
32pub use knowledge::Knowledge;
33pub use laws::Laws;
34#[cfg(feature = "knowledge")]
35pub use memory::AgentMemory;
36pub use output::{IntoToolOutput, Json};
37pub use storage::Storage;
38pub use tool::{tool, AsTool};
39pub use troupekit_macros::{agent, tool};
40pub use troupekit_tools::{Tool, ToolContext, ToolOutput};
41
42/// The names most programs need, for `use troupekit::prelude::*;`.
43/// Builder, built agent, outcome, storage, laws, errors and tools.
44/// `AsTool`, `IntoToolOutput` and `Input` stay at the crate root.
45pub mod prelude {
46    pub use crate::{
47        agent, tool, Agent, BuiltAgent, BuiltGraph, Graph, Json, KitError, Laws, RunOutcome,
48        Storage,
49    };
50    #[cfg(feature = "knowledge")]
51    pub use crate::{AgentMemory, Knowledge};
52    pub use troupekit_trace::Trace;
53}
54
55#[cfg(feature = "local")]
56mod local;
57#[cfg(feature = "local")]
58pub use local::LocalChoice;