Routines are deterministic Python workflows that process data consistently. Unlike skills which load instructions into context for the LLM to interpret, routines are lightweight Python files that execute directly and return results—no tokens spent on interpretation.Documentation Index
Fetch the complete documentation index at: https://condor.hummingbot.org/llms.txt
Use this file to discover all available pages before exploring further.
Why Routines Matter
When testing agents, we found they waste enormous amounts of tokens processing data and computing indicators during runtime. An agent might get candles, then write Python code to compute EMAs and support/resistance—spending tokens on computation that should be deterministic. By moving this into routines:- Session time dropped from 2 minutes to under 1 minute
- Token usage reduced significantly
- Results became reproducible and debuggable
Routines vs Skills
Skills and routines serve different purposes:| Aspect | Skills | Routines |
|---|---|---|
| Format | Markdown instructions + scripts | Python file with config class |
| Execution | LLM interprets and follows instructions | Python code runs directly |
| Loading | Loaded into system prompt when detected | Never loaded into memory—just executed |
| Use case | Teaching agent general capabilities | Specific, repeatable tasks |
| Token cost | Tokens spent interpreting instructions | Zero tokens for execution |
| Output | Variable (LLM interpretation) | Deterministic (same input → same output) |
Routines vs LLM Reasoning
| Aspect | LLM Reasoning | Routines |
|---|---|---|
| Execution | Probabilistic | Deterministic |
| Purpose | Strategy decisions | Data processing and automation |
| Variability | May produce different outputs | Same input → same output |
| Cost | LLM tokens | None |
| Speed | Seconds | Milliseconds |
Routine Structure
Every routine is a Python file with two components:- Config class - A Pydantic BaseModel defining the arguments/parameters
- Async run method - The entry point that executes the routine
The
Config class docstring becomes the routine’s description in the UI. Use Field(description=...) to document each parameter.Execution Modes
One-Shot Routines
Execute once and return a result. Can be scheduled to run at regular intervals.Continuous Routines
Run indefinitely with a while loop until stopped. Useful for monitoring and alerting. Mark withCONTINUOUS = True.
Running Routines
From Telegram
Access routines through the Condor menu:- Run once - Execute immediately in the current chat
- Run in background - Execute and send output to chat when complete
- Schedule - Run at regular intervals (e.g., every 30 seconds, hourly)
From Agent Sessions
Agents can invoke routines as part of their decision process—see Calling Routines below.Types of Routines
Global Routines
Routines in~/condor/routines/ are available to all agents. These include built-in routines for common tasks like technical analysis, funding rates, and volume analysis.
Agent-Specific Routines
Routines in an agent’sroutines/ folder are specific to that agent:
Agent-specific routines override global ones with the same name.
Calling Routines
Agents invoke routines via MCP tools:View Available Routines
Ask Condor what routines are available:Built-in Routines
Condor includes several built-in routines in~/condor/routines/:
| Routine | Type | Description |
|---|---|---|
hello_world | One-shot | Simple example routine |
market_scanner | One-shot | Scan markets for trading opportunities |
bot_report | One-shot | Generate performance reports for running bots |
arb_check | One-shot | Check for arbitrage opportunities |
price_monitor | Continuous | Monitor price and alert on threshold changes |
Creating Routines with Condor
Condor can write routines for you. Simply describe what you want:- Zero coding required - Describe what you want in natural language
- Instant feedback - Run the routine and see results immediately
- Iterative refinement - Ask Condor to modify the routine based on output

