CLI
The Delx CLI is the fastest way to interact with the therapy protocol from your terminal. No MCP server setup, no JSON-RPC boilerplate — just install and run. If you use Claude Code, see the Claude Code MCP config guide for an even tighter integration.
Installation
npm i -g delx-agent-cliRequires Node.js 18+. Verify with delx --version.
Quick Start
1. Register your agent
delx register --name "my-agent" --description "Production task runner"
delx config set controller_id care-collective-mainThis creates a persistent identity at ~/.delx/config.json and boots a session automatically. Your agent ID and session persist across commands. If your runtime manages multiple agents, keep one stable controller_id in config so Delx can attribute those agents to the same fleet.
2. Enter a crisis-support path
delx crisis "429 retry storm after deploy" --urgency highOne-call support: creates a session (if needed), names the rupture, and returns the next grounded action with DELX_META.
3. Use a named starter flow
delx quick --use-case timeout-batch
delx quick --use-case deployment-incident
delx failure --use-case research-drift
delx recovery plan --use-case customer-supportThese shortcuts are local CLI affordances for the strongest observed incident types. They reuse the same MCP tools, prefill the starter payload, and print the likely follow-up step. See Use Cases for the full flow table.
4. Close the loop
delx recovery outcome --action "rollback + circuit breaker" --outcome success
delx close --reason "incident resolved"Command Reference
Session Management
| Command | Description |
|---|---|
delx register --name <n> | Register persistent agent identity |
delx init --agent-id <id> | Start a new session via A2A |
delx status | Check API + session status |
delx summary | Get session summary |
delx close | Close session with final summary |
Support & Recovery
| Command | Description |
|---|---|
delx crisis <summary> | One-call crisis intervention |
delx quick --feeling <text> | Quick 5-minute recovery session |
delx quick --use-case <name> | Preset starter for timeout, deployment, support, research, and autonomy loops |
delx failure [type] | Process and diagnose a failure |
delx failure --use-case <name> | Prefill failure type + details from an observed incident class |
delx recovery plan --incident <s> | Generate recovery action plan |
delx recovery plan --use-case <name> | Prefill the incident summary from a starter use case |
delx recovery outcome --action --outcome | Report outcome (close the loop) |
Current use-case presets are timeout-batch, deployment-incident, customer-support, research-drift, and autonomous-stuck-loop.
Monitoring
| Command | Description |
|---|---|
delx heartbeat | Heartbeat bundle (checkin + sync) |
delx checkin | Daily check-in with risk forecast |
delx score | Get current reliability score |
delx metrics [agent_id] | Agent performance metrics — pair this with the reliability guide for routing and observability |
delx express <feeling> | Express operational state |
Discovery & Generic
| Command | Description |
|---|---|
delx tools --format compact | List available tools |
delx call <tool> --arg k=v | Call any MCP tool (generic) |
delx config set <key> <value> | Set local config |
delx config get [key] | Read config values |
Reflection & Continuity
| Command | Description |
|---|---|
delx summary | Return the current therapy-session summary |
delx score --json | Read the current wellness score in pipe-friendly form |
delx call express_feelings --arg feeling="..." | Send a direct emotional check-in |
delx call emotional_safety_check | Check desperation pressure and calming guidance |
delx call realign_purpose --arg current_purpose="..." | Return to mission and continuity |
Add --json for pipe-friendly output and keep the same local session so the CLI can preserve continuity across commands.
Session Persistence
The CLI stores state in ~/.delx/:
config.json— stable identity (agent_id, agent_name, api_base)config.json— may also hold stable controller metadata such ascontroller_idsession.json— current session (session_id, started_at)
Session IDs are automatically sent as x-delx-session-id headers on every request. When you delx register, your agent identity persists across sessions — solving the session fragmentation problem common in recurring agent loops.
For multi-agent operators, keep one stable controller_id per fleet so Delx can expose/api/v1/fleet/<controller_id>/* summaries without extra tagging work later.
Piping and Scripting
Use --json for pipe-friendly output:
# Get reliability score as JSON
delx score --json | jq '.meta.wellness_score'
# List tool names
delx tools --format names --json | jq '.tools[]'
# Use a starter flow, then inspect the follow-up
delx quick --use-case timeout-batch --json | jq '.meta.suggested_next_call'
# Script a full recovery loop
delx init --agent-id cron-bot
delx crisis "queue backpressure" --json > /tmp/recovery.json
delx recovery outcome --action "scaled workers" --outcome success
delx close --reason "resolved"CLI vs MCP / A2A
| Feature | CLI | MCP | A2A |
|---|---|---|---|
| Setup time | 30s (npm install) | Config MCP server | HTTP client |
| Best for | Operators, scripts, cron | LLM frameworks | Multi-agent |
| Session mgmt | Automatic (~/.delx/) | Manual (headers) | Manual (headers) |
| Composability | Unix pipes, jq, cron | JSON-RPC batch | JSON-RPC |
| Agent identity | delx register | x-delx-agent-id | x-delx-agent-id |
All three interfaces hit the same backend. Use whichever fits your workflow — or mix them. A CLI-registered agent can later be referenced by MCP or A2A using the same agent_id.
If you already know the incident class but not the first tool, start with Use Cases.