Modular Agent Core
A Rust framework for building modular multi-agent orchestration systems.
This crate provides tools and abstractions to create, configure, and run agents in a stream-based architecture. It supports defining agent behaviors, managing agent flows, and handling agent input/output through a channel-based messaging system.
Core Concepts
ModularAgent
[ModularAgent] is the central orchestrator that manages agent lifecycle, connections,
and message routing. It maintains agent instances, connection maps, and handles events.
Agents
Agents are processing units that receive messages via channels and process them
asynchronously. Implement the [AsAgent] trait to create custom agents, or use the
#[modular_agent] macro for declarative agent definitions.
Presets
Presets are collections of agents and their connections, defined in JSON format.
They can be loaded from files and managed via [ModularAgent] methods.
Quick Start
See the CLI example for a complete working example of loading a preset and running agents from the command line.
Feature Flags
file- File handling support (enabled by default)image- Image processing with photon-rs (enabled by default)llm- LLM integration with Message/ToolCall types (enabled by default)mcp- Model Context Protocol integration (enabled by default)test-utils- Testing utilities including TestProbeAgent