In the last few months, with the introduction of hooks to Claude Code (Anthropic's CLI agent), I started to think about the agentic design differently.
The first take: LLMs are not the agents.
----
When you spin up Claude Code in an empty directory, what you're really doing is giving an LLM (Sonnet, Opus, whatever model) access to a workspace. The LLM itself has a set of capabilities it can choose from:
- Think - Enter deep reasoning mode (triggered by words like "ultrathink" in your prompt)
- Respond - Generate text back to you
- Delegate - Call a sub-task to another Claude instance to preserve the main session
- Ask permission - Request yes/no approval before using specific tools
- Compact context - Compress its working memory to free up space
- Use tools - Access 16 built-in capabilities (file creation, editing, bash commands, web search, etc.)
- Stop - End the execution
In an empty directory, the LLM makes all these decisions. When to think. When to ask. Which tool to use. How to proceed.
This is pure LLM behavior. This is not yet an agent.
----
But when you add a `.claude/` directory to that workspace, something fundamental changes.
The `.claude/` directory becomes the brain of your agent. Not the LLM - the LLM is just the engine. The brain is the collection of files that tell the LLM how to behave in this specific context.
Depending on how you organize your agent's `.claude/` directory, you will get different agents.
Inside `.claude/`, you can define:
- Hooks - Rules that fire automatically at specific moments (before a task starts, after file edits, when errors occur)
- Custom tools - MCP-based extensions beyond the 16 built-in capabilities
- Behavior patterns - Instructions that shape how the agent approaches work
Then there are the `CLAUDE.md` files throughout your workspace. These serve different roles:
Root-level `CLAUDE.md` files define top-level principles your agent must follow - the foundational rules that govern how it works. Local `CLAUDE.md` files become your agent's dynamic working memory. As your agent builds itself, it uses these local files to gather context about nearby files, plan next steps, and store intermediate results. They hold local information that's relevant to that specific part of your workspace. With a mature agent, contents from the `.claude/` directory and all relevant `CLAUDE.md` files are injected into the agent's context exactly when needed, as you customize it. Now, when the agent encounters a task, it's not just a raw LLM making choices. It's an LLM operating within a structure you've designed, following your rules, using your tools, and accessing your context.
This is an agent.
Stick around, and let's learn more together.