Skip to main content

modular_agent_core/
lib.rs

1#![recursion_limit = "256"]
2//! Modular Agent Core - A crate for building modular multi-agents intelligent systems.
3//!
4//! This crate provides a set of tools and abstractions to create, configure, and run agents
5//! in a stream-based architecture. It includes support for defining agent behaviors, managing
6//! agent flows, handling agent input and output.
7
8mod agent;
9mod board_agent;
10mod config;
11mod context;
12mod definition;
13mod error;
14mod id;
15mod modular_agent;
16mod message;
17mod output;
18mod preset;
19mod registry;
20mod runtime;
21mod spec;
22mod value;
23
24#[cfg(feature = "llm")]
25pub mod llm;
26pub mod tool;
27
28#[cfg(feature = "mcp")]
29pub mod mcp;
30
31#[cfg(feature = "test-utils")]
32pub mod test_utils;
33
34// re-export async_trait
35pub use async_trait::async_trait;
36
37// re-export photon_rs
38#[cfg(feature = "image")]
39pub use photon_rs::{self, PhotonImage};
40
41// re-export im
42pub use im;
43
44// re-export inventory
45pub use inventory;
46
47// re-export FnvIndexMap
48pub use fnv;
49pub use indexmap;
50pub type FnvIndexMap<K, V> = indexmap::IndexMap<K, V, fnv::FnvBuildHasher>;
51pub type FnvIndexSet<T> = indexmap::IndexSet<T, fnv::FnvBuildHasher>;
52
53// Re-export the crate under its canonical name for proc-macros.
54pub extern crate self as modular_agent_core;
55
56// Re-exports modular_agent_macros
57pub use modular_agent_macros::modular_agent;
58
59pub use agent::{Agent, AgentData, AgentStatus, AsAgent, HasAgentData, agent_new, new_agent_boxed};
60pub use config::{AgentConfigs, AgentConfigsMap};
61pub use context::AgentContext;
62pub use definition::{AgentConfigSpec, AgentConfigSpecs, AgentDefinition, AgentDefinitions};
63pub use error::AgentError;
64pub use llm::{Message, ToolCall, ToolCallFunction};
65pub use modular_agent::{ModularAgent, MAKEvent};
66pub use output::AgentOutput;
67pub use preset::{Preset, PresetInfo};
68pub use registry::AgentRegistration;
69pub use spec::{AgentSpec, ConnectionSpec, PresetSpec, PresetSpecs};
70pub use value::{AgentValue, AgentValueMap};