AI and ML Bootcamp · Lecture 31 · lecture notes
Week 31 - AMA: Prime Agent, Memory Design, Image Models, Duplex Voice and Career Strategy
In short — This was an open doubt session. Most of it was career advice, with a few technical answers. The technical parts cover how a self-improving RLM harness (IPython kernel.">Prime Agent) is built, who decides what goes into short-term vs long-term memory, the two families of image models, duplex voice agents, and what a minimal harness needs.
Prime Agent: self-improving RLM harness
adds to earlier · IPython kernel as the RLM main loop, and a container harness that refines prompt, memory, skills and sub-agents. · builds on Lecture 12: Week 11 - AI&ML | Recursive Language Model | 28/03/2026, Lecture 12: Week 11 - AI&ML | Recursive Language Model | 28/03/2026, Lecture 18: Week 17 - AI&ML | Harness, Context, and Evals | 09/05/2026
Prime Agent - an open-source harness agent built on an RLM plus a self-improving loop.
- Main loop runs in an IPython kernel (integrated Python), not plain Python.
- The context is a variable inside the kernel. The LLM reads it by calling Python.
- A memory variable (e.g. subs memory) stores all memory. It can be orchestrated however the builder wants.
- The RLM can use skills and tools, and spawn sub-agents that return results to it.
- A container harness reads the agent's own state: prompt, memory, skills, sub-agents. It refines them using logs and hot spots where the agent fails.
The RLM does the work; the container harness improves the RLM's own prompt, memory, skills and sub-agents.
!
Hard-looking new systems are usually known parts combined. If you know RLM, harness and agent, Prime Agent is just: how do they use RLMs and how do they make the improvement loop work.
Who decides short-term vs long-term memory
adds to earlier · The split is decided by designer-written gates and product needs, and every memory system reduces to store and retrieve questions. · builds on Lecture 19: Week 18 - AI&ML | Memory | 16/05/2026, Lecture 19: Week 18 - AI&ML | Memory | 16/05/2026, Lecture 19: Week 18 - AI&ML | Memory | 16/05/2026
The LLM does not decide the memory category. The algorithm and gates you write do.
- Short-term -> matters only for the current session.
- Long-term -> things worth knowing about the user for a personalised experience.
- Where the line sits is different for every product. First decide what memory the product needs.
Every memory system answers the same questions:
- What to store, and where.
- How to store and edit it.
- How to retrieve it correctly.
Good places to learn: open-source memory projects such as Hermes, Mem0 and Supermemory.
Two families of image models
builds on Lecture 25: Week 25 - AI&ML | Computer Use Agents | 08/07/2026
| Family | How it works | Notes |
|---|---|---|
| Autoregressive | Generates the image piece by piece (token or pixel), one after another, like text | Used by ChatGPT image generation |
| Diffusion / flow matching | Different generation process built on heavier maths | Ideas are elegant but hard to learn; fewer people work on it, so it is a good niche |
Studying diffusion and flow matching takes a long, maths-heavy journey. AI tools help with the learning.
Simplex vs duplex voice agents
adds to earlier · Simplex (turn-taking) versus duplex (simultaneous) communication in voice agents. · builds on Lecture 19: Week 18 - AI&ML | Memory | 16/05/2026
- Simplex (turn-taking) -> one side speaks, then waits for the other to respond.
- Duplex -> both sides can speak and listen at the same time, like chatting with a human.
- Duplex voice agents are hard to build, and research on them is active.
Minimal harness and agent practice advice
adds to earlier · A minimal harness with four tools (read, write, edit, bash); advice on learning by building. · builds on Lecture 18: Week 17 - AI&ML | Harness, Context, and Evals | 09/05/2026, Lecture 28: Building Terminal Agent - (Claude Code CLI Project)
- The best framework is no framework.
- A minimal, opinionated harness uses only four tools -> read, write, edit, bash. Add more yourself if needed.
- Evaluate a coding agent such as Nanocode by running it on Terminal-Bench through the Harbor framework.
How to learn from projects
- Pick something you like and build it as it is.
- Then ask: what can I change? Why do five components do the same task?
- Going down that rabbit hole beats watching an end-to-end tutorial. (Feels productive, is not)
- Projects prove you can finish what you start. Concepts are what interviews test.
Keeping up and what to know
builds on Lecture 1: Week 0 - AI and ML | Orientation | 09/01/2026, Lecture 20: Week 20 - AI&ML | How To Read Research Papers | 31/05/2026
- Strong basics are what let you place any new model or harness quickly.
- For any new thing, pull out the 2-5 main ideas. The rest is built on known parts. (Do not try to cover every minor idea in a paper)
- Backtrack from a new paper to its roots and read those.
- Classical ML is worth skimming: it stops you redoing tested ideas, and some questions (e.g. the kernel trick) come up.
- Interview questions depend on the research field (e.g. YOLO, vision transformers vs text transformers for computer vision).
- Small vs general models debate -> a small model can beat the biggest one on a narrow job, but products wanting one model good at everything push toward general models.
Example
RLM and continual learning were covered before Prime Agent appeared. Knowing both made Prime Agent easy to understand.
Glossary
- Prime Agent
- Open-source self-improving harness agent built on an RLM in an IPython kernel.
- IPython kernel
- Interactive Python environment where variables persist; the RLM's main loop runs here.
- Container harness
- Outer layer that reads an agent's state and refines its prompt, memory, skills and sub-agents.