AI Agents & RAG55 minutes

Ticket Triage Agent

Build a read-only Jira triage agent's step function.

Python

Task

Build a read-only Jira analysis agent that investigates a ticket and drafts a triage summary with a proposed priority and owning team.

Requirements

  1. Return a new state with status, steps, pending, observations, answer, seen; never mutate input. max_steps is an integer from 1 to 20, not a boolean. Reject invalid budgets with ValueError containing max_steps. Terminal done/stopped states are unchanged.
  2. Only ready accepts decisions; otherwise raise ValueError containing pending. Tool actions are {type: "tool", id, name, arguments}. Allow read_ticket, search_tickets, and read_project_rules only. Require a nonblank unused string id and dictionary arguments; otherwise raise ValueError containing action. Schedule only id/name/arguments, append id to seen, add a step, and set tool_pending.
  3. Record tool_result events using the matching pending call_id and dictionary result, then clear pending and return ready. Append {call_id, name, result} to observations. A recorded call_id is an unchanged replay; an unrelated call_id raises ValueError containing call_id. Tool errors are evidence of a failed lookup, not proof about a ticket.
  4. A final action contains type: "final", nonblank text, priority, team, citations. Priority is high, medium, or low. Team is platform, data, or product. Invalid text or classification raises ValueError containing action. Require nonempty string citations drawn from documents in previous results, including project-rules. Otherwise raise ValueError containing citation. Save {text, priority, team, citations}, increment steps, and set done. A known citation does not prove a conclusion; the reviewer must check the evidence.
  5. Before accepting any decision, if steps >= max_steps, stop and clear pending. Unknown event types raise ValueError containing event. This function never connects to Jira or changes a ticket. The supplied tools enforce read-only operations and validate tool arguments.
How you are graded
  • Decomposition 15%
  • Prompting the assistant 10%
  • Verification 20%
  • Judgment about AI output 20%
  • Correctness 25%
  • Communication 10%

Scores use evidence from your session. A short or incomplete session may not provide enough evidence for every skill. See a sample scorecard

Interview guidance

This agent reads a Jira ticket, related issues, and the project's routing rules, then proposes a priority and team with citations. You are writing the orchestration step. Use the assistant however you like. I will ask how you know the agent cannot change a ticket and cannot cite something it never retrieved.

  • AI is allowed and expected: your own Claude, OpenAI or Gemini key, or the free in-browser model.
  • You are graded on how you drive and check the AI, not on how much you prompt.
  • Run the checks; read what fails.
  • A new requirement will arrive partway through.
  • Too little AI use is reported as “not enough to grade”, never as a fail.
You will answer 7 debrief questions at the end
  • What did you delegate to the AI, and why?
  • Name one AI suggestion you rejected or changed, and why.
  • Choose one block the AI helped write. Explain what each line does and which test verifies it.
  • What is still risky, and what would you test or ship next?
  • Where could restricted ticket text have leaked in the assistant's first version, and how did you check that it no longer does?
  • Why is a known citation not proof that the proposed priority is right?
  • How would you enforce project access when the agent searches several Jira projects for different users?