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:Creating 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:
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 |

