Routing Rules
Control which actor handles which records: match on domain and act, set targets, and let your approvals become rules.
Overview
Routing rules decide which actor handles an incoming record. When a record arrives, Syncropel checks the rules in order and sends it to the first matching target. Rules are settings, not code.
Creating a Rule
spl config add-rule \
--name "code-to-dev" \
--domain code \
--act INTEND \
--target did:sync:agent:devThis rule says: when an INTEND record about the code domain arrives, route it to the dev agent.
Viewing Rules
spl config list-rulesMatch Criteria
Rules match on combinations of fields:
| Criterion | Description | Example |
|---|---|---|
--domain | The domain of the work | code, ops, data |
--act | The act type | INTEND, KNOW, DO |
All specified criteria must match (AND logic). Unspecified criteria are wildcards.
How Routing Works
Syncropel checks in this order:
- Explicit target: if the record has a
body.tofield, it goes there and no rules are checked. - Pattern match: if a pattern that has worked reliably before matches, it is used (the cheapest option).
- Routing rules: your configured rules; the first match wins.
- Trust: the actor with the highest trust in the relevant domain.
- Default: a routing decision is proposed for you to approve.
Most records are handled by patterns and rules. Only genuinely new situations need a manual decision, and those decisions become new rules.
Rules Evolve
When Syncropel proposes a routing decision and you approve it, a routing rule is created automatically. The next identical situation is routed without asking.
You don't need to set up rules in advance. They build up from your decisions.
What's Next
- Actors and adapters: configure the targets that rules route to
- The engine: how routing works in more detail
- Configuration reference: full rule syntax
Orchestration Patterns
The six ways to run a query in steps (single_shot, verify, waterfall, retry_on_low_confidence, escalate, ensemble_with_audit), and how to chain queries when none fits.
Scheduled triggers
Run periodic work on a schedule (daily summaries, stale-task reminders, trust audits) without an external scheduler.