Corelay Mesh — Documentation
corelay-dev/mesh · Architecture essay · Agent-Factory thesis
Packages
| Package |
Description |
README |
| @corelay/mesh-core |
Agent, Peer, Inbox, Capability, Workflow, PeerRegistry, run() |
README |
| @corelay/mesh-postgres |
Durable WorkflowStore, PostgresInbox, sweepStaleWorkflows |
README |
| @corelay/mesh-llm |
LLMRouter + OpenAI, Anthropic, Bedrock clients |
README |
| @corelay/mesh-coordination |
Critic, Debate, Hierarchy, HumanPeer |
README |
| @corelay/mesh-channels-whatsapp |
WhatsApp Cloud API channel adapter |
README |
| @corelay/mesh-observe |
Tracer interface + OpenTelemetry implementation |
README |
| @corelay/mesh-compose |
Authoring agent — compose(), approve(), reject(), createCriticAuthor() |
README |
| @corelay/mesh-eval |
Eval suites, LLM-judged scoring, deploy-gate thresholds, regression comparison |
README |
| @corelay/mesh-mcp |
MCP server — expose agents as tools for Claude Desktop / Cursor / ChatGPT |
README |
Examples
| Example |
Description |
| hello-agent |
Minimal: one agent, one LLM, one reply |
| traced-agent |
Same as hello-agent with OpenTelemetry spans |
| safevoice-triage |
Multi-agent society: triage + hierarchy + critic + WhatsApp + human handoff |
Guides
Coordination patterns
| Pattern |
What it does |
Package |
| Pipeline |
Linear sequence of peers |
Implicit (peer messaging) |
| Critic |
One agent challenges another’s output |
mesh-coordination |
| Debate |
N agents argue to a verdict |
mesh-coordination |
| Hierarchy |
Manager decomposes, workers execute, collector merges |
mesh-coordination |
| Human-in-the-Loop |
Human peer with escalation policy and timeout |
mesh-coordination |
Key concepts
- Peer — the addressing abstraction. Agents, humans, and channels are all peers.
- Inbox — durable, ordered queue for messages to a peer. Memory or Postgres.
- Capability — permissioned declaration of what an agent can do. Enforced at dispatch.
- Workflow — durable execution envelope with a typed event log. Survives pod restarts.
- Channel — external-network adapter (WhatsApp, USSD, etc.) that surfaces users as peers.
Full docs site (Starlight or similar) is planned for Q3. This index serves as the entry point until then.