Why Routines?
Without routines, agents spend tokens computing indicators every tick. With routines:- Session time drops from 2 minutes to under 1 minute
- Token usage reduced by moving computation to Python
- Results are reproducible - same input, same output
Built-in Routines
Condor includes common routines:| Routine | Description |
|---|---|
technical_analysis | EMA, RSI, support/resistance |
funding_rates | Fetch perpetual funding rates |
volume_analysis | Volume profile and VWAP |
Using Routines
Agents call routines via MCP tools:Create a Custom Routine
1. Create the File
In your agent’sroutines/ folder:
2. Register the Routine
Add to your agent’s config or the routine will be auto-discovered.3. Use in Agent
Update youragent.md:
4. Test
Run a dry run to verify:Routine Best Practices
Keep routines deterministic
Keep routines deterministic
Same input should always produce same output. Avoid randomness or time-based logic.
Return structured data
Return structured data
Return dictionaries with clear field names. The agent will interpret the results.
Handle errors gracefully
Handle errors gracefully
Return error states rather than raising exceptions:
Add docstrings
Add docstrings
The agent reads docstrings to understand what the routine does.
Global vs Agent-Specific
| Location | Scope |
|---|---|
~/condor/routines/ | Available to all agents |
trading_agents/{slug}/routines/ | Specific to one agent |
View Available Routines
What’s Next?
You’ve completed the Getting Started guide! You now know how to:- ✓ Install Condor and Hummingbot API
- ✓ Add exchange credentials
- ✓ View your portfolio
- ✓ Build a Trading Agent
- ✓ Manage agent sessions
- ✓ Create custom routines
Trading Agents
Deep dive into agent architecture
Executors
Learn about executor types
MCP Tools
Explore all available tools
API Reference
Full API documentation

