Brain + Muscle Pattern
The Brain + Muscle pattern is the key architectural insight behind aiconn: put the conversational intelligence at the edge (Meridian = brain) and offload compute-intensive work to dedicated Rust services (Cortex = muscle).
Why it works
Cloudflare Workers excel at stateful conversations, request routing, and low-latency responses. They run in 200+ data centers globally and start in under 5ms. But they’re limited to 128MB memory and short CPU time windows.
Cortex agents are native Rust binaries. They can use gigabytes of memory, run for minutes, embed local models, and fan out to dozens of sub-agents. They run on your servers, not at the edge.
MCP (Model Context Protocol) bridges them: Meridian discovers Cortex tools over HTTP and calls them as if they were local functions.
Example: research assistant
User: "Find everything about our Q4 roadmap and summarize it"
│
▼
Meridian (Workers)
├── memory_search("Q4 roadmap") → Engram returns 47 relevant docs
└── summarize_documents(docs) → MCP call to Cortex
│
Cortex AgentEngine
├── chunk_documents(47 docs)
├── extract_themes(chunks)
└── generate_summary(themes) → returns 800 word summary
│
▼
Meridian synthesizes + replies to user
Meridian stores conversation in Engram Setting it up
Cortex side — expose as MCP server:
McpServer::new(agent)
.bind("0.0.0.0:3100")
.serve()
.await?; Meridian side — connect the MCP tool:
const agent = new MeridianAgent({
tools: [
MeridianAgent.mcpTool("https://cortex.internal:3100"),
],
}); That’s it. Meridian will call your Cortex agent whenever it determines the task requires it.