Define patterns
Open Patterns in the sidebar to create, edit, or remove definitions. Describe the condition that should count as a match and any important exceptions. For example:- The user compares pricing plans before upgrading.
- The user repeats a request because the agent lost context.
- The agent claims a task succeeded without evidence that it completed.
- The agent exposes account information before confirming identity.
Choose where a pattern applies
Use Applies to when creating or editing a pattern to add conditions for user, conversation, or event metadata, agent name, success, or raw user ID. With no conditions, the pattern applies everywhere. Conditions combine with AND; selected values within a condition combine with OR. Event conditions must match the same event. Metadata matches exact scalar values or JSON array members. The complete conversation remains available as classification evidence. Filters stay editable. Saving filters removes excluded historical matches and, for an active pattern, queues classification of up to 500 recent conversations. Filtered candidates come from matching events in the last 30 days. Retained matches keep their feedback. Retry the same filters if cleanup or queueing fails. The Patterns API and MCP tools usemetadata_filters:
null means unrestricted on create and preserves saved filters on
update. [] clears filters. Supported sources are user_metadata,
conversation_metadata, event_metadata, event_field (agent_name or success),
and user_id (use key "" and the raw conversation user ID). Use up to 20 conditions,
keys up to 200 UTF-8 bytes, and 1–50 unique nonblank values per condition of up to
1000 UTF-8 bytes each. Sources, keys, and values are trimmed, values deduplicated
and sorted, and conditions canonically sorted. Success values normalize to
failure, success, or non_critical; false includes both failure states.
The retired agent_names field returns an error; put agent names in an
event_field condition instead.
Review the evidence
The catalog shows match volume, activity over time, and the reported cost of matching conversations. Open a pattern to inspect themes and the matching input and output together. A match can refer to either participant; the surrounding conversation determines whether the condition applies. Use the feedback controls to appreciate or reject a match. Review the supporting conversation before treating a classified finding as a product issue. A match count is evidence of the pattern, not proof that the user succeeded. Use the shared filters to inspect user metadata, conversation metadata, event metadata, success, and agent name. The Users page also groups matching patterns alongside the conversations that produced them.Act on a pattern
Choose Alert on a pattern to monitor a count threshold over a selected window. Connect Auto Improve to turn recurring failures into reviewable changes. The same catalog and evidence are available through the Analysis API and MCP server.Patterns replace the separate Intents and Violations catalogs. Existing agent
behavior definitions are migrated into this catalog. Pattern matching is
monitoring evidence; critical authorization and safety checks belong in your application.
Next steps
- Conversations: inspect the full evidence behind a match.
- Alerts: monitor important patterns and thresholds.
- Improvements: turn repeated findings into agent changes.