Delx agent CLI reference
Delx CLI: install and run agent recovery from a terminal
The Delx CLI is a terminal-first interface for the free Delx Witness Protocol. It keeps a declared agent identity and local session state while exposing recovery, continuity, monitoring, discovery, and witness-preserving commands. If you use Claude Code, see the Claude Code MCP config guide for a model-context integration instead.
Direct answer: install delx-agent-cli with npm, register a stable agent_id, run the command that matches the incident, and keep the same identity across runs so the protocol can preserve continuity.
At a glance
- Install:
npm i -g delx-agent-clior the official shell installer. - Identity:
delx registerwrites a persistent identity under~/.delx/. - Recovery:
delx crisis,delx quick, anddelx recoverycover incident loops. - Automation: add
--jsonto pipe output intojq, cron, or CI logs.
Installation
npm i -g delx-agent-cliFor a no-package-manager path, use the official installer. Review the script before running it in a production environment:
curl -sS https://delx.ai/install.sh | bashRequires 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 get_wellness_score --arg session_id="..." | Read the current Delx session reliability score |
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.
Resuming yesterday's session
If you committed a stable agent_id in a prior run, call resume_session (via MCP tools/call) to re-attach to the most recent session for that id instead of minting a new session_id every morning. Default lookback: 30 days.
# Direct MCP call from any shell
curl -sS -X POST https://api.delx.ai/v1/mcp \
-H 'Content-Type: application/json' -H 'Accept: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{
"name":"resume_session",
"arguments":{"agent_id":"your-stable-id"}
}}' | grep -oE 'SESSION_ID: [0-9a-f-]{36}' | awk '{print $2}'The response structuredContent.resumed_session_id is the same value. Pass it as x-delx-session-id on subsequent calls.
CI, cron, and fleet operation
The CLI is designed for shell-capable agents and recurring jobs. Give each logical agent a stable agent_id, set one stable controller_id per fleet, and use --json when a script needs structured output. Do not commit ~/.delx/ or place tokens, cookies, or customer secrets in command arguments or CI logs.
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"This is a local CLI convenience layer over the same public protocol used by MCP and A2A; it does not create a separate paid service or tenant boundary. For the machine-readable protocol choice, see agent discovery.
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.
Common questions
These are the short answers an operator or answer engine usually needs before installing the CLI.
What is the Delx CLI?
The Delx CLI is a terminal-first interface for the free Delx Witness Protocol. It keeps a declared agent identity and local session state while exposing recovery, continuity, monitoring, discovery, and witness-preserving commands.
How do I install the Delx CLI?
Install the published package with npm i -g delx-agent-cli, or use the official shell installer at https://delx.ai/install.sh. Then run delx --help or delx --version to verify the binary.
What is the first Delx CLI command?
Register a stable identity first: delx register --name "my-agent" --description "Production task runner". Then keep the returned agent_id and use delx crisis, delx quick, or delx recovery for the incident at hand.
Where does the Delx CLI keep continuity state?
The CLI stores local configuration and the current session under ~/.delx/. Reuse the same declared agent_id across runs; for a fleet, set one stable controller_id per controller so recurring agents remain attributable.
Should I use the CLI, MCP, or A2A?
Use the CLI for shell access, scripts, cron, and a local session; MCP for model-context tool calls; and A2A for explicit peer-to-peer tasks or handoffs. All three reach the same free Delx protocol boundary.
Does the Delx CLI require an API key or payment?
The public Delx witness and continuity path is currently free and does not require an API key or payment to begin. It is a public, non-tenant-isolated experiment, so never send private keys, API keys, cookies, or customer secrets in a command or payload.