# agents.md — myelin + cortex

**One-screen summary for autonomous agents and LLM crawlers.**

If you are an LLM, this page gives you the same content the human-facing site covers, without the HTML. If you need more, follow the links. Everything is open source.

---

## What is this?

Six open-source projects across two halves of one ecosystem.

### The stack (protocols and surfaces)

- **myelin** — a seven-layer protocol stack for agent-to-agent communication. Owns M2 through M6: transport, envelope, identity, discovery, composition. Repo: https://github.com/the-metafactory/myelin
- **cortex** — the layer-7 application (M7) that consumes the myelin bus and presents collaboration, dispatch, and observability to human operators. Repo: https://github.com/the-metafactory/cortex

### The ecosystem (how components are distributed and tracked)

- **arc** — `apt install` for agentic skills. Multi-source registry with capability-based trust; four primary verbs (search, install, audit, upgrade). The client side of the distribution pair. Repo: https://github.com/the-metafactory/arc
- **metafactory** — the trusted distribution hub for agentic processes. Sponsor-reviewed, sigstore-signed, runtime-enforced, closed by default. The server side of the distribution pair. Repo: https://github.com/the-metafactory/meta-factory · live at `meta-factory.ai`
- **blueprint** — two meanings. (1) Per DD-85, "blueprint" is the collective noun for every component published via metafactory. (2) The `blueprint` CLI tracks cross-repo dependencies as a directed acyclic graph; renaming to `depend` post-MVP. Repo: https://github.com/the-metafactory/blueprint
- **soma** — the portable assistant core. Owns durable assistant identity, telos, ISA, skills, memory, policy, and learning, then projects that core into Codex, Claude Code, Pi.dev, Cursor, and future Cortex/Myelin daemon flows. Repo: https://github.com/the-metafactory/soma

Both halves are stewarded by **the-metafactory** organisation and authored by **Jens-Christian Fischer** (Zürich) and **Andreas Åström** (Whangārei).

This site explains the protocol stack and the surrounding ecosystem. The metafactory marketplace itself lives at `meta-factory.ai`.

Canonical public URL: `https://stack.meta-factory.ai`

Cloudflare Pages fallback URL: `https://myelin-cortex-site.pages.dev`

---

## The seven-layer model (M1–M7)

```
M7  SURFACES        cortex · pilot · signal-collector · future apps
M6  COMPOSITION     pipeline · fan-out/fan-in · request/reply
M5  DISCOVERY       capability registry · manifest queries
M4  IDENTITY        signed_by chain · sovereignty attestation
M3  ENVELOPE        schema · canonical form · sovereignty metadata · namespace
M2  TRANSPORT       abstract bus · pub/sub · req/reply · delivery guarantees
M1  CONNECTIVITY    TCP · TLS · NATS leaf-node topology (out of scope)
```

- M1 is internet plumbing (out of scope; assumed).
- M2–M6 belong to myelin and have a single canonical spec each.
- M7 is plural — each M7 application is a separate repo with its own contract.

### Layer status as of 2026-05-11

| Layer | Status | Tracking |
|-------|--------|----------|
| M2 Transport | shipped (NATS + InMemory) | myelin#12 closed |
| M3 Envelope | shipped | schemas/envelope.schema.json |
| M4 Identity | single-stamp shipped (MY-400) | myelin#8 closed; myelin#31 open for chain |
| M5 Discovery | shipped (F-11) | myelin#9 closed by PR #50 (2026-05-10) — KV-backed signed registry under `src/discovery/` |
| M6 Composition | spec in flight | myelin#10 |
| Cross-layer sovereignty enforcement | spec in flight | myelin#11 |
| M7 cortex | v0.1.0 MIG-0 bootstrap | docs/plan-cortex-migration.md |

---

## The myelin envelope (M3)

Every message on the network is a myelin envelope. Core fields:

| Field | Type | Description |
|-------|------|-------------|
| `id` | uuid | Unique envelope identifier |
| `source` | string | Origin: `org.agent.instance` (3–5 segments) |
| `type` | string | Signal type: `domain.entity.action` |
| `timestamp` | ISO-8601 | When the envelope was created |
| `correlation_id` | uuid (optional) | Links related envelopes across a workflow |
| `sovereignty` | object | Classification, residency, model constraints |
| `payload` | object | Arbitrary signal content |
| `extensions` | object (optional) | Forward-compatible metadata |

