MAP Docs
MAT

Internals

Crate path, key types, adjacent protocols for MAT.

MAT (Multi-Agentic Tool · Task Allocation) lives in protocols/mat-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

PathContains
protocols/mat-lib/src/lib.rsProtocolModule impl, operation dispatch
protocols/mat-lib/src/protocol.rscore protocol logic
protocols/mat-lib/src/types.rsrequest/response types (derive schemars::JsonSchema)
protocols/mat-lib/tests/unit + integration tests
schemas/mat/v1/published JSON Schemas

ProtocolModule contract

impl ProtocolModule for MatProtocol {
    fn protocol_name(&self) -> &'static str { "MAT" }
    fn version(&self) -> &'static str { "v1.0.0" }

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "tool",
            "tool_discovery",
            "tool_workflow_execute",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "tool" => self.tool(payload, ctx).await,
            "tool_discovery" => self.tool_discovery(payload, ctx).await,
            "tool_workflow_execute" => self.tool_workflow_execute(payload, ctx).await,
            _ => Err(ProtocolError::UnknownOperation(op.into())),
        }
    }
}

Adjacent

RelationMembers
Consults
Records toMAX · MOTET · MOMENT
Subject toMAXIM · MOAT (cross-org) · MOOT (disputes)
Settled withMEAL · MANA · MADE

Status

Implemented · production-grade.

Tests

cargo test -p mat-lib --all-features

See also

On this page