Learn / Courses
Sign In Student sign-up
← Back to courses
Class 5 · Sat 8/22

Forge — Raise Your Wukong Well

★★★★★ Forge

What you will learn

  • Central thesis: a script is not paperwork — a well-forged one is the most important thing you write for your agent
  • Many AI agents never make it into real use — three common causes: small errors add up over many steps / nobody governs context (Context Debt) / it won't say no
  • Three walls → three paradigms: prompt engineering (not enough) · context engineering (still not enough) · harness engineering (you own the runtime constraint layer)
  • Four actors must all move: LLM (grows on its own) + Platform (memory · harness · Studio) + Script (yours, dense) + You (human in the loop) — miss one and it never grows
  • One loop rules them all: workflow / constraint / knowledge all fold into a single Agent Loop — plan → act → observe → repeat
  • Forge one cut this week · raise your Wukong well — S6 is Demo Day · we walk it toward launch

Watch the class

Opening 4:23
Part 2 39:34
Lab 16:11
Q&A 47:08

Submit your homework

HW (submit · Dragon Ball 5 · Forge): pick ONE place in your S4 script that most needs changing, ACTUALLY change it on SRagent (edit script or feed KB), run it ONCE to see the effect, write a forge log. ⚠️ Keep the S4-declared category (A closer / B Q&A / C companion). ⚠️ S5 is ONE cut, not a full rewrite of S4. Forge one deep >> graze seven shallow. ① WHAT I CHANGED: edit script (write before → after) or feed KB (filename + at least 3 entries). ② HOW IT WENT: run one real scenario, paste 2-3 dialog lines, write how the effect was. ③ NEXT STEP: what to change before S6 + one specific question for Bill.

→ Submit homework

This is a past course: only students who enrolled at the time can hand in homework. To start learning now, begin with the free AI Small Business Quick Start.

Sign in

Go to the free course →

▶ AI Grading Rubric
Dimension Weight Description
What I changed 30% Name the cut + concrete change. Script edit must show before → after; KB feed must show filename + at least 3 entries. "Ran it on SRagent" without specifics = low. Filename without content = low.
How it went 35% Run one REAL scenario (not a test question), paste 2-3 dialog lines, write the effect (better / same / worse) + why in one sentence. Honesty beats "everything improved". Not running = low.
Honest observations 15% Honest reflection on the effect. If it got worse, that observation is valuable — you learned the cost of constraints. "Everything improved" suggests soft scenarios or lack of honesty.
Next step 20% What to change before S6 (concrete: which .md / which step) + one specific question for Bill. "Keep polishing" = low.

90-100 Concrete change + ran with dialog excerpt + honest observation + concrete next step · 60-89 Concrete change + ran but observations occasionally hand-wavy · 40-59 Says polished but vague on change / did not run · 20-39 Barely touched the agent · 1-19 Nearly empty

Further notes

Expand full notes

Session 5 · Forge — Raise Your Wukong Well

Trait: Forge. Today: your script stops being something you wrote and becomes something you forge — round by round, from real runs, until the agent actually does what you want.

Part 0 · The power, and the beauty

A neurosurgeon at Peking Union, self-taught in math, wrote ~20 lines of instruction, let Claude run ~16 hours, and the Crouzeix conjecture — open for 22 years — was proved. Even the problem-setter signed off: correct.

  • Power — ~20 lines of instruction cracked a 22-year-old math problem.
  • Beauty — the instruction itself is beautiful, in structure and in meaning.

The script is not paperwork. A well-forged script is the most powerful — and the most beautiful — thing you'll write this course. (Want to dig in? Search: Crouzeix conjecture · GitHub: jinshanmu/CrouzeixConjecture.)

Part 1 · 88% die on the way to production

88% of AI agents die on the way to production (2026 · replicated across Anaconda, Forrester, a16z, MIT Sloan CIO panel). Not because the model is weak — because of three failure modes:

  • 85% × 10 steps = 20%. Each step looks solid; chain ten together and reliability collapses.
  • Nobody governs context (Context Debt). The same question is right today, wrong tomorrow — the agent never remembers the world changed.
  • It won't say no. It takes everything, takes out-of-scope, never escalates — and festers until it bursts.

Part 2 · Three walls → three paradigms

Nobody is a prophet. We hit three walls and iterated out three engineering paradigms:

  • Prompt engineering — "just write it well." → Not enough.
  • Context engineering — "just feed it all." → Still not enough.
  • Harness engineering — "put a human on the constraints." → You own the constraints.

The Harness is the runtime constraint layer: domain knowledge + an interface into it → reliable behavior in your domain. The two shapes a constraint takes: what the agent knows, and how it is allowed to use it. The industry loop nobody skips: 1 · Record (every time it swings the staff wild) → 2 · Constrain (turn it into a rule, feed it back) → 3 · Refine (keep iterating from real scenarios). Domain grounding is everyone's opportunity.

Part 3 · Four actors — all four must move

Raising a Wukong takes four, and missing any one means it never grows:

  • LLM — the base model. Keeps iterating on its own; stronger every generation. We don't touch this.
  • Platform (SRagent) — memory · harness · Wukong Studio, all forged under three-party participation.
  • Script (yours) — your screenplay: sub-goals, moves, done-when, callback loops. High density is the point.
  • You — the human in the loop. You don't write it and walk away — you raise it.

Part 4 · Write a better script — the eight slots

A dense script packs eight things into the context window at once — this is how you add constraints and make the agent yours:

Role (who you are) · User (who the user is) · Memory (what happened before) · Knowledge (your own knowledge) · Goal (what the goal is) · Rules (how to do things) · Constraints (hard limits) · Tools (tools).

Part 5 · Measure — today and next

  • Today · view the conversations. Read every turn your agent had with a real user. Where it drifts, tighten the script or add a constraint.
  • Next release · robot testing. Automated agents that probe yours, replay real traces, and score behavior — so measurement runs in the loop and catches regressions before they ship.

What gets measured gets raised — today by eye, tomorrow by robot.

Part 6 · One loop rules them all

You no longer sort flows by type. Describe the flow; the model does the planning; the loop does the work. Workflow (closed loop), Constraint (hard limits), and Knowledge (your KB) all fold into a single Agent Loop:

plan → act → observe → repeat

Each model generation plans better, uses tools better, and self-corrects better — so the loop, not the flowchart, is the capability that gets things done.

Lab · Get hands on (run it live, don't watch a demo)

  1. Message channels — reach your Wukong where your users already are: Discord, Telegram, Web. Same agent, three doors.
  2. Conversation & memory — see every turn your Wukong had with each user: what it remembered, what to feed back.
  3. Token price & premium — see what each call costs, top up a little, unlock premium models like Opus / GPT-5.

Pricing is transparent — like a phone card, top up and use what you top up (multiples of 9: $9 / $27 / $54). Charge = actual model cost D + SRagent platform fee 9% × D → total D + 9%×D (e.g. D = $1 → you pay $1.09). Invite fewer than 5 users · free.

Homework

  • HW (submit · ENS5-FORGE · due Sat 8/29 9:00 AM PT, before S6): pick the ONE place in your S4 script that most needs changing, actually change it on SRagent (edit the script or feed the KB), run it once on a real scenario, and write a three-part forge log: what I changed (before → after, or filename + 3 entries) · how it went (2-3 dialog lines + honest effect) · next step (what to change before S6 + one question for Bill). Carry your S4 category (A closer / B Q&A / C companion). Forge one deep >> graze seven shallow. See the S5 Homework Guide in materials for the full template and grading rubric.

An agent is not a document — it is forged.

Next: S6 — Demo Day · Info Day. Every student shows their Wukong live; we talk about what happens after graduation. Come with your forge log done — S6 we walk it toward launch.