Mid-level interview questionAsked at Datadog · interview write-up
Design an LLM agent system that picks up Jira tickets, grounds itself in the codebase, writes a fix in a sandbox and opens a pull request.
Model answer
A pipeline with an agent in the middle. Triage first: take only tickets with a clear reproduction and a scoped component. The agent gathers context with tools: code search, file reads, git history, and tests run in a sandbox without production credentials. It writes a failing test, edits code and loops until tests pass, under step and cost limits.
Scroll sideways to see the whole diagram
The context holds the tool definitions and the user's question.
Text version
- The context holds the tool definitions and the user's question.
- The model emits a structured call: a tool name and JSON arguments. With Anthropic's API the reply stops with stop_reason "tool_use".
- The call is text the model generated. Your code checks it before anything runs.
- Your code executes the function. The model has no hands: it only asked.
- The output goes back into the context (a tool_result block) and the model runs again, until it answers instead of calling.
After AI Engineering, Ch. 6 "Function calling", and Anthropic, "Tool use with Claude" (fetched 2026-10-21). Illustrative call.
The output is a pull request with a summary and links, always reviewed by a human.
Practise the rest
15 Agents questions, 492 in all, each with a model answer. Free.
More from Datadog interview questions.
More Agents interview questions
- What actually is an AI agent?
- LLM workflow or agent: which is better?
- Your agent is very slow. What can you do?
- What are guardrails, and where do they sit in an agent?
- What are the bottlenecks of AI agents, and how do you keep them in check?
- Design a harness for running a tool-using agent safely, and an evaluation platform on top of it.