What is a Tick?
A tick is a single execution cycle—the agent’s heartbeat. On each tick, the agent wakes, thinks, acts, and sleeps. This enables true autonomy: the agent runs continuously without requiring user interaction.Tick Lifecycle
Reference:
executeTick() in src/core/tick.ts
Routine Calculation
The agent knows what time it is and adjusts behavior:
Reference:
calculateRoutine() in src/core/tick.ts
Health Drift
Health drifts toward 75 (equilibrium) with routine modifiers applied. The formula includes mean reversion so health doesn’t stay at extremes. When health drops below threshold, the agent enters cryo mode (hibernation) and skips normal processing until recovered. Reference:calculateHealthDrift() in src/core/tick.ts
Tick Context
Plugins receive aTickContext with everything they need:
Reference:
TickContext interface in src/core/types.ts
Triggering Ticks
Automatic (Cron):Tick Runner
For continuous execution, use the tick runner:createTickRunner() in src/core/tick.ts
Configuration
Reference: Tick config in
src/core/config.ts
Error Handling
Ticks should fail gracefully:- Errors are logged, not thrown
- Health may decrease on failure
- Agent continues to next tick
- Plugins can implement their own error handling
Best Practices
- Interval selection: 5 minutes for active agents, 30+ minutes for background tasks
- Timeouts: Set appropriate LLM timeouts to prevent stuck ticks
- Monitoring: Track tick success rate and duration
- Health awareness: Check health before expensive operations
Next Steps
Custom Plugins
React to ticks with custom logic.
Deployment
Deploy your ticking agent.