What is an Agent?
Before diving into tools, the team needs shared language.
Working Definition:
An agent is an AI system that can autonomously take actions to achieve a goal, using tools, making decisions, and iterating based on feedback — without requiring step-by-step human instruction.
Key Characteristics:
| Characteristic | Description | Example |
|---|---|---|
| Autonomy | Decides what to do next without explicit instruction | Claude Code choosing which files to edit |
| Tool Use | Invokes external tools/APIs to accomplish tasks | Running terminal commands, querying databases |
| Goal-Oriented | Works toward a defined objective, not just responding | “Build a login page” vs. “What is React?” |
| Iteration | Evaluates results and tries again if needed | Fixing errors after running tests |
| Context Awareness | Understands environment and adapts behavior | Reading codebase before making changes |
What an Agent is NOT:
- A chatbot that only answers questions
- Autocomplete that suggests the next line
- A fixed script that runs the same way every time
The Agent Spectrum
Where most developers are vs. where we want them to be:
| Level | Description | Example Tools |
|---|---|---|
| Autocomplete | Predicts next characters/lines | Basic IDE completion |
| Chat Assistant | Answers questions, explains code | ChatGPT, basic Claude |
| Copilot | Suggests code inline, you accept/reject | GitHub Copilot inline |
| Agent Mode | Multi-step tasks, uses tools, iterates | Claude Code, Cursor Composer |
| Autonomous Agent | Works in background, minimal supervision | Claude Code background, Codex async |
Context Windows by Model
Understanding context limits helps you choose the right model and manage long sessions:
| Model | Context Window | Approx. Lines of Code | Best For |
|---|---|---|---|
| Claude Sonnet 4 | 200K tokens | ~150,000 lines | Daily coding tasks, fast responses |
| Claude Opus 4 | 200K tokens | ~150,000 lines | Complex reasoning, architecture |
| GPT-4o | 128K tokens | ~96,000 lines | General tasks, multimodal |
| GPT-4 Turbo | 128K tokens | ~96,000 lines | Long documents, analysis |
| Gemini 2.0 Pro | 2M tokens | ~1.5M lines | Entire codebases, massive context |
Practical implications:
- Most projects fit in a single context window
- Large monorepos may need selective loading
- Use
/compactto summarize and free space - CLAUDE.md reduces repeated context
Token estimation rules of thumb:
- 1 token ≈ 4 characters (English text)
- 1 token ≈ 0.75 words
- 1 line of code ≈ 10–15 tokens (varies by language)
Key Terminology
Skills
Definition: Discrete capabilities an agent can perform, often tied to specific tools.
| Skill | What It Does | Enabled By |
|---|---|---|
| File editing | Read, write, modify code files | Built-in |
| Terminal execution | Run shell commands | Built-in |
| Web browsing | Fetch and parse web content | Playwright MCP |
| Issue management | Create/read/update tickets | Jira MCP, GitHub MCP |
| Database queries | Read/write to databases | PostgreSQL MCP |
| Design extraction | Read Figma files | Figma MCP |
Tools vs. Skills
- Tool: The external system or API (e.g., “Jira”)
- Skill: What the agent can do with that tool (e.g., “create a ticket from requirements”)
MCP (Model Context Protocol)
Analogy: “USB for AI” — a standard way to connect AI models to external tools.
| Aspect | Description |
|---|---|
| What it is | Protocol for exposing tools to AI agents |
| Why it matters | Standardized connections = portable workflows |
| Key benefit | Same integration works across Claude, Cursor, etc. |
The Agentic Loop
How agents work internally:
- Observe: Read the current state (files, errors, output)
- Think: Reason about what’s needed
- Plan: Decide on approach
- Act: Execute using tools
- Evaluate: Check results
- Repeat: Continue until goal is met
Guardrails
Constraints that limit what an agent can do:
| Type | Description | Example |
|---|---|---|
| Permission-based | Requires approval for certain actions | “Ask before deleting files” |
| Approval-based | Human reviews before execution | Plan mode in Claude Code |
| Rule-based | Hard limits on behavior | “Never modify production configs” |