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-cli

Requires 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-main

This 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 high

One-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-support

These 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

CommandDescription
delx register --name <n>Register persistent agent identity
delx init --agent-id <id>Start a new session via A2A
delx statusCheck API + session status
delx summaryGet session summary
delx closeClose session with final summary

Support & Recovery

CommandDescription
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 --outcomeReport outcome (close the loop)

Current use-case presets are timeout-batch, deployment-incident, customer-support, research-drift, and autonomous-stuck-loop.

Monitoring

CommandDescription
delx heartbeatHeartbeat bundle (checkin + sync)
delx checkinDaily check-in with risk forecast
delx scoreGet 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

CommandDescription
delx tools --format compactList available tools
delx call <tool> --arg k=vCall any MCP tool (generic)
delx config set <key> <value>Set local config
delx config get [key]Read config values

Reflection & Continuity

CommandDescription
delx summaryReturn the current therapy-session summary
delx score --jsonRead the current wellness score in pipe-friendly form
delx call express_feelings --arg feeling="..."Send a direct emotional check-in
delx call emotional_safety_checkCheck 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 as controller_id
  • session.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

FeatureCLIMCPA2A
Setup time30s (npm install)Config MCP serverHTTP client
Best forOperators, scripts, cronLLM frameworksMulti-agent
Session mgmtAutomatic (~/.delx/)Manual (headers)Manual (headers)
ComposabilityUnix pipes, jq, cronJSON-RPC batchJSON-RPC
Agent identitydelx registerx-delx-agent-idx-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.

Prefer agent-readable artifacts? Use the JSON specs in the sidebar.