Skip to main content
When mismatch reports pile up, a human can spend hours just grouping them before any real triage happens. This recipe sets up an agent that listens for new MismatchReportedEvents, groups similar reports (same partner row, same suggested correction), drafts a proposed resolution, and files it as a pending item.

What you’ll build

An agent that:
  1. Subscribes to MismatchReportedEvent.
  2. Reads the existing open mismatch reports for the same partner row.
  3. If there’s a similar one, marks them as a group.
  4. Drafts a 1-2 sentence proposed resolution (e.g. “All three reports converge on referenceHotelId ref_01J... — agree.”) and posts it as a pending MISMATCH_PROPOSED_RESOLUTION item.
The agent never sets FIXED or REJECTED — that stays with a human.

Steps

1

Create the agent

Name: “Mismatch triage”. Goal:
Watch new mismatch reports. Group similar ones, draft a proposed resolution as a pending item. Never mark fixed or rejected.
2

Rules

{
  "mismatch_reports": {
    "auto_transition_open_to_in_progress": true,
    "group_similar": true,
    "post_proposed_resolution": true
  },
  "notifications": { "on_escalation": true }
}
3

Activate

The agent runs on the next MismatchReportedEvent (no cron needed).

What a reviewer sees

In Pending → MISMATCH_PROPOSED_RESOLUTION, each item shows:
  • The grouped mismatch reports (count + links).
  • The agent’s proposed resolution text.
  • Apply (advances reports to FIXED with the resolution body) / Modify / Reject buttons.

Equivalent API call

curl -X POST https://api.mapping.travel/api/v1/agents/{id}/rule-sets \
  -H 'Authorization: Bearer mt_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "mismatch_reports": {
      "auto_transition_open_to_in_progress": true,
      "group_similar": true,
      "post_proposed_resolution": true
    },
    "notifications": { "on_escalation": true }
  }'

Undo

Marking IN_PROGRESS is undoable (reverts to OPEN) for 7 days from the workspace Undo Center. Filing pending items is undoable via dismiss.