Session 07 · Thursday 1 October 2026

Task decomposition and specialized agents

Cut the work so each piece fits one context.
Then decide what runs each piece.

16.S893AI Agents for Engineering Research
Your feedback from Tuesday

What you asked for

What you wrote
  • “Demos in building and managing sub-agents. Demos in setting up extensions.”
  • “Not sure the breakdown of how to use different agents yet. I get it in theory but not in practice.”
  • “Live examples and times to brainstorm with a partner.”
Today
  • Today we plan it. Tuesday we build it together
  • One question that sorts skill, tool, script and agent
  • Thirty minutes in groups, on your projects
  • A techniques table at the end, every session
  • Fewer words per slide
Sessions 2 to 6

Recap: where we are

  • The model predicts the next token. All it knows about your problem is in the context
  • The context is finite, and it degrades before it is full
  • The harness runs tools and puts the results back in the context
  • The sandbox limits what a wrong tool call can do
  • The test is the only approval that counts. The agent can propose one; you approve it
Part 01

How to ensure tasks are right-sized

Why the task has to be small

At about 100k tokens the model starts to lose what sits in the middle.
A long context degrades before it is full.

The mental model

One task fits one fresh session
and ends with one test you approved.

If you cannot write the test yet, it is still planning.
Planning ends in a file, not in an agent run.

The task file

The plan is a set of task files

Backlog.md is one tool that keeps files in this shape, with a list and a board over them.

# backlog/tasks/task-1 - Wrap-XFOIL-as-a-pi-tool.md
## Description
Register xfoil_polar in an extension so the agent can run a NACA polar with a schema.
## Acceptance Criteria
- [ ] #1 node test-tool.mjs returns the NACA 2412 table with CL(4 deg) = 0.715 ± 0.001
- [ ] #2 A NACA code that is not 4 digits raises an error; nothing reaches XFOIL
Externalized memory

A fresh session gets the repo, the task file and the test.
Not the previous transcript.

Part 02

Skill, tool, script or agent

One question for every step

Where does the output go?

AnswerWhere the output goesChoose it whenExample
SkillInto this context, when the model asksThe model lacks know-how, not codeSKILL.md on ncrit
ToolInto this context, through a schemaA step must run the same way every timexfoil_polar
ScriptInto a file; no modelYou can write the for-loopsweep.py
AgentInto a fresh context; only the answer returnsOutput you will not read, or a different modelxfoil-analyst
A skill, followed through the AeroAgent reference library
A tool, followed through the XFOIL wrapper registered in a pi extension
A specialized agent, the parent session and the child process it starts
Part 03

Your project

In groups · by project type

Groups

GroupMembersWhat the projects share
AKevin, Ruizhe, Allegra, ShreyaPublic datasets and long data pipelines
BMadison, Grace, KazukiCFD solvers and interpretation
CBjarni, Anna, NathanaelA simulation code to wrap, checked against published or existing numbers
DMichael, Stephen, HughA training or build loop the agent sets up, launches and summarizes
EBen, Menna, UfukA formulation or controller checked for meaning and problem validity
In your group · 30 minutes

One skill, one tool, one agent

  • Pick a notetaker, who takes notes and reports out
  • Keep time: 30 minutes, and go through each person’s project
  • For each item: what goes in, what comes back, how you would know it is wrong
Report out · 10 minutes

One item per group, two minutes

  • Is it a skill, a tool or an agent?
  • What goes in, and what comes back
  • How you would know it is wrong
Techniques so far

Techniques so far

TechniqueSessionThe rule
Context2, 3All the model knows about your problem is in the window
Skill3A file the model reads when the task matches
Sandbox4Limit what a wrong tool call can do
Approved tests6The agent proposes tests; you approve them
Task file7One task, one fresh session, one approved test
Tool, script, agent7Where does the output go? A schema, a file, a fresh context
References · everything on the slides is paraphrased

References

Before Tuesday

Read

Anthropic, Building effective agents, the section on workflows and agents (10 min). The pi-subagents README, the first two sections (5 min).

Next →
Back to course home