Quickstart
Get Matrix agents running fast: clone the repo, build Go modules, configure keys, compile intents, and launch the daemon.
This guide takes you from a fresh clone to a running Matrix agent. The monorepo contains independently buildable Go modules and MCP tool servers.
Prerequisites
| Tool | Version | Purpose |
|---|---|---|
| Go | 1.22+ | All Go modules are pinned to this toolchain |
| GNU make | 4.x | Root Makefile drives builds and tests |
| Node.js | 20+ | MCP tool servers (filesystem, fetch, git, browser, Paxeer, etc.) |
| Python | 3.11+ | Skill indexing and conversion utilities |
Docker and buildx are only needed if you plan to build the per-user daemon container image.
1. Clone and build
git clone https://github.com/paxlabs-inc/matrix-core.git
cd matrix-core
make build # compile all Go modules
make install # place CLIs in ./bin
make test # run tests across all modules
The build produces the following CLIs in ./bin:
| CLI | Purpose |
|---|---|
mclc | MCL compiler: prose to Intent IR |
mcl-execute | Plan walker and per-user daemon |
mcl-validate | Validate MatrixScript (.mtx) files |
mcl-fmt | Debug-format .mtx as canonical JSON |
cortex-shell | Interactive cortex read/write/query CLI |
2. Configure
cp .env.example .env
Edit .env and set the required keys:
# LLM provider key (required for compilation and plan walking)
FIREWORKS_API_KEY=your_key_here
# Wallet auth (required for on-chain writes; reads work without it)
PAXEER_WALLET_EMAIL=you@example.com
PAXEER_WALLET_PASSWORD=your_password
# Optional: per-user daemon auth token
MATRIX_DAEMON_TOKEN=your_token
The .env file is gitignored. See .env.example for the full list of variables and their defaults.
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 a valid FIREWORKS_API_KEY, the compiler emits a typed Intent Frame containing the verb, typed object slots, blocking unknowns, confidence score, and compilation metadata. Without an API key, it falls back to dry-run mode and prints the interpolated prompt structure.
4. Walk a plan end-to-end
./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 command:
- Loads the agent manifest (which MCP servers and tools to spawn)
- Compiles the prose into an Intent and PlanTree
- Walks the plan step-by-step, dispatching tool calls through MCP
- Journals every step as a Cortex Event memory
- Writes a signed
KindAttestandKindLearnWeightson completion
5. Run the per-user daemon
./bin/mcl-execute daemon \
-addr :8080 \
-cortex-root ./runs/dev-cortex \
-manifest agents/default.json \
-skills-root ./skills
The daemon exposes an HTTP and SSE surface:
| Method | Path | Purpose |
|---|---|---|
GET | /healthz | Liveness check and SSE broker stats |
POST | /chat | Conversational entry point (Neo rail) |
GET | /events | Server-Sent Events tail (live transcript) |
POST | /messages | Submit prose for rigorous-rail execution |
GET | /intents/{id} | Read the signed envelope chain for an intent |
GET | /me | Per-user identity and settings |
POST | /shutdown | Graceful drain |
The full route reference, request/response shapes, and per-service APIs are in the API Reference.
6. Explore Cortex interactively
Use the cortex shell to read and write memories directly:
# Write an identity memory
./bin/cortex-shell -root ./runs/dev-cortex -actor dev \
write Identity '{"name":"Developer","did":"did:pax:dev"}'
# Write a preference
./bin/cortex-shell -root ./runs/dev-cortex -actor dev \
write Preference '{"topic":"code_style","polarity":"prefer","strengthval":0.9,"rationale":"terse"}'
# List all memories of a type
./bin/cortex-shell -root ./runs/dev-cortex -actor dev \
list Preference
# Dump the full journal
./bin/cortex-shell -root ./runs/dev-cortex -actor dev \
dump
