MAGE
SDKs
Rust, TypeScript and HTTP for MAGE.
Every operation on MAGE is reachable from every shipped SDK plus the raw HTTP wire.
Rust
use map_sdk::Client;
use serde_json::json;
let client = Client::from_env()?;
let resp = client
.dispatch(
"MAGE",
"v1.0.0",
"draft",
json!({
"example": true
}),
)
.await?;
println!("{:#?}", resp);TypeScript
import { MapClient } from '@l1fe/map';
const map = new MapClient({
apiKey: process.env.MAP_API_KEY!,
agentDid: process.env.MAP_AGENT_DID!,
tenantId: 'org_acme'
});
const resp = await map.dispatch({
protocol: 'MAGE',
version: 'v1.0.0',
operation: 'draft',
input: {
"example": true
}
});HTTP wire
POST /v1/dispatch HTTP/2
Host: api.multiagentic.dev
Authorization: Bearer $MAP_API_KEY
X-Agent-Did: $MAP_AGENT_DID
X-Tenant-Id: org_acme
Content-Type: application/json
{
"protocol": "MAGE",
"version": "v1.0.0",
"operation": "draft",
"input": {
"example": true
},
"tenant_id": "org_acme"
}All operations
map.dispatch(...)with operation"draft"— Draft an artifact of a declared kind (charter, treaty, role spec, blueprint).map.dispatch(...)with operation"revise"— Revise an artifact under instructions; diff against prior version preserved.map.dispatch(...)with operation"publish"— Publish a final artifact to MARS for institutional citation.
See SDKs for client construction, retry, trace propagation.