You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/understanding-the-tools/lesson-1-intro.md
+3-13Lines changed: 3 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,21 +108,11 @@ Now that we've established the machinery, let's discuss the operating principles
108
108
109
109
## Summary
110
110
111
-
You're learning to **operate precision tools**, not manage teammates. Understanding the machinery is fundamental:
111
+
You're learning to **operate precision tools**, not manage teammates. Understanding what AI agents actually are - LLMs (token prediction engines) wrapped in agent software (execution layer) - is fundamental to using them effectively.
112
112
113
-
-**LLMs** are token prediction engines (brains) - sophisticated pattern matching through transformer architecture, not sentient beings
114
-
-**Agent frameworks** provide the execution layer (body) - enabling LLMs to perform actions via tools
115
-
-**Your role** shifts from writing every line to orchestrating autonomous task execution
113
+
The three operator errors covered above stem from anthropomorphizing these tools. Avoid assuming they "know" things, "care" about outcomes, or function like teammates. They're sophisticated instruments that execute language-based instructions.
116
114
117
-
**The three operator errors to avoid:**
118
-
119
-
1. Assuming the agent "knows" things (it only sees ~200K tokens of context)
120
-
2. Expecting it to "care" about outcomes (it executes literal instructions)
121
-
3. Treating it like a teammate instead of a tool (it's a precision instrument that speaks English)
122
-
123
-
Like CNC machines transformed manufacturing from manual craftsmanship to programmed operations, AI agents transform software engineering. The result is the same: massive gains in bandwidth, repeatability, and precision.
124
-
125
-
Now that you understand the machinery and mental model, the next lesson covers **what AI agents actually are** - their architecture, execution workflows, and how your role as an engineer evolves into an operator.
115
+
The next lesson covers agent architecture, execution workflows, and how your role as an engineer evolves into an operator.
In Lesson 1, we established that **LLMs are brains** (token prediction engines) and **agent frameworks are bodies** (execution layers). Now let's understand how these components work together to create autonomous coding agents that can complete complex tasks.
9
9
10
-
## Learning Objectives
11
-
12
-
By the end of this lesson, you will be able to:
13
-
14
-
- Explain how agents work as textual systems (system prompts → user tasks → tool calls → results → responses)
15
-
- Distinguish between built-in tools and MCP-based external tools and when to use each
16
-
- Understand why CLI coding agents deliver superior developer experience, especially for concurrent work across projects
17
-
- Recognize context engineering as the fundamental skill for effective AI-assisted coding
18
-
19
10
## The Agent Execution Loop
20
11
21
12
An agent isn't just an LLM responding to prompts. It's a **feedback loop** that combines reasoning with action, allowing the LLM to iteratively work toward a goal.
@@ -95,7 +86,11 @@ sequenceDiagram
95
86
A->>U: Agent Response<br/>"Task complete"
96
87
```
97
88
98
-
**Key insight:** The agent doesn't "think" separately from its output. When you see the agent reasoning ("I should check the validation logic..."), that's not internal thought - it's text being generated in the context, visible to both you and the LLM itself.
89
+
:::tip[Reasoning is Just Text]
90
+
The agent doesn't "think" separately from its output. When you see the agent reasoning ("I should check the validation logic..."), that's not internal thought - it's text being generated in the context, visible to both you and the LLM itself.
91
+
92
+
**Extended thinking modes complicate this further:** Providers like Anthropic and OpenAI now offer "extended thinking" where the model generates hidden reasoning tokens before producing visible output. What you see in the context is a _summary_ of that internal chain-of-thought, not the full reasoning process. You're billed for the complete hidden reasoning tokens, but you only see an abbreviated version. The actual reasoning is opaque - you can't inspect or debug it.
93
+
:::
99
94
100
95
### Concrete Example: What the Context Actually Looks Like
101
96
@@ -284,107 +279,11 @@ Open three tabs, run agents on different projects (refactoring in `project-a`, d
284
279
We'll dive deep into **Planning & Execution** strategies in Lesson 7, including how to structure concurrent work across multiple agents, when to parallelize vs. serialize tasks, and how to coordinate complex multi-project workflows.
285
280
:::
286
281
287
-
## Context Engineering: Optimizing the Entire Flow
288
-
289
-
Now that you understand agents as **textual systems** and LLMs as **stateless**, you can see why effective AI-assisted coding is fundamentally about **context engineering** - deliberately optimizing every piece of text that flows through the agent's context window.
290
-
291
-
**Because the LLM is stateless, the context is its entire world.** You have total control over what the agent knows, believes, and can do. This makes context engineering the most powerful skill for AI-assisted coding.
292
-
293
-
### Everything is Context Engineering
294
-
295
-
When you work with AI coding agents, you're not just "writing prompts." You're engineering a **complete textual environment** that determines agent behavior:
296
-
297
-
**1. System Prompts** (set by agent developers)
298
-
299
-
- Define the agent's role and behavior
300
-
- Specify available tools and their usage patterns
301
-
- Set safety guardrails and operational constraints
302
-
-**You control this** when building custom agents or configuring MCP tools
303
-
304
-
**2. User Prompts** (your tasks and instructions)
305
-
306
-
- The goals you give the agent
307
-
- Context you provide about the codebase
308
-
- Constraints and requirements you specify
309
-
-**You control this** every time you interact with the agent
310
-
311
-
**3. Tool Descriptions** (eat up context tokens)
312
-
313
-
- Each tool has a description explaining its purpose
314
-
- Parameters and expected inputs
315
-
- Examples of correct usage
316
-
-**Trade-off:** More tools = more capability, but also more context consumed and potential confusion
-**Accumulates over time:** Long conversations fill the context window
331
-
332
-
### Steering: Guiding Behavior Through Context
333
-
334
-
**Steering** is the practice of guiding LLM behavior by controlling what's in the context. You're not just "asking better" - you're actively directing the agent's attention and approach.
335
-
336
-
**Vague context = wandering behavior:**
337
-
338
-
```
339
-
User: "Fix the bug"
340
-
Agent: [Searches entire codebase, loads 20 files, gets confused, makes random changes]
341
-
```
342
-
343
-
**Specific context = steered behavior:**
344
-
345
-
```
346
-
User: "Fix the authentication bug in src/auth/middleware.ts - tokens are
347
-
expiring 1 hour early. The issue is likely in the JWT verification logic
348
-
that compares timestamps. Tests are in tests/auth.test.ts"
349
-
350
-
Agent: [Directly reads the specific file, understands the narrow scope,
- Root cause hypothesis → directed investigation path
359
-
- Test location → specified verification method
360
-
361
-
**Steering through statelessness:**
362
-
363
-
Because the agent has no memory, you can steer it to review its own code objectively:
364
-
365
-
```
366
-
# Conversation 1: Implementation
367
-
You: "Implement rate limiting middleware for our API"
368
-
Agent: [Writes code using in-memory store]
369
-
370
-
# Conversation 2: Fresh context, different steering
371
-
You: "Review src/middleware/rateLimit.ts for security and scalability issues"
372
-
Agent: [Finds: in-memory store fails in multi-instance deployments, suggests Redis]
373
-
```
374
-
375
-
The agent doesn't defend its earlier choice - it critiques the code as if encountering it for the first time. You steered it from "implementer" to "reviewer" by controlling the context.
376
-
377
-
### The Rest of This Course
378
-
379
-
Now you understand the foundation: agents are textual systems, LLMs are stateless, and you control behavior by controlling context.
380
-
381
-
**Context engineering** is the practice of deliberately shaping what flows through the agent's context window - system prompts, user prompts, tool results, everything. It's the fundamental skill for effective AI-assisted coding.
382
-
383
-
Every lesson from here forward teaches context engineering techniques for different scenarios.
282
+
## Context Engineering and Steering
384
283
385
-
**The mental model shift:** Stop thinking "I'm asking the AI to do something." Start thinking "I'm steering the agent by engineering its textual environment."
284
+
Now that you understand agents as textual systems and LLMs as stateless, the core truth emerges: **effective AI-assisted coding is about engineering context to steer behavior**. The context window is the agent's entire world - everything it knows comes from the text flowing through it. You control that text: system prompts, your instructions, tool results, conversation history. Vague context produces wandering behavior; precise, scoped context steers the agent exactly where you need it. You can steer upfront with focused prompts, or dynamically mid-conversation when the agent drifts. The stateless nature means you can even steer the agent to objectively review its own code in a fresh conversation.
386
285
387
-
Experienced engineers excel at context engineering because you already think in terms of interfaces, contracts, and system design. This is just applying those skills to the LLM's textual interface.
286
+
This is system design thinking applied to text - you're already good at designing interfaces and contracts. The rest of this course teaches how to apply those skills to engineer context and steer agents across real coding scenarios.
0 commit comments