Part 3: Trajectories — Single-Tool Agent + Logger
Chapters 07–09: Build the smallest possible agent harness, instrument it to record everything, and fine-tune the 1B until it emits valid tool calls.
TUTOR WITH THEFOCUS.AI
Copy this prompt into Claude, ChatGPT, or any external AI assistant. It points the assistant to the course instructions and links it to your student profile to track your progress and customize observations.
You are not enrolled yet. Enroll to generate a Student ID to track lesson completions and store learning notes.
Part 3: Trajectories
Single-tool agent + logger · ~2–3 days
This is where the actual insight of the whole project lands: you are not fine-tuning the model on your code. You are fine-tuning it on the shape of agentic behavior. Build the smallest possible harness, log everything it does, distill a teacher’s traces, and tune the 1B until it emits syntactically valid tool calls. Not smart ones. Valid ones.
| Chapter | What You’ll Do |
|---|---|
| 07 · The Harness | Two hundred lines, one tool: the smallest agent loop that works |
| 08 · The Logger | The trajectory schema — the actual artifact of this part |
| 09 · Teacher Traces | Distill Claude’s traces into training data, tune, and measure validity rate |
What You’ll Have After Part 3
harness.py— the looptrajectory.jsonl— a few hundred teacher tracesto_training_data.py— trajectory JSONL → mlx-lm chat JSONL, with masking- A number: tool-call validity rate before and after tuning — your first proof that any of this works