Skip to main content
Auto-apply rules let a label tag itself. Instead of picking labels by hand, you attach one or more regex rules to a label; when a message you send matches, Synti applies the label — and, for typed labels, extracts a value from the match. It’s the fastest way to keep sessions organized as you work, especially for recurring identifiers like ticket numbers, order IDs, or amounts.

Defining rules

Rules live in the autoRules array on a label inside your workspace’s label config:
Each rule has these fields:
Here a message containing JIRA-1234 attaches the label as ticket::JIRA-1234.

When rules run

Synti evaluates rules automatically whenever you send a message, including messages that were queued and sent later. It only scans your messages — assistant replies and tool output are never matched, so the agent’s own text can’t trigger a label. Before matching, Synti strips fenced code blocks (```) and inline code (`) from the message. That keeps sample data, logs, and snippets from tripping rules they weren’t meant to.

How matches are processed

All rules across all labels are evaluated together against the cleaned message. A few guardrails shape the result:
  • Match cap. A single message produces at most 10 matches, which prevents a bulk paste from exploding into dozens of labels.
  • Deduplication. If a session already carries a given label + value pair, a repeat match won’t add it again.
  • Aggregation. Multiple rules on one label all contribute; their matches combine.

Value normalization

Extracted values are normalized according to the label’s valueType:
  • string — passed through unchanged.
  • number — currency symbols and commas are stripped, and shorthand suffixes expand, so 1.5M becomes 1500000 and 50k becomes 50000.
  • date — passed through unchanged (author it in ISO YYYY-MM-DD form).

Validation and safety

Synti validates patterns both when you save the config and again at runtime. An invalid regex is logged and skipped rather than breaking evaluation, and save-time validation additionally flags patterns vulnerable to catastrophic backtracking (ReDoS) so a slow expression can’t stall matching.
Write specific patterns with word boundaries (\b) and anchored formats. A rule like \b(ORD-\d{6})\b is both faster and less likely to produce false positives than a loose one.
Auto-rules only apply labels — they never remove them. To take a label off a session, remove it manually or ask the agent.