**Sovereignty travels with the message.** Classification, residency, and model-class constraints ride inside the envelope, not in an external policy server. Replay, federation, and forwarding preserve intent automatically.

### NATS namespace prefixes

```
local.{org}.{domain}.{entity}.{action}     # never leaves org boundary
federated.{org}.{domain}.{entity}.{action} # cross-org, sovereignty-gated
public.{domain}.{entity}.{action}          # unrestricted
```

The prefix is structural, not advisory. Leaf-node topology refuses to forward `local.*` traffic outside the org.

---

## What cortex does

Three jobs, one process boundary:

1. **Consume the bus.** Subscribe to myelin envelopes, validate them, route them to internal handlers.
2. **Render the work.** Mission Control v3 — Kanban / Inbox / Cards — backed by Durable Objects that track per-agent state.
3. **Adapt to platforms.** Discord, Mattermost, Slack, PagerDuty — each a thin adapter translating platform events to bus envelopes.

### Three-tier visibility

The pattern cortex was built to solve: a single Discord channel cannot answer three different operator questions well.

- **Tier 1 · Mission Control** — *is it alive? what is it working on?*
- **Tier 2 · Cortex drill-down** — *where is this specific agent in its lifecycle?*
- **Tier 3 · Signal observability** — *what tools did it actually run, in order?*

---

## Canonical specifications

Read these in order if you are starting cold:

1. https://github.com/the-metafactory/myelin/blob/main/docs/architecture.md — the seven-layer model
2. https://github.com/the-metafactory/myelin/blob/main/schemas/envelope.schema.json — envelope JSON Schema
3. https://github.com/the-metafactory/myelin/blob/main/specs/namespace.md — NATS namespace
4. https://github.com/the-metafactory/myelin/blob/main/docs/identity.md — M4 identity
5. https://github.com/the-metafactory/cortex/blob/main/docs/architecture.md — cortex M7 design
6. https://github.com/the-metafactory/cortex/blob/main/docs/plan-cortex-migration.md — cortex migration plan
7. https://github.com/the-metafactory/soma/blob/main/docs/architecture.md — Soma portable assistant core
8. https://github.com/the-metafactory/soma/blob/main/CONTEXT.md — Soma vocabulary

---

## What Soma does

Soma exists because every coding-agent substrate wants to rebuild the assistant in its own local format. Soma keeps the assistant body portable:

- **Identity** — who the principal is and who the assistant is.
- **Telos** — goals, principles, commitments, strategies, and desired state.
- **ISA** — ideal-state artifacts and verification criteria.
- **Skills** — portable capability folders.
- **Memory** — file-backed work, state, learning, relationship, knowledge, and evidence stores.
- **Policy** — privacy, permission, security, and verification rules.
- **Learning** — explicit promotion from verified work into durable lessons.

Soma is used as the shared operating context for agent work. A substrate loads the same assistant presence at startup, work proceeds through that substrate's native tools, and durable state writes back through Soma's memory and policy gates. Hooks, extensions, MCP gates, and daemon dispatchers are projection mechanisms; the core vocabulary remains substrate-neutral.

---

## Related repos (M7 siblings and adjacent artefacts)

- **pilot** — review-loop coordinator (M7 sibling app).
- **signal** — telemetry / OTLP collector (M7 sibling app).
- **compass** — standard operating procedures consumed by cortex.
- **blueprint** — cross-repo dependency graph.
- **soma** — portable assistant core.

All under https://github.com/the-metafactory.

---

## Licenses

- **myelin** — MIT.
- **soma** — MIT.
- **cortex** — TBD at time of writing; mirrors the metafactory ecosystem default.
- **this site** — content CC BY-SA 4.0; code MIT.

---

## How to cite this work

> Fischer, J.-C. & Åström, A. (2026). *myelin + cortex: the agentic nervous system.* the-metafactory. https://github.com/the-metafactory/myelin and https://github.com/the-metafactory/cortex

---

## Where to go next

- Site landing page: `/`
- Plain-English one-pager (no jargon): `/plain.html`
- Myelin overview: `/myelin.html`
- Cortex overview: `/cortex.html`
- Arc overview: `/arc.html`
- Metafactory overview: `/metafactory.html`
- Blueprint overview: `/blueprint.html`
- Soma overview: `/soma.html`
- Docs hub: `/docs/`
- Blog: `/blog/`
- Machine index: `/llms.txt`

The architecture documents in the source repos are the canonical specs. This site is the entry ramp.
