The Anatomy of AI Coding: LLMs, Agents, and IDEs Explained
The landscape of software development is fundamentally changing. We use AI tools daily—whether it's an autocomplete suggestion in VS Code or an autonomous agent writing an entire feature. But how do these pieces actually fit together? What is the difference between an LLM, an Agent, and an AI IDE?
In this post, we'll demystify the infrastructure behind modern AI developer tools. We'll explore the distinction between the "brain" and the "hands," understand how AI IDEs act as a harness, and look at the hardware required to run it all.
1. The Brain: Large Language Models (LLMs)
At the core of any AI tool is the Large Language Model (LLM). Models like GPT-4, Claude 3.5, and Gemini are incredibly powerful, but fundamentally, they are just complex prediction engines.
An LLM takes a sequence of text (the "context") and predicts the most likely next word (or "token"). Crucially, an LLM is a brain in a jar. It has no hands, no memory of its own between sessions, and no direct access to the outside world. It simply receives a prompt and returns text.
2. The Hands: AI Agents
If an LLM is a brain in a jar, an AI Agent is the robotic body built around that jar.
An agent is a software program that wraps around the LLM and gives it tools. Instead of the LLM just returning text like "Here is how you would write that file," the agent allows the LLM to return a structured command like {"action": "write_file", "path": "index.js", "content": "console.log('hello')"}.
The agent reads this command, physically creates the file on your hard drive, and then tells the LLM, "I created the file. What's next?" This loop—Reasoning -> Action -> Observation -> Reasoning—is what makes an agent autonomous.
3. The Harness: AI IDEs
So where does a tool like Antigravity or Cursor fit in? They are the Agentic Harness.
A harness is the scaffolding that provides a safe, highly-integrated environment for the agent to operate in.
- Context Management: The IDE constantly feeds the agent real-time information. It tells the agent what files you have open, where your cursor is, and what errors are showing in your terminal.
- Safety: The IDE puts guardrails on the agent's tools, ensuring it doesn't accidentally delete your operating system.
- User Interface: The IDE provides the chat windows, diff viewers, and acceptance buttons so you can collaborate with the agent.
How They Connect
Here is a visual breakdown of the request lifecycle when you ask an AI IDE to build a feature:
sequenceDiagram
participant User as Developer (You)
participant IDE as AI IDE (The Harness)
participant Agent as The Agent Logic
participant LLM as LLM API (The Brain)
User->>IDE: "Add a login button to the navbar"
Note over IDE: IDE bundles the prompt<br/>with open files, cursor<br/>position, and terminal output.
IDE->>Agent: Pass context + User Request
Agent->>LLM: Send system prompt + tools list + context
LLM-->>Agent: Action: `read_file(navbar.tsx)`
Agent->>IDE: Request file contents
IDE-->>Agent: Returns file contents
Agent->>LLM: Send file contents back to LLM
LLM-->>Agent: Action: `replace_file_content(navbar.tsx)`
Agent->>IDE: Execute file rewrite
IDE-->>User: Show code diff in the UI for approval
User->>IDE: Clicks "Accept"
4. Where Does the Code Run? (The Compute)
The loop above requires massive computational power. But where is that math actually happening? You generally have three choices:
CPU (Central Processing Unit)
Your laptop's CPU is great for sequential logic, but terrible at the massive parallel matrix math required for LLMs. Running a modern LLM purely on a CPU is usually agonizingly slow (often less than 1 word per second). It's generally only used for very tiny, localized models.
GPU (Graphics Processing Unit)
GPUs are designed for parallel processing, making them perfect for AI inference.
- Local Inference: If you have a powerful gaming PC or a high-end Mac (with Unified Memory), you can run models locally using tools like LM Studio.
- Pros: 100% privacy, no subscription fees, works offline.
- Cons: You are limited by your VRAM. You can run smaller models (like Llama 3 8B), but you cannot fit the massive "frontier" models on a consumer machine. Local models often lack the deep reasoning required for complex, multi-file software engineering.
Cloud APIs (OpenAI, Anthropic, Google)
This is how most professional AI IDEs (including Antigravity) work. The IDE runs locally on your machine, but the "Brain" step in the diagram above happens in the cloud.
- The agent bundles your request and securely sends it to an API (like the Anthropic API).
- The request hits massive clusters of enterprise GPUs (like Nvidia H100s) in a data center.
- The reasoning happens in milliseconds, and the action command is streamed back to your local IDE.
- Pros: Access to the smartest models on earth with near-instant reasoning speeds.
- Cons: Requires an internet connection and either an API usage fee or a subscription.
The Future of Coding
By separating the Brain (cloud APIs), the Hands (Agentic logic), and the Harness (IDEs like Antigravity), developers have created an incredibly modular and powerful ecosystem. As the Brains get smarter, your Harness automatically gets more capable, allowing you to focus less on syntax and more on architecture.

