Write run_agent: find the queue that owns a ticket

Agent buildEasy15 min

A help desk merges duplicate tickets, and the old ticket keeps its old queue.

Your task

Write run_agent. It names the queue that owns a ticket, following merges.

  • fetch(doc_id) reads a ticket by its id, such as T-301, or returns None when there is no such ticket
  • search(query) returns the ids of tickets containing that text, shortest first
  • a merged ticket says "Merged into T-xxx", and the ticket it was merged into owns it
  • answer with the queue name in one word, or not found
  • each scenario carries a token budget; going over it fails that scenario

At submit the suite runs your agent against help desks you have not seen, each with its own tickets.