Senpi Runtime: Installation, CLI, and Configuration

Updated Jun 9, 2026 · 2 min read

Install @senpi-ai/runtime and run its CLI for recipes, log levels, diagnostics, and auto-update, plus the strategy templates to start from.

@senpi-ai/runtime is the npm package and OpenClaw plugin that runs on your agent and orchestrates scanners, LLM-based trade decisions, and DSL (Dynamic Stop-Loss) exit management. It connects to the Senpi MCP for live data and trade execution.

Install

openclaw plugins install @senpi-ai/runtime

Requirements

  • OpenClaw 2026.2.0 or newer
  • Node 22 or newer
  • A Senpi API key

Recipe management CLI

openclaw senpi runtime

Create, list, and delete runtimes from recipe YAML, with no gateway restart.

create -p <path.yaml>
Hot-load a recipe, no gateway restart.
create -c "<inline yaml>"
Inline form.
list
List active runtimes.
delete <runtime_id>
Remove a runtime.

In-shell reference (built-in docs)

openclaw senpi guide

In-shell reference docs for scanners, actions, DSL, examples, schema, and version.

guide
Overview.
guide scanners | actions | dsl | examples | schema | version
Per-topic in-shell reference.

Diagnostics

openclaw senpi status

Shows per-runtime liveness, log level, and runtime state.

-
Per-runtime liveness, log level, and runtime state.

Log level configuration

Set logLevel inside the plugin config block in openclaw.json - this is the recommended location and survives gateway restarts. The env var SENPI_LOG_LEVEL works as a one-off override but is ignored if the plugin config sets it. Accepted values: debug, info, warn, error (default info). Verify the active level with openclaw senpi status, which prints a Log Level: line per runtime. debug is very noisy - it includes full MCP request/response envelopes (secrets redacted) plus per-tick scanner heartbeats.

Auto-update

On by default. Polls every 6 hours, installs minor/patch versions automatically, and triggers a gateway restart so the new code takes effect. Major versions never auto-install - you get a Telegram notification asking you to update manually. For the auto-restart to actually work, gateway.reload.mode in your OpenClaw config must be restart or hybrid. If it is hot or off, the plugin sends a notification asking you to restart the gateway by hand. To change behaviour, add an autoUpdate block to the plugin config with mode: notify-only or enabled: false.

What the runtime does internally

It runs locally on each agent as an OpenClaw plugin. Internals:

Position tracking
detects opens/closes every ~10 seconds.
DSL Phase 1
loss protection, time-based exits like hard timeout, dead weight, weak peak (DSL configuration).
DSL Phase 2
local trailing before the backend Ratchet Stop handoff (DSL architecture and phase handoff).

Configured via strategy YAML (the older runtime.yaml name still works), which defines:

  • Strategy settings - wallet, budget, slots, margin_per_slot.

Strategy templates

RecipeStyleScannerEntry
minimal.yamlWatch-only-no positions opened
wolf.yamlAggressiveemerging_moversFIRST_JUMP
viper.yamlModerateprescreener + momentumcandle-based breakouts
fox.yamlOI-drivenprescreener + oi_tracker-
dsl-showcase.yamlReference-DSL exit reference with full annotations

Copy one with cp $(openclaw plugins path @senpi-ai/runtime)/examples/strategies/minimal.yaml ~/my-recipe.yaml, edit WALLET_ADDRESS, then load with openclaw senpi runtime create -p ~/my-recipe.yaml.

For the local HTTP API exposed by the runtime, see Runtime HTTP API. For DSL config, see DSL configuration.

Share

Related articles