Adding Tools & Agent Roles
How to extend M31A with new capabilities or agent personas.
Adding a New Tool
- Implement the
TypedTooltrait insrc/tools/. - Define input arguments with
serde::Deserialize. - Specify required capabilities and risk classification.
- Register the tool in
ToolRegistry::new_defaultorregister_extended_tools. - Add unit tests verifying policy gate enforcement.
Adding an Agent Role
- Add role identifier to
src/state_machine/agent.rs. - Define role profile in
src/agent/registry/builtins.rswith model policy, context limits, and capability envelope. - Add corresponding prompt template in
prompts/agents/. - Register role in
RoleRegistry.