21 KiB
theme, title, info, author, transition, mdc, lineNumbers, monaco, aspectRatio, canvasWidth, layout, class
| theme | title | info | author | transition | mdc | lineNumbers | monaco | aspectRatio | canvasWidth | layout | class |
|---|---|---|---|---|---|---|---|---|---|---|---|
| seriph | Chapter 1 · Lesson 1 — What Turns an LLM into an Agent? | English video course for AI Agents in Depth | Bojie Li | slide-left | true | false | false | 16/9 | 980 | cover | chapter-formula-cover |
What Turns an LLM into an Agent?
class: chapter-dense
You Have Already Used an AI Agent
| Product | What it observes | What it does | How it adapts |
|---|---|---|---|
| Cursor | Requirements, codebase, terminal | Searches, edits, runs tests | Debugs until tests pass |
| Deep Research | Web, papers, local files | Searches, reads, synthesizes | Changes the research direction |
| Manus | Browser, files, screen | Clicks, types, executes code | Replans from interface feedback |
| Doubao | Phone screen and apps | Opens, swipes, types, confirms | Responds to the app state |
| Pine AI | Accounts, bills, provider knowledge | Calls, emails, negotiates | Adjusts strategy during the task |
class: chapter-dense
One Formula, Three Levels of Description
| Intuition | Agent component | RL term (optional) | Responsibility |
|---|---|---|---|
| Reasoning engine | LLM | Policy | Given current information, choose what to do next. |
| Working context | Context | Observation space | Everything the Agent can observe, read, remember, and retrieve. |
| Action interfaces | Tools | Action space | Everything the Agent can do—from messages and APIs to code and GUI control. |
class: chapter-dense
Observation + Action Spaces Are the Agent's ISA
class: chapter-dense
Generality Often Comes from Expanding the Interface Boundary
Manus: unite previously separate spaces
- Deep Research: the web enlarges observation.
- Coding: files and code execution enlarge action.
- Computer Use: screen perception and clicking enter both spaces.
Its generality did not come merely from swapping in a stronger model; it took the union of three earlier Agent categories.
OpenClaw: extend into the user's digital life
- Messaging channels make the Agent reachable from almost anywhere.
- A local-first Gateway reaches authorized local files and cloud applications.
- Plugins and Skills enlarge the action interface on demand.
The product boundary moves outward—but authorization, relevance, and verification must move with it.
class: chapter-dense
Five Agent Products, Compared on the Same Three Dimensions
| Agent type | Working context | Action interfaces | Execution strategy |
|---|---|---|---|
| Coding | Requirements, repository, terminal | Search, read/write files, commands | Understand → edit → test → debug |
| Search | Web, academic databases, local files | Queries, web reading, synthesis | Iteratively deepen and redirect research |
| Computer control | Screen, browser, file system | Click, type, scroll, screenshot, code | Observe interface → act → verify |
| Phone assistant | Phone screen, installed applications | Click, swipe, type, open apps | Understand intent → operate → confirm |
| Personal task | Accounts, bills, provider knowledge | Calls, email, forms, user confirmation | Gather → plan → contact → negotiate → report |
class: chapter-dense
Tools Are More Than Callable APIs
1 · Perception
Bring information into the Agent: search, files, APIs, databases.
2 · Execution
Change external systems: code, files, commands, service APIs.
3 · Collaboration
Delegate to sub-agents, request human confirmation, coordinate work.
4 · Event triggers
Email, schedules, and Webhooks activate the Agent; the Agent does not call them.
5 · User communication
Report progress or ask questions by message, voice, or email.
class: chapter-dense
Tool Calling Is a Four-Step Context Update
{
"name": "get_weather",
"parameters": {"city": "string"}
}
{
"tool_calls": [{
"name": "get_weather",
"arguments": {"city": "Beijing"}
}]
}
{
"role": "tool",
"tool_call_id": "call_1",
"content": "{\"temp\":28,\"sky\":\"clear\"}"
}
{
"role": "assistant",
"content": "Today in Beijing: 28°C, sunny."
}
class: chapter-dense
General Tools Compose; Specialized Tools Constrain
General-purpose foundations
- A calculator is enough for basic arithmetic.
- A constrained Python interpreter combines spreadsheet reading, cleaning, statistics, and plotting.
- A controlled working directory preserves plans, logs, intermediate results, and artifacts across long tasks.
Specialized high-risk operations
- Payments, deletion, email, and production deployment need explicit parameters.
- Restrict permissions and make the complete operation auditable.
- Add preview and human confirmation when an action is sensitive or irreversible.
class: chapter-dense
The LLM Supplies Reasoning Before It Supplies Action
Zero-shot generalization
Solve a task with no demonstrations by recombining knowledge and reasoning patterns acquired during pre-training.
Few-shot adaptation
Infer a new task pattern from two or three examples placed in the current context.
class: chapter-dense
“Model as Agent” Internalizes the Decision Policy—not the Tools
What post-training can write into weights
- When a tool call is useful.
- Which tool to choose.
- What arguments to pass.
- Whether to continue after a result.
- How to chain many calls coherently.
What remains outside the model
- The search engine and code sandbox.
- Tool declarations and provider infrastructure.
- Execution, permissions, and returned results.
- The server-side or client-side orchestration loop.
class: chapter-dense
Agents Learn on Three Timescales
class: chapter-dense
Experiment 1-2: Can Kimi K3 Sustain Native Tool Use?
Canonical task
Verify ASEAN membership and the legal status of Jakarta versus Nusantara from official sources. Search once, inspect what evidence is missing, then perform distinct follow-up searches.
Exact provider route
- Fetch Moonshot’s authoritative
web_searchdeclaration. - Kimi decides when and how to call it.
- Each call runs through a Formula Fiber.
- The result returns as the next observation.
kimi-k3 model, multiple distinct successful Fibers, sequential search rounds, reasoning, final answer, retrieval date, and official-source links.class: course-terminal chapter-terminal
Switching to the terminal
$ uv run --extra ch1 python chapter1/web-search-agent/run_experiment_1_2.py --attempts 1 --timeout 120
web_search call executed by a Formula Fiber.MOONSHOT_API_KEY. If the provider is unavailable during recording, inspect the accepted credential-free artifact on the next slide and label it retained evidence.class: chapter-dense
What the Accepted Run Actually Demonstrated
Observed in retained real-API evidence
- Different searches occurred over multiple sequential rounds.
- Every model action matched a provider-side Fiber request.
- The final answer cited ASEAN and Indonesian official sources.
- All acceptance checks passed on 2026-07-29.
What this does—and does not—show
- Shows: the model controls a long search policy and revises it from observations.
- Does not show: that the search engine or execution infrastructure lives in the weights.
- Cost: autonomy can require many calls and a large cumulative context.
class: chapter-dense
The Capability Boundary Is Often the Interface Boundary
Reasoning engine
The LLM supplies world knowledge, planning, judgment, zero-shot generalization, and a learned tool-use policy.
Working context
The observation space determines which task state, evidence, memory, and environmental feedback can influence a decision.
Action interfaces
Tools determine which operations can affect the world; broader interfaces require stronger permissions and verification.