This guide outlines example patterns for combining orchestration primitives into complete workflows.
A weekly collections workflow that asks staff for a list of accounts, calls each one, and routes outcomes automatically.
accounts_queue.accounts_queue from the store| Outcome | Branch Actions |
|---|---|
| Payment Collected | Task agent drafts confirmation → Send confirmation email → Store write: remove account from queue |
| Not Reached | Store write: increment attempt count, keep in queue for next cycle |
| Disputed | Task agent drafts verification letter → Send verification email → Store write: move to disputed_accounts |
| Promise to Pay | Task agent generates follow-up reminder → Store write: flag account with promise date |
| Refused | Email collector sends formal notice and waits for written response → Store write: move to escalated_accounts |
Sun 9am → Email collector asks staff for the list
Sun/Mon → Staff replies with accounts (CSV or text)
Mon → AI parses reply → Store write → Voice calls begin
Mon → Each call classified → Store updated → Ready for next cycle
The loop closes automatically: accounts that are not resolved stay in the queue for the next weekly run.
A recurring workflow that checks in with a list of clients and escalates non-responders.
client_list and no_response_count| Outcome | Branch Actions |
|---|---|
| Replied - Happy | Store write: reset their no-response count to 0 |
| Replied - Needs Attention | Task agent drafts action items → Send internal notification email |
| No Reply | Store write: increment no_response_count for this client |
| No Reply - Escalate | (When count exceeds 3) Task agent drafts escalation summary → Voice agent calls account manager |
Gather data from multiple departments through email, compile it, and distribute a summary.
sales@company.com: "Please reply with this month's sales figures." Parse mode: AI. Store key: sales_data. Timeout: 48 hours.support@company.com: "Please reply with this month's support metrics." Parse mode: AI. Store key: support_data. Timeout: 48 hours.sales_data and support_data into a formatted monthly summaryScore and re-engage leads over multiple weeks until they convert or are archived.
active_leads list| Outcome | Branch Actions |
|---|---|
| Hot Lead | Voice agent places an immediate call → Task agent logs outcome → Store write: update lead status |
| Warm Lead | Send personalized email → Store write: keep in queue, increment touch count |
| Cold Lead | Send re-engagement email → AI router checks if touch count > 5: if yes, archive; if no, keep in queue |
| Converted | Task agent updates CRM → Store write: remove from active_leads |
Each week, converted and archived leads are removed from the queue while warm and cold leads cycle back for another touch.
{{ key_name }}. For example, {{ accounts_queue }} injects the stored list directly into the prompt. Objects and arrays are formatted as JSON automatically.update_orchestration_store tool. This can reduce the need for a separate Store Write step after every agent.{{ taskAgentResponse }}.