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 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 |
Use Cases
Custom Indicators
Define technical indicators not built into exchanges:TradingView Webhooks
Receive alerts from TradingView and trigger agent actions:Daily Reports
Generate scheduled reports aggregating performance data:Custom Alerts
Monitor conditions and trigger notifications:Directory Structure
There are two types of routines:Global Routines (Shared)
Routines in~/condor/routines/ are available to all agents:
Agent-Specific Routines
Routines in an agent’sroutines/ folder are specific to that agent:
Calling Routines
Agents invoke routines via MCP tools:Creating Routines with Agent Builder
When you create an agent via/agent → Agent Builder, the system can generate custom routines for your strategy. For example, if you specify:
“I want to use one-minute candles and look for support and resistance levels plus EMAs of 7, 25, and 99”The Agent Builder creates a routine like:
Scheduling Routines
Configure scheduled execution inconfig.yml:

