The assignments are not five unrelated exercises. They are one system that you progressively take apart and take control of. You will first use an existing coding agent to build an agent application, then replace the agent runtime with your own loop and build the evaluation set the rest of the sequence is graded on, then optimize everything around a black-box model API, then replace that API with a model you serve yourself, and finally optimize the entire agent stack.
Assignments 1, 2, and 4 are worth 10% each. Assignments 3 and 5, the two optimization assignments, are worth 20% each. Together, the assignments account for 70% of the course grade. There is no exam. The remaining major build is the final project (20%), where you choose the problem yourself.
Assignments 1, 2 and 4 include a writeup, committed to the repository alongside the code. Assignments 3 and 5 are submitted as a published blog post, which documents your journey of optimizing the agent and full stack. All five are individual. Estimated effort runs 4–6 hours for Assignment 1, 10–12 for Assignment 2, 10–15 for Assignment 3, 10–14 for Assignment 4, and 12–18 for Assignment 5.
All five assignments submit code through one private GitHub repository. Create it once, and put each assignment in its own directory (assignment1/, assignment2/, and so on). Keep the repository private, and add the instructor and the four TFs as collaborators so they can access it: 1a1a11a, LauYeeYu, SeverinaZheng, G6KlayWang, and AdvaithRavishankar.
Start as an agent user. Use Claude Code to build a web UI for Claude Code itself, a browser front end that drives a real agent session: submit a prompt, watch the trajectory stream live (every tool call, with its input and result), see it branch into a tree when the agent spawns subagents, see when a run fails, continue the session, and see what each run cost. Serve it on your own machine (a public CloudLab or AWS deployment is optional), and write up what you learned. The assignment is deliberately small, and it is the one assignment nothing later in the course is measured against.
No agent framework. Build the loop yourself around a model API from provided starter code: tool calling with machine-readable schemas, context management, retries, termination, and graceful failure under malformed output and broken tools. Evaluate on a provided benchmark plus test cases you write, trace one trajectory to find its critical path, and run the required experiments on step limits, context policy, and a small model against a large one, where the question is which of the small model's failures your runtime could have caught. Hidden tests probe the runtime, not the model.
The model is still a black-box API, so optimize everything around it. Reduce unnecessary tokens and calls, choose cheaper models where they are sufficient, overlap tool execution, compress or restructure context, and redesign the control flow. Hold task success fixed while driving cost and latency down. Then identify the bottlenecks you cannot solve because the serving stack is still outside your control.
Remove the frontier API. Serve a 7–8B open-weight model using an inference engine you operate yourself. Measure the quality loss, diagnose why it happens, and recover as much performance as you can through the harness. You may not solve the problem by switching to a larger model or falling back to the commercial API.
Now everything is in scope: the agent loop, the model, and the serving system. Profile the full execution path until you can explain where the time, tokens, and compute go. Write down a performance hypothesis before changing the system. Then optimize across layers and re-run the same workload to determine which changes actually mattered.
1 “Mads” abbreviates Modern Agent Design and Systems, the arc of this course, and nods to MaDSys, Harvard’s Measurement and Design of Systems research group, which teaches and supports it.