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 Azrael’s threat-detection kernel, this crate is now domain-neutral and can wrap any tool/agent stack.
§Composability rules
Skillis stateless. Any skill can be assigned to anyAgent.Toolis the only side-effectful interface. Local impls and remote transports (seerig-mcp) share the trait; skills cannot tell them apart.Agentholds a slice of the global registries — it never hard-codes skill or tool names.Workflowcomposes agents.
§Two paths for agent-to-agent delegation
rig-compose ships two complementary delegation primitives. Pick the one that matches who should decide when a peer agent is invoked.
Default — delegate::DelegateTool (model-driven, agentic).
A child agent is exposed as a normal Tool. The parent agent’s
model decides when to call it, just like any other tool. This is the
recommended path for autonomous agent-to-agent collaboration, because
the topology stays open and transport-symmetric: the same tool call
works whether the peer runs in-process via
delegate::InProcessAgentDelegate or behind an MCP server via
rig_mcp::McpTool.
Optional — coordinator::CoordinatorAgent (deterministic, host-driven).
A signal-tag router that hops to the first matching specialist with
no model in the loop. Reach for it only when the routing topology is
fixed up-front and you specifically want a free dispatch hop —
typical use is an overseer that fans one specialist out per partition
before any LLM has loaded. Not a substitute for DelegateTool when
you want the agents to choose how they cooperate.
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 aSkillRegistryslice and a scopedToolRegistryto drive an investigation.- context
InvestigationContext— the runtime object that flows through everysuper::Skillin an agent step.- coordinator
- Deterministic, no-LLM signal-tag router. See the crate-level
“Two paths for agent-to-agent delegation” section: prefer
delegate::DelegateToolfor model-driven peer collaboration and reach forcoordinator::CoordinatorAgentonly when the topology is fixed and a free dispatch hop matters.CoordinatorAgent— deterministic signal-tag router. Routes an investigation to the first registered specialist whose signal tag matches the context, with no model in the loop. - delegate
- Model-driven, transport-agnostic agent delegation. The default path for autonomous agent-to-agent collaboration. See the crate-level “Two paths for agent-to-agent delegation” section. Agent delegation primitives — the default path for agent-to-agent collaboration.
- instructions
- Agent persona / instruction set.
- registry
ToolRegistryandSkillRegistry— 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 moresuper::Agents into a higher-level orchestration unit (e.g. the Overseer’s block-stream pump, or the Phase-5 coordinator/specialist routing).