MAP Docs
MAGI

Internals

Crate path, key types, adjacent protocols for MAGI.

MAGI (Multi-Agentic Glass-box Interpretation) lives in protocols/magi-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "trace",
            "attribute",
            "circuit",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "trace" => self.trace(payload, ctx).await,
            "attribute" => self.attribute(payload, ctx).await,
            "circuit" => self.circuit(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

Partial · core methods implemented; some features pending.

Tests

cargo test -p magi-lib --all-features

See also

On this page