KaleidoAgent is a separate, always-on server. It does not currently embed KaleidoMind’s
Engine and runs its own agent loop instead. See KaleidoMind’s relationship note for the convergence path being considered.Capabilities
Architecture
:4242.
Two Execution Modes
MCP Server Wiring
KaleidoAgent registerskaleido-mcp, the unified MCP server, as its primary tool source, giving it spark_*, wdk_*/rln_*, kaleidoswap_*, mpp_*/l402_*, and kaleido_node_* tools in one connection. Historically its config also referenced the now-archived standalone kaleidoswap-mcp and l402-gateway-mcp servers directly; since both are superseded by kaleido-mcp (see Retired Servers), new configurations should rely on kaleido-mcp alone rather than wiring those up separately.
Remote, third-party MCP servers can be registered too, gated behind an API key check. For example, a Bitrefill gift-card MCP is only registered if a BITREFILL_API_KEY env var is present, since the upstream endpoint rejects anonymous connections.
Autonomous Loops
Each loop is driven by a skill.
Risk Controls
Risk limits live inagent.config.json under portfolio. They are checked before any swap is submitted.
Trading Modes
Atomic Swap Flow
Same 5-step HTLC protocol as elsewhere in the KaleidoSwap stack, driven viakaleido-mcp or the CLI:
Run It
Prerequisites: Node.js 20 or newer, KaleidoCLI in$PATH, the Nanobot runtime, and an Anthropic or OpenAI API key.
1
Clone and install
2
Set the API key
ANTHROPIC_API_KEY or OPENAI_API_KEY in .env. Use AGENT_PROVIDER to pick between anthropic and openai.3
Configure the wallet and portfolio
Edit
agent.config.json:mcp.kaleido.env.WDK_SEED, the wallet mnemonic.mcp.kaleido.env.RLN_NODE_URL, the RGB Lightning Node URL.mcp.spark.env.WDK_SPARK_SEED, an optional separate Spark seed.portfolio.targets, the target allocation across BTC, USDT, and XAUT.portfolio.dry_run, keeptrueuntil the setup is verified.
agent.config.json: model choice, MCP server commands and env, portfolio targets and risk limits, schedule intervals, and the enabled skill list. See the repo README for the full schema and environment variable reference.4
Build and start
http://localhost:5173 and the local status API on http://localhost:4242. Use npm run daemon:start to run it as a background process instead..env.container.example to .env.container and run the container stack:
Status API
The agent exposes a localhost-only control API on port4242, used by the dashboard and callable directly.