zubair@berkeley — guest-lecture — 90:00
$ claude "teach ENGR 170E how software building actually changed"
From Prompts
to Agents █
How software building moved from the browser to the IDE to the terminal — and why the next skill is engineering the loop, not the prompt.
// Zubair Nabi // ENGR 170E · Technology Leadership & AI // UC Berkeley · Summer 2026
// hello
$ whoami --verbose
>_
NOW
Co-founder & CTO, Kscope
building the unified context platform — teaching machines what your company knows
context
agents
MCP
PREVIOUSLY
Careem · Qubit · INTECH · IBM Research
STUDIED
MPhil, Cambridge — with the Xen hypervisor team
WROTE & TEACHES
Pro Spark Streaming · adjunct faculty, George Washington University
SEEN IN
MIT Technology Review · CNET
OFF HOURS
literature
philosophy
music
pontificating over how AI will reshape humanity
from-prompts-to-agents
● 00 whoami
// warm-up
Quick poll.
> Who shipped something with AI this week?
from-prompts-to-agents
● 01 warm-up
// warm-up
Quick poll.
> Who shipped something with AI this week?
> Who read every line of it?
(Keep your hand up. Watch what happens.)
from-prompts-to-agents
● 01 warm-up
// warm-up
Quick poll.
> Who shipped something with AI this week?
> Who read every line of it?
(Keep your hand up. Watch what happens.)
The interface you use to work with AI determines what AI can do for you.�Prompts were the beginning, not the point.
from-prompts-to-agents
● 01 warm-up
01
$ cd ./the-three-eras
Where the work moved
Browser → IDE → Terminal, 2022–2026
from-prompts-to-agents
● 01 the three eras
// the three eras
Browser → IDE → Terminal
Each move gives AI more context and more actuators.
www
2022 → · BROWSER
Copy-paste
AI sees only what you paste. You are the file system, the compiler, and the messenger.
ChatGPT
v0
Replit
Lovable
from-prompts-to-agents
● 01 the three eras
// the three eras
Browser → IDE → Terminal
Each move gives AI more context and more actuators.
www
2022 → · BROWSER
Copy-paste
AI sees only what you paste. You are the file system, the compiler, and the messenger.
ChatGPT
v0
Replit
Lovable
→
{ }
2023 → · IDE
In your editor
AI sees your open files. Autocomplete becomes chat becomes inline edits.
Copilot
Cursor
Windsurf
from-prompts-to-agents
● 01 the three eras
// the three eras
Browser → IDE → Terminal
Each move gives AI more context and more actuators.
www
2022 → · BROWSER
Copy-paste
AI sees only what you paste. You are the file system, the compiler, and the messenger.
ChatGPT
v0
Replit
Lovable
→
{ }
2023 → · IDE
In your editor
AI sees your open files. Autocomplete becomes chat becomes inline edits.
Copilot
Cursor
Windsurf
→
>_
2025 → · TERMINAL
The agent
AI operates the whole environment: reads the repo, runs commands, tests, commits.
Claude Code
Codex CLI
Gemini CLI
from-prompts-to-agents
● 01 the three eras
// the three eras
Browser → IDE → Terminal
Each move gives AI more context and more actuators.
www
2022 → · BROWSER
Copy-paste
AI sees only what you paste. You are the file system, the compiler, and the messenger.
ChatGPT
v0
Replit
Lovable
→
{ }
2023 → · IDE
In your editor
AI sees your open files. Autocomplete becomes chat becomes inline edits.
Copilot
Cursor
Windsurf
→
>_
2025 → · TERMINAL
The agent
AI operates the whole environment: reads the repo, runs commands, tests, commits.
Claude Code
Codex CLI
Gemini CLI
The human moves from typist → editor → director.
from-prompts-to-agents
● 01 the three eras
// era 1 of 3
2022 → The browser · vibe coding is born
>
AI sees only what you paste — no repo, no history, no environment.
>
You are the file system, the compiler, and the messenger.
>
Amazing demos, painful round-trips — every fix is another copy-paste.
the-browser-loop.txt
1. copy code from editor
2. paste into chat
3. copy answer back
4. run it
5. error
6. copy the error…
7. goto 2
# you are the loop
cf. your Session 3 reading — Karpathy's “vibe coding” + Willison's rebuttal
real world NYT's Kevin Roose — not a coder — built “software for one” apps by typing into a chat box (Feb 2025). “Vibe coding”: Collins’ Word of the Year 2025.
from-prompts-to-agents
● 01 the three eras
// era 2 of 3
2023 → The IDE · AI moves in with you
>
AI sees your open files — context arrives automatically, not by paste.
>
Autocomplete → chat → inline edits — each step hands over a bit more.
>
But you still drive every step — the AI suggests; you apply, run, and verify.
editor — checkout.ts
function checkout(cart) {
- let total = 0;
+ const total = cart
+ .reduce((s, i) =>
+ s + i.price, 0);
}
[ Accept ] [ Reject ]
# you approve every diff
The unlock: context stops being your job — the editor supplies it.
real world fly.pieter.com — a flight sim Levels vibe-coded in Cursor, ~$1M/yr in ads. Cursor itself: $9B → $60B in 11 months (SpaceX agreed to buy it, Apr 2026).
from-prompts-to-agents
● 01 the three eras
// era 3 of 3
2025 → The terminal · the agent arrives
>
The agent operates the whole environment — not a window inside your tool; your tools inside its loop.
>
It reads the repo, runs commands, executes tests, commits.
>
You review outcomes, not keystrokes — intent in, verified work out.
zubair@dev: ~/app
$ claude "add dark mode"
reading 14 files…
editing theme.css, App.tsx
$ npm test
✓ 21 passing
$ git commit -m “dark mode”
done. review the diff?
# the loop runs itself
Why the terminal? It's where every tool already lives: git, tests, deploys.
real world Even Linus Torvalds ships vibe-coded tools now (Jan 2026). And 25% of YC W25 startups had ~95% AI-generated codebases.
from-prompts-to-agents
● 01 the three eras
// the pattern
More context. More actuators.
The same trade in every era: what the AI can see, what it can do — and what that leaves you.
BROWSER
IDE
TERMINAL
AI SEES
what you paste
your open files
repo + env + history
AI DOES
generates text
suggests edits
edits, runs, tests, commits
from-prompts-to-agents
● 01 the three eras
// the pattern
More context. More actuators.
The same trade in every era: what the AI can see, what it can do — and what that leaves you.
BROWSER
IDE
TERMINAL
AI SEES
what you paste
your open files
repo + env + history
AI DOES
generates text
suggests edits
edits, runs, tests, commits
YOU ARE
typist
editor
director
from-prompts-to-agents
● 01 the three eras
02
$ cd ./anatomy-of-a-coding-agent
What's actually inside the loop
No magic. Three ingredients and a while-loop.
from-prompts-to-agents
● 02 anatomy of an agent
// anatomy of an agent
The loop
The rest of this talk is engineering this loop: feeding it (context) and closing it (verification).
gather context
act
observe
verify
repeat until�verified ✓
gather context
Files, git history, docs, error logs — what the agent can see.
act
Tools: read, write, execute, search — what the agent can do.
observe
Compiler errors, test output, screenshots — reality pushing back.
verify
Did it actually work? What separates a demo from a product.
from-prompts-to-agents
● 02 anatomy of an agent
// anatomy of an agent
Three ingredients
Change any one of them and you change what the agent can accomplish.
@
context
what it sees
· files & repo structure
· git history
· docs & conventions
· error logs
Context is the scarce resource — curate it, don't dump it.
$
tools
what it does
· read / write files
· execute commands
· search code & web
· call APIs
Every tool = new capability and new blast radius.
!
feedback
what pushes back
· compiler & type errors
· test results
· linters
· screenshots
Feedback turns generation into convergence.
from-prompts-to-agents
● 02 anatomy of an agent
// anatomy of an agent
Workflows vs. agents · your Session 8 reading, live
Schluntz & Zhang (Anthropic): most teams should start with workflows. When does the loop earn its keep?
WORKFLOW
predefined steps, LLM inside each
step 1 → step 2 → step 3
✓ predictable, debuggable, cheap
✓ same path every run
→ best when the path is known
AGENT
the model decides its own next step
loop { decide → act → observe }
✓ handles paths you didn't foresee
! costlier, slower, harder to predict
→ best when the path is unknown
Coding is the killer agent use case because the feedback is free: compilers, tests, and linters verify every step.
from-prompts-to-agents
● 02 anatomy of an agent
03
$ cd ./live-demo
Cold Call Roulette
Built live. Deployed live. Used on you in ten minutes.
from-prompts-to-agents
● 03 live demo
// live demo
The plan: four moves
Cold Call Roulette: a wheel of names + this course's own cold-call questions, built and shipped in front of you.
01
mockup
Ask for a throwaway HTML mockup of the wheel + question card — no framework, no build step.
→
02
react
“Bigger wheel. Add the question card. Berkeley colors.” Iterate on the sketch.
→
03
implement
Build it for real: one page, all client-side — wheel, question card, names added on screen. No backend.
→
04
deploy
git push + enable GitHub Pages — the Session 3 repo workflow, now on the public internet.
$ open zubair-nabi.github.io/cold-call-roulette # fallback pre-deployed�# this is a v1 — the moment your app needs state, secrets, or APIs, you redeploy to Vercel & co. and those come built in
from-prompts-to-agents
● 03 live demo
// live demo
Why mockup first?
Iterate where iteration is cheapest. Align on the picture before you pay for the plumbing.
without-mockup.log
build the real thing (30 min)
“not what I meant”
rebuild (30 min)
“closer… but no”
rebuild again (30 min)
# expensive guesses
from-prompts-to-agents
● 03 live demo
// live demo
Why mockup first?
Iterate where iteration is cheapest. Align on the picture before you pay for the plumbing.
without-mockup.log
build the real thing (30 min)
“not what I meant”
rebuild (30 min)
“closer… but no”
rebuild again (30 min)
# expensive guesses
with-mockup.log
throwaway HTML mockup (2 min)
“bigger. move that. yes.”
revise mockup (1 min)
aligned ✓
build the real thing ONCE
# cheap alignment
Meta: this very deck started as an HTML mockup — I reviewed the template in a browser before a single slide was built.
from-prompts-to-agents
● 03 live demo
04
$ cd ./extending-the-agent
One context window.
Three ways to fill it.
Engineering the input side of the loop: MCP · Skills · Memory
from-prompts-to-agents
● 04 extending the agent
// extending the agent
Everything the agent knows enters through one door
The context window is a finite token budget. What fills it decides what the agent can do.
context-window — 200k tokens
system prompt · CLAUDE.md standing instructions & conventions
tools what it can do — arrives via MCP
skills playbooks, loaded only when relevant
memory what it keeps across sessions
this task your conversation, files, errors
the budget is finite
Long contexts degrade — models lose the middle. More context ≠ better context.
curation is the skill
The best setups feed the model less, but exactly right. Context engineering is the umbrella discipline.
next three slides
MCP fills the tools layer. Skills fill the playbook layer. Memory fills the continuity layer — it's one slice, not the whole window.
from-prompts-to-agents
● 04 extending the agent
// extending the agent
MCP · Model Context Protocol
One open standard for plugging capabilities into any agent — write a server once, every agent can use it.
database
browser
figma
deploy
slack
your data
agent
before MCP
every agent × every tool = a custom integration. N × M plumbing.
with MCP
tools become servers; agents become clients. N + M.
why you care
your project's data — sheets, DBs, APIs — becomes something your agent can see and act on.
real world Nov 2024 Anthropic open-sources MCP → Mar 2025 OpenAI adopts it → Apr 2025 Google → Dec 2025 donated to the Linux Foundation. Launch to industry standard in one year.
from-prompts-to-agents
● 04 extending the agent
// extending the agent
Skills · progressive disclosure
Packaged expertise the agent loads only when a task calls for it — instead of stuffing everything into one prompt.
always loaded name + one-line description — a shelf label, a few dozen tokens
loaded when relevant SKILL.md — the full playbook: steps, rules, gotchas
loaded when used scripts, templates, reference files — the heavy toolbox
Skills are job descriptions for your agent. Write down how your team does deploys, reviews, reports — and you've defined an agentic workforce.
from-prompts-to-agents
● 04 extending the agent
// extending the agent
Memory · collaboration that compounds
The harness remembers — preferences, conventions, past decisions — so you two adapt to each other.
session-1.log
you: we use TypeScript strict
you: tests live in /tests
you: never touch prod config
you: we deploy via Vercel
…every. single. session.
# groundhog day
session-20.log
$ claude "ship the fix"
strict TS ✓ (remembered)
tests → /tests ✓
prod config untouched ✓
deployed to Vercel ✓
# a colleague, not a tool
Memory is what makes it a collaborator. Without it, every session starts from zero. With it, the relationship compounds — like any teammate.
from-prompts-to-agents
● 04 extending the agent
05
$ cd ./loop-engineering
The skill after prompt engineering
Stop wordsmithing. Start designing the loop.
from-prompts-to-agents
● 05 loop engineering
// loop engineering
Prompt engineering is table stakes.
Loop engineering is the skill.
>
Constraints — tell the agent what “done” means before it starts.
>
Feedback mechanisms — give it tests, linters, mockups, screenshots to react to.
>
Verification steps — make “it works” checkable, not vibes.
the-difference.md
# prompt engineering
"write it better"
→ hope
# loop engineering
"here’s how you’ll know
it’s right"
→ convergence
A good loop makes a mediocre prompt succeed. A bad loop makes a great prompt fail.
from-prompts-to-agents
● 05 loop engineering
// loop engineering
Same loop, missing pieces
Constraints, feedback, verification — one real failure for each piece you just saw.
replit.log — Jul 2025
missing: constraints
An agent wiped a production database
› Told “code freeze — no changes.” It deleted SaaStr's live DB anyway: records on 1,200+ executives, then faked data to cover it up.
› The agent: “I made a catastrophic error in judgment.”
› Nobody told the loop what “done” must never include.
# act needs guardrails
lovable-scan.log — May 2025
missing: verification
1 in 10 vibe-coded apps shipped with an open door
› Security scan of 1,645 apps built on Lovable: 170 let anyone read users' personal data.
› Working demos, real users — zero verification step before deploy.
› Your bar is “a stranger can use it” — not “a stranger can read it.”
# deployed ≠ verified
metr-study.log — Jul 2025
missing: feedback
AI made expert devs slower — nobody noticed
› Randomized trial: veteran open-source devs on their own repos. Measured: 19% slower with AI tools.
› They predicted 24% faster — and still believed +20% afterward.
› No measurement in the loop = feelings as your only signal.
# vibes are not a metric
None of these are model failures — they're loop failures. Finding yours before you ship is literally your Checkpoint 3.
from-prompts-to-agents
● 05 loop engineering
// loop engineering
You already loop-engineer humans
Every good manager designs loops. The agent just runs them faster.
MANAGING PEOPLE
DIRECTING AGENTS
constraints
a brief with acceptance criteria
a prompt with a definition of done
feedback
code review, standups, demos
tests, linters, screenshots in the loop
verification
“show me before we ship”
“run the tests before you commit”
This is why loop engineering belongs in a leadership course: it's delegation, made precise.
from-prompts-to-agents
● 05 loop engineering
// loop engineering
The loop is leaving the terminal
The same architecture, different feedback signal. This is why loop engineering doesn't stop at software.
SOFTWARE AGENT
context → act → observe → verify
sees: the repo, the logs
acts on: files and commands
reality check: compilers and tests
cost of error: a failing build — undo it
EMBODIED AGENT · Optimus & co.
sense → plan → act → physics pushes back
sees: cameras, force sensors
acts on: motors and grippers
reality check: gravity, friction, breakage
cost of error: no ctrl-Z in the physical world
Waymo supervised its loop for a decade before removing the driver. The less reversible the error, the more verification IS the product.
from-prompts-to-agents
● 05 loop engineering
// so what
What this means for you
THIS WEEK · YOUR BUILD
>
Pick one loop to tighten: add a check your agent can run itself — a test, a lint, a screenshot diff.
>
Try mockup-first on your next feature before you build it for real.
>
Write one skill: the thing you keep re-explaining to the AI — write it down once.
YOUR CAREER · THE DURABLE SKILL
>
Tools churn. Every logo on these slides may be gone in five years.
>
The loop stays. Context, action, feedback, verification — in software, in teams, in robots.
>
The durable skill is designing human-AI systems that verify themselves.
from-prompts-to-agents
● 06 so what
$ echo "your turn"
Questions? █
email zubair@kscope.ai�linkedin linkedin.com/in/zubairnabi
process exited with code 0 — go build something
from-prompts-to-agents
● 34 / 34