Sarah had 3,000 photos from her trip across Southeast Asia. They were scattered across her phone, her camera, and a backup drive. The filenames were meaningless: IMG_4521.jpg, DSC_0089.jpg, Photo_2024_03_15.png. She wanted them organized by country and city, with dates in the filenames, duplicates removed.
She tried three different photo organization apps. Each did part of what she wanted, but none could handle her specific combination of requirements. The apps had pre-built features, and her needs did not fit those features exactly.
Then she asked a general agent for help. Here's what she wrote:
"I have 3,000 photos scattered across three folders. They have meaningless names like IMG_4521.jpg. I want them organized by country and city based on their location data, with dates in the filenames (YYYY-MM-DD format), duplicates removed, and everything in a clean folder structure."
That's it. Plain English. No code, no technical knowledge required.
The agent translated her request into a program that:
Fifteen minutes later, her photos were perfectly organized in exactly the way she wanted. Sarah didn't write a single line of code. She described what she wanted in her own words, and the agent handled the translation.
This is Principle 2 in action. The general agent succeeded where specialized apps failed because it could write code. Code became the interface through which the agent could do anything Sarah needed, not just what some app designer anticipated.
If you just read about Principle 1 (Bash is the Key), you might wonder: "Isn't Bash code? Why are these separate principles?"
Good question. Here's the distinction:
Bash commands like ls, grep, mv, and find let the agent navigate and manipulate the file system. They're quick, direct operations—look here, move that, search for this.
Code (Python scripts, data processing, custom programs) lets the agent think and build. When Sarah needed her photos analyzed for location data, compared for duplicates, and reorganized with custom naming—that required computation, not just file manipulation.
Bash opens the door. Code does the work inside.
Both are essential. An agent with only Bash can explore but not compute. An agent with only code generation but no file access can think but not act. Together, they make general agents truly capable.
Here is what Anthropic discovered when they released Claude Code. People were not just using it to write software. They were using it to:
This led to a fundamental insight: general agents that write code can solve any computational problem. Code is not just for programmers. Code is the universal interface through which agents interact with computers.
Think about what this means. A specialized "photo organizer" tool can only do what its creators built into it. Ten features, maybe twenty. If your needs do not match those features, you are stuck.
But a general agent that writes code has no such limits. Whatever you can describe, it can build. Your specific situation, your exact requirements, your unique combination of needs. The agent writes code that fits your problem precisely.
Imagine you need work done on your house. The traditional approach is to call specialists:
Each specialist is good at their one thing. But this approach has problems:
Early approaches to building helpful software worked the same way. A "research agent" for gathering information. A "finance agent" for calculations. A "writing agent" for content. Each one limited to its pre-built capabilities.
Now imagine a different approach. Instead of specialists, you have one skilled problem-solver who can build tools for any job:
This is what a general agent does when it writes code. Instead of selecting from pre-built features, it writes solutions. Instead of being limited to what designers anticipated, it creates what you actually need.
Sarah's photo organization worked because the agent was not constrained by pre-built features. It wrote code that handled her exact situation:
Why is code such an effective interface for agents? Because code gives agents five distinct powers that nothing else provides.
Watch what happens when you ask a general agent to calculate something complex. If it tries to reason through the calculation in words, it might make mistakes. Language is fuzzy:
But when the agent writes code to do the calculation, something changes. The code executes with perfect precision. 127 times 89 always equals 11,303. No approximation, no drift, no fuzzy thinking.
Story: The Budget Analysis
Marcus needed to analyze his small business expenses. He had a year of transactions and wanted to know:
If he just asked for "a summary," the results would be vague. But the general agent wrote code that processed every transaction precisely. It:
The code did not approximate. It computed. That precision came from code being the interface between the agent's understanding and the computer's execution.
What the agent actually wrote (simplified):
Notice: Marcus did not write this code. He said "analyze my expenses." The agent translated his intent into precise computation. That is the principle in action.
Many tasks involve multiple steps. First do this, then check that, then based on the result, do something else. Traditional approaches handle these steps one at a time, with back-and-forth at each stage.
Code lets the agent write an entire workflow at once. All the steps, all the conditions, all the logic, captured together. Then the whole thing runs smoothly from start to finish.
Think of it like building a train track versus pushing a cart by hand. Without code, the agent asks you at every junction: "Should I go left or right? What if it's a PDF? What if it's empty?" With code, the agent builds the entire track in advance—all the switches, all the decision points—and the train runs itself.
This decision tree runs automatically. No back-and-forth. No interruptions. The code handles every branch.
Consider a job applicant tracking applications across emails, spreadsheets, and job sites. An agent could write code that scans emails for confirmations, cross-references a spreadsheet, calculates days since each application, and generates a prioritized follow-up list. This is not one simple task—it is a workflow with multiple data sources, conditional logic, and calculated outputs. Code lets the agent orchestrate all of it as a coherent whole.
Agents often need to work with lots of information:
How do they keep track of it all?
File systems provide the answer. The agent can create files to store information, read files to retrieve it, search through files to find what it needs, and organize files into meaningful structures.
Imagine researching a dozen electric vehicles across range, price, reliability, and satisfaction. An agent can gather data from multiple sources, save each piece to organized files, cross-reference results into comparison tables, and generate a final report. The agent creates folders for each model, files for different data types, and summary documents. Without file system access, the agent would struggle to manage all that information. With it, the agent has organized memory that persists across the entire research process.
Different systems store data in different formats:
Different services have different ways of being accessed. This fragmentation could make integration impossible.
But code can read any format, transform any data, and connect to any service. Code serves as a universal translator between systems that were never designed to work together.
Story: The Event Planning Merge
Aisha was planning a large family reunion. She had:
A general agent needed to bring all of this together. The agent wrote code that:
No single tool was designed to handle this combination of sources. But code could interface with all of them, making the agent universally compatible.
Sometimes you need a custom tool that does not exist:
Code lets agents create these tools on demand. You describe what you need, the agent writes code, and suddenly you have a tool that does exactly that thing.
Imagine managing a community garden and needing to track plot assignments, water usage, harvest yields, and volunteer hours. No garden management app does quite what you need. A general agent can build exactly the right tool: code that tracks your specific data points, calculates the metrics you care about, and generates weekly reports in the format that works for your community newsletter. The agent does not find an existing tool—it creates one. Anything you can describe, the agent can build.
Understanding this principle changes how you work with general agents.
Your job is to be clear about what you need. The agent's job is to figure out how to accomplish it through code.
The second version focuses on the outcome you want. It gives the agent freedom to write whatever code accomplishes that goal.
The more precisely you describe your situation, the better the agent can tailor the solution.
Vague:
"Organize my files."
Specific:
"I have files in three folders: Downloads, Desktop, and Documents. I want all PDFs moved to a folder called 'PDFs', all images to 'Images', and all spreadsheets to 'Spreadsheets'. Files older than one year should go into an 'Archive' subfolder within each category."
Specific descriptions help agents write code that fits your exact needs.
When a general agent writes code to solve your problem, you do not need to understand every line. What matters is whether the result matches what you wanted.
The collaboration loop works like this:
If something is wrong, describe what you expected versus what you got. The agent will adjust the code.
This principle connects to the core thesis of this book. General agents are powerful because they are not limited to pre-built capabilities. They can write code to solve any computational problem.
Code is the universal interface between agents and computers. Through code, agents can:
This is why "all agents will become coding agents," as Davis Treybig (Partner, Innovation Endeavors) observed. Specialized agents with fixed features will always be limited. General agents that write code can do anything.
There's an important caveat to everything we've discussed. LLMs sometimes generate code that looks correct but isn't.
The agent might:
This isn't a flaw—it's the nature of probabilistic language models. They're remarkably capable, but they're not compilers. They don't execute code in their heads; they predict what correct code looks like.
Code is powerful, but only when it actually works. A beautiful program that crashes on your data is worthless. An elegant solution that misunderstands your requirements wastes your time.
This is why the next principle is essential.
In the next lesson, we will explore Principle 3: Verification as a Core Step. The power of code demands the discipline of verification. You'll learn how to confirm that what the agent built actually does what you intended—before you trust it with your real work.
What you are learning: You are seeing how a general agent thinks about solving a problem. Notice how the agent can handle your specific combination of requirements rather than forcing you to fit pre-built features.
What you are learning: You are experiencing how each power contributes to solving real problems. The dinner party is not a "coding task," but a general agent can handle it beautifully through these five powers.
What you are learning: You are developing the skill of clear problem description. This is your main contribution to the human-agent collaboration. The clearer you describe what you want, the better code the agent can write to achieve it.
General agents are powerful because they write code. Code is the universal interface through which agents interact with computers to accomplish any task.
This principle explains why specialized tools with pre-built features will always be limited. A photo organizer app can only do what its designers built in. But a general agent can write whatever solution your specific situation requires.
Code gives agents five powers:
Your role in working with general agents is to describe what you want clearly and specifically. Focus on outcomes, not methods. Be precise about your situation. Then verify that the results match your intentions.
"All agents will become coding agents." This is not a prediction. It is already happening. Understanding why prepares you for a world where the most capable help comes from agents that can write code to solve any problem you bring them.
Code is powerful—but code that runs on your real data can cause real damage. Before letting an agent run generated code on important files, always: (1) work on copies, not originals, (2) review the code's intent even if you don't understand every line, and (3) verify the results before deleting your backups. The next lesson (Verification) covers this in depth.