Build custom agents, extend tool capabilities, and integrate with the Matrix execution pipeline. The stack exposes typed APIs for every layer: cognition, memory, tool dispatch, and on-chain settlement.
Custom Tool Definitions
Register custom MCP tools that Neo and MCL agents can invoke. Tools are defined as JSON schemas and executed in sandboxed environments with full lifecycle management.
Read and write to the per-actor memory graph. Cortex stores typed observations, entity relationships, and conversation summaries with Merkle-anchored integrity proofs.
// Write observations to cortex
POST /v1/cortex/write
{
"actor_id": "neo-prod-01",
"observations": [
{
"type": "note",
"namespace": "matrix://knowledge/neo",
"content": "User prefers TypeScript over Python for backend services",
"tags": ["preference", "language"]
},
{
"type": "entity",
"namespace": "matrix://entities/users",
"content": {
"name": "Andrew",
"role": "core-team",
"org": "PaxLabs"
}
}
]
}
// Query cortex with structured search
GET /v1/cortex/query?actor_id=neo-prod-01&namespace=matrix://knowledge/neo&limit=50
// Response includes Merkle proof for integrity verification
{
"observations": [...],
"proof": {
"root": "0x7a3f...",
"path": ["0xb2c1...", "0x9d4e..."],
"snapshot_seq": 1847
}
}
Agent Orchestration
Spawn and coordinate sub-agents for parallel task execution. The orchestrator manages lifecycle, resource limits, and result aggregation across agent fleets.
The Executor manages the full lifecycle from plan creation through tool dispatch to result aggregation. Configure webhooks to receive execution events in your own infrastructure.