Rax CLI
Rax stands for Reactive Agents Executable.
rax is to Reactive Agents what Artisan CLI is to Laravel: the primary command-line interface for building, running, and operating your application.
The framework gives you composable layers and a powerful runtime. The CLI turns that power into a fast daily workflow: scaffold, run, inspect, serve, and deploy without ceremony.
Why Start with Rax
Section titled “Why Start with Rax”- Faster time-to-first-agent: scaffold a working project in one command.
- Consistent team workflows: shared command surface for dev, test, inspect, and deploy.
- Production-friendly defaults: safe templates, explicit provider/model flags, and clear runtime options.
- No hidden magic: every command maps to framework capabilities you can later customize in code.
The Core Flow
Section titled “The Core Flow”# 1) Scaffold a projectbunx rax init my-agent --template standardcd my-agentbun install
# 2) Generate an agent starterrax create agent researcher --recipe researcher
# 3) Run with reasoning + toolsrax run "Summarize this week in AI" --provider anthropic --reasoning --tools --stream
# 4) Explore interactivelyrax playground --provider anthropic --tools --reasoning
# 5) Inspect runtime signalsrax inspect researcherCommand Surface at a Glance
Section titled “Command Surface at a Glance”rax init: create a project with minimal, standard, or full templates.rax create agent: scaffold role-specific agent starters.rax run: execute prompts with provider/model/capability flags.rax cortex: launch the Cortex local studio — live agent grid, trace panel, chat, signal charts.rax playground: interactive loop with tool and thought streaming.rax serve: expose an A2A-compatible server.rax discover: inspect remote A2A agent cards.rax deploy: deploy through local or cloud adapters.rax inspect: debug runtime signals and logs.rax dev: run entrypoints in watch mode.
Cortex — Local Agent Studio
Section titled “Cortex — Local Agent Studio”The most powerful dev workflow pairs rax run with rax cortex:
# Terminal 1 — open the Cortex studiorax cortex --dev# Opens http://localhost:5173 (API on :4321)
# Terminal 2 — run an agent that streams to Cortexrax run "Research the top 5 AI agent frameworks" \ --provider anthropic \ --reasoning \ --tools \ --cortexThe --cortex flag calls .withCortex() on the builder, which streams every EventBus event to Cortex over WebSocket. You get:
- Beacon grid — live cognitive-state tiles for every connected agent
- D3 entropy signal — real-time chart of reasoning quality across iterations
- Trace panel — step-by-step Thought → Action → Observation breakdown
- Debrief card — structured post-run summary with confidence and sources
- Persistent history — every run is saved to SQLite and fully replayable
You can also set CORTEX_URL to target a different host:
CORTEX_URL=http://cortex.internal:4321 \ rax run "Task" --cortex --provider anthropicSee Cortex Studio for the full feature reference and
.withCortex()SDK docs.
When to Use CLI vs SDK
Section titled “When to Use CLI vs SDK”Use rax when you want speed and operational consistency.
Use the SDK directly when you need deep, application-specific composition.
Most teams use both: CLI for workflow, SDK for custom behavior.
Next Steps
Section titled “Next Steps”- Quickstart for a five-minute setup
- CLI Reference for full command details
- Builder API for low-level composition