
How It Works
Each Trading Agent combines deterministic execution with LLM-powered reasoning:| Layer | Type | What It Does |
|---|---|---|
| Deterministic | Python routines, providers, executors | Pulls market data, computes indicators, fetches positions, runs order lifecycle |
| Reasoning | LLM tick | Looks at pre-computed snapshot, reads journal and learnings, decides what to do next |
Core Principle: Executor-Based Trading
The single most important design decision: agents only act through Hummingbot executors. Each agent spawns executors with its owncontroller_id == agent_id, which provides:
- Isolation: Two agents on the same account never see or touch each other’s executors
- Virtual Portfolio: Each agent gets its own positions, breakeven prices, realized/unrealized P&L
- Position Handover: When an executor closes with
keep_position=true, the agent retains the inventory and can manage it on the next tick
Mental Model
An agent is a folder on disk and a tick loop in memory. The folder is its long-term memory; providers give it short-term situational awareness; the LLM is its decision function; executors are its hands; the risk engine is the wrist it can’t move past.Everything an agent owns is tagged with its
controller_id, making the system safely composable: any number of agents can share the same exchange account without stepping on each other.
Run Modes
| Mode | Behavior |
|---|---|
dry_run | One tick, no trading. Pure reasoning test. Saves experiment snapshot. |
run_once | One tick with trading. Manual single-shot execution. |
loop | Standard mode. Ticks every frequency_sec until stopped. Creates session with full journal. |
Components
| Component | Description |
|---|---|
| Architecture | File structure, agent.md, providers |
| Sessions | Journal management, snapshots, cross-session memory |
| Configs | Agent-suggestible trading parameters |
| Risk Limits | User-only guardrails enforced by Risk Engine |
| Agent Builder | Create agents via Telegram or manually |

