Skip to main content

Crate rig_compose

Crate rig_compose 

Source
Expand description

§rig-compose

Composable agent kernel for rig (and any rig-shaped tool surface): stateless skills, transport-agnostic tools, registry-driven agents, and a signal-routing coordinator.

Originally extracted from Azreal’s threat-detection kernel, this crate is now domain-neutral and can wrap any tool/agent stack.

§Composability rules

  1. Skill is stateless. Any skill can be assigned to any Agent.
  2. Tool is the only side-effectful interface. Local impls and remote transports (see rig-mcp) share the trait; skills cannot tell them apart.
  3. Agent holds a slice of the global registries — it never hard-codes skill or tool names.
  4. Workflow composes agents. The CoordinatorAgent is one workflow primitive; specialist routing is another configuration of it.

Re-exports§

pub use agent::Agent;
pub use agent::AgentId;
pub use agent::AgentStepResult;
pub use agent::GenericAgent;
pub use agent::GenericAgentBuilder;
pub use context::Evidence;
pub use context::InvestigationContext;
pub use context::NextAction;
pub use context::Signal;
pub use coordinator::CoordinatorAgent;
pub use coordinator::CoordinatorBuilder;
pub use coordinator::RoutingRule;
pub use delegate::DelegateExecutor;
pub use delegate::DelegateName;
pub use delegate::DelegateRegistry;
pub use delegate::DelegateTool;
pub use delegate::InProcessAgentDelegate;
pub use instructions::Instructions;
pub use registry::KernelError;
pub use registry::SkillRegistry;
pub use registry::ToolRegistry;
pub use skill::Skill;
pub use skill::SkillId;
pub use skill::SkillOutcome;
pub use tool::LocalTool;
pub use tool::Tool;
pub use tool::ToolName;
pub use tool::ToolSchema;
pub use workflow::Workflow;

Modules§

agent
Agent — composes a SkillRegistry slice and a scoped ToolRegistry to drive an investigation.
context
InvestigationContext — the runtime object that flows through every super::Skill in an agent step.
coordinator
CoordinatorAgent — routes an investigation to the first registered specialist whose signal tag matches the context.
delegate
Agent delegation primitives.
instructions
Agent persona / instruction set.
registry
ToolRegistry and SkillRegistry — composition surfaces.
skill
Skill — a stateless, composable reasoning unit.
tool
Tool — the only side-effectful interface available to skills and agents.
workflow
Workflow — composes one or more super::Agents into a higher-level orchestration unit (e.g. the Overseer’s block-stream pump, or the Phase-5 coordinator/specialist routing).