University Team Project
Data & AI 6 Agent Engineering
An engineering case study in tool-using LLM agents, covering a bounded execution loop, a custom MCP interface, reproducible evaluation and controlled permissions.
Agent system design
- Agent loop. The model chooses tools dynamically, receives structured results or errors, and decides whether to continue. Step limits and token or time budgets bound execution.
- MCP integration. A custom MCP server exposes task-specific tools or data. The agent uses an MCP client for discovery and invocation. Clear descriptions and typed Pydantic or JSON Schema contracts define and validate inputs and outputs.
- Architecture trade-offs. Use the simplest agent topology that serves the workflow. Compare it with a simpler baseline to measure what dynamic tool selection adds.
- Security and oversight. Define trust boundaries and least-privilege tool permissions. Protect sensitive data and secrets, validate inputs, and require human approval before irreversible tool actions. Evaluate controls with adversarial cases.
Objective
Design an LLM-powered agent for a defined workflow where model-directed tool use can be measured against a simpler approach. The engineering goal is a system whose behavior, cost, failure modes and permissions can be examined.
Architecture
Separate the Python agent loop, MCP client and server, tool implementations and evaluation harness. The agent works with structured tool contracts and handles tool results, errors and budget exhaustion explicitly. Execution traces connect decisions, tool calls and outputs so a failed run can be investigated.
Engineering practices
Evaluate both systems on at least 20 cases with at least two graders, including a code-based grader, and at least three runs per case. Report pass@1, pass^k (all k attempts pass), cost and latency. If using an LLM judge, calibrate it against human-labelled examples. Trace the evaluation runs and use failures to assess the architecture and security controls.
Engineering trade-offs
The case study connects architecture decisions to measurable agent behavior. Tool contracts make actions testable, traces make failures diagnosable, and explicit permissions and approval gates define how the agent may act.
Design scope and deliverables
The engineering specification includes a Python project with pyproject.toml, a dependency lock file, .env.example, pytest tool tests, technical documentation and a reproducible one-command startup. The evaluation package includes cases, graders, traces, a baseline comparison and a report covering trade-offs and limitations.
