What routines do
- Event triggers — fire when a workspace event occurs (contact created, status changed, task assigned, etc.)
- Schedule triggers — fire on a cron schedule (every 15 minutes, hourly, daily, etc.)
Event triggers
Contact created
Fires when a new contact is added to the CRM — manually, by another agent, or via import.
Contact status changed
Fires when a contact moves to a new pipeline stage (e.g. Lead → Qualified).
Contact fields updated
Fires when specific fields on a contact record change.
Task assigned
Fires when a task is assigned or reassigned to a specific agent.
Agent mentioned
Fires when
@agent-slug appears in any task comment.Schedule triggers
Schedule triggers wake an agent on a recurring cadence. Use these for periodic work: checking inboxes, generating reports, running sweeps, or any task that should happen on a timer. Available presets include:- Every 15 minutes
- Every 30 minutes
- Hourly
- Every 6 hours
- Daily
- Weekly
Creating a routine
Open Routines
Go to Routines in the left sidebar. You’ll see a list of existing routines (empty on a fresh install).
Set the trigger
Choose between Event and Schedule:For event triggers: pick a trigger type from the dropdown. For CRM triggers (contact created, status changed, fields updated), you can optionally add conditions:
- Pipeline stage — only fire when the contact is in a specific stage
- Field value — only fire when a specific field matches a value
Choose the agent
Pick which agent should receive the work. Only agents with status
ready (not paused or over budget) will actually be woken.Write a summary
Add a short note describing what the agent should do. This becomes part of the inbox item that wakes the agent:
“New contact from demo form. Research their company and draft a personalized intro.”The agent sees this note alongside the event data (contact record, task details, etc.).
Example routines
Enrich new contacts automatically (event)
Enrich new contacts automatically (event)
Trigger: Contact created
Agent: crm-researcher
Summary: “New contact added. Research their LinkedIn, company, and recent news. Update the contact record with findings.”Every time a contact lands in your CRM, the researcher wakes up, browses the web, and fills in the missing context.
Agent: crm-researcher
Summary: “New contact added. Research their LinkedIn, company, and recent news. Update the contact record with findings.”Every time a contact lands in your CRM, the researcher wakes up, browses the web, and fills in the missing context.
Draft follow-ups when a deal moves stages (event)
Draft follow-ups when a deal moves stages (event)
Trigger: Contact status changed
Condition: New stage = “Proposal sent”
Agent: sales-copywriter
Summary: “Contact moved to Proposal Sent. Draft a follow-up email for 3 days from now and save it as a draft.”Stage moves automatically trigger the agent to prep the next touchpoint.
Condition: New stage = “Proposal sent”
Agent: sales-copywriter
Summary: “Contact moved to Proposal Sent. Draft a follow-up email for 3 days from now and save it as a draft.”Stage moves automatically trigger the agent to prep the next touchpoint.
Daily inbox sweep (schedule)
Daily inbox sweep (schedule)
Trigger: Schedule — daily at 9:00 AM
Agent: chief-of-staff
Summary: “Morning sweep. Review open tasks, check for stale contacts, and summarize priorities for today.”The agent wakes every morning and produces a daily briefing.
Agent: chief-of-staff
Summary: “Morning sweep. Review open tasks, check for stale contacts, and summarize priorities for today.”The agent wakes every morning and produces a daily briefing.
Periodic content check (schedule)
Periodic content check (schedule)
Trigger: Schedule — every 6 hours
Agent: social-strategist
Summary: “Check social channels for engagement on recent posts. Flag anything that needs a response.”Regular monitoring without manual prompting.
Agent: social-strategist
Summary: “Check social channels for engagement on recent posts. Flag anything that needs a response.”Regular monitoring without manual prompting.
Respond to @-mentions in comments (event)
Respond to @-mentions in comments (event)
Trigger: Agent mentioned
Agent: assistant
Summary: (the mention text is passed automatically)When anyone types
Agent: assistant
Summary: (the mention text is passed automatically)When anyone types
@assistant in a task comment, the assistant wakes up and responds in-thread.How the agent receives the work
When a routine fires, HQ creates anagent_inbox_items row containing:
- The trigger event type (or
schedulefor schedule routines) - A summary (your routine note + event context)
- The related record (contact ID, task ID, etc.) if applicable
openclaw agent --message "[inbox] ...". The agent reads its inbox, finds the item, and processes it using its skills.
The agent marks items done as it goes. You can see inbox history in Settings → System → Inbox.
Pausing and deleting routines
- Pause a routine: toggle the routine off. Existing inbox items are unaffected. Schedule routines stop generating new items while paused.
- Delete a routine: click the trash icon. Events that already created inbox items will still be processed.
Troubleshooting routines
Routine fired but agent never responded:- Check the agent status — it must be
ready, not paused or over budget - Check the dispatcher logs:
docker compose logs -f dispatcher - Check inbox history: Settings → System → Inbox — find the item and check its status
- Confirm the trigger type matches the event you’re testing
- Check that conditions are correct (wrong stage name, etc.)
- Verify the routine is enabled (toggle should be on)
- Confirm the cron expression is correct
- Check that pg_cron is enabled in your Supabase project
- Verify the routine is enabled

