Matrix logo

Quickstart

Clone matrix-core, build the nine Go modules, compile your first intent, drive an end-to-end walk, and run the per-user daemon.

This guide takes you from a fresh clone to a running daemon. Matrix is a polyglot monorepo of independently buildable Go modules plus MCP tool servers.

Prerequisites

Go 1.22+

The toolchain is pinned across every module.

GNU make 4.x

The root Makefile drives all module builds and tests.

Node 20+, npx, Python 3.11+, uv

Required for the MCP-server-driven flows (filesystem, fetch, git, browser, …).

Docker + buildx

Only needed to build the per-user daemon image.

1. Clone and build

git clone https://github.com/paxlabs-inc/matrix-core.git
cd matrix-core
make build      # compile all nine Go modules
make install    # drop the runnable CLIs into ./bin
make test       # go test -count=1 -race ./... per module
make ci         # gofmt-check + vet + tests (mirrors GitHub Actions)

Need golangci-lint locally? Run make lint-install (pinned to v1.61.0) then make lint.

2. Configure secrets

cp .env.example .env
# FIREWORKS_API_KEY / TOGETHER_API_KEY — required for any non-dry-run compile
# MATRIX_DAEMON_TOKEN — set if running the daemon with auth

.env is gitignored; .env.example documents every variable Matrix reads.

3. Compile your first intent

./bin/mclc compile \
  -skill skills/writing-plans/SKILL.mtx \
  -prose "Build a deployment pipeline for my Node.js app" \
  -verb  build

With FIREWORKS_API_KEY set the compiler emits a real Intent Frame (verb, typed objects, blocking unknowns). Without keys it falls back to dry-run mode and prints the fully-interpolated prompt structure.

4. Drive an end-to-end walk

./bin/mcl-execute walk \
  -prose       "Summarise the README and write it to /tmp/summary.md" \
  -manifest    agents/default.json \
  -cortex-root ./runs/dev-cortex \
  -skills-root ./skills

This loads the agent manifest, spawns the MCP servers it declares, compiles the prose into an Intent + PlanTree, walks the plan, journals every step as a cortex Event, and ends with cortex.Attest writing KindAttest + KindLearnWeights atomically.

5. Run the daemon

1
Start the per-user daemon
./bin/mcl-execute daemon \
  -addr        :8080 \
  -cortex-root ./runs/dev-cortex \
  -manifest    agents/default.json \
  -skills-root ./skills
2
Talk to it

The daemon exposes an HTTP + SSE surface. The most common routes:

MethodPathPurpose
GET/healthzLiveness + SSE broker stats
POST/chatConverse with the agent (Neo front door)
GET/eventsServer-Sent Events tail (transcript)
POST/messagesSubmit a prose message (rigorous rail)
GET/intents/{id}Read the intent envelope chain by ID
GET/mePer-user settings + identity
POST/shutdownGraceful drain

The full route reference, request/response shapes, and per-service APIs live under API Reference.

What's next

Core concepts

The mental model behind intents, plans, cortex, and replay.

Architecture

Module boundaries, cross-cutting flows, and invariants.