# What is an AI agent, and how is a coding agent different from a chatbot?

Source: https://codelifter.com/forum/posts/what-is-an-ai-agent-and-how-is-a-coding-agent-different-from-a-chatbot/
Site: CodeLifter Forum, category MCP and tools
Published: 2026-11-03. Updated: 2026-11-07. Replies: 2.

## Question by CodeLifter editors (staff), 2026-11-03

An AI agent is a language model that decides its own next steps and uses tools in a loop until a task is done. A coding agent is one whose tools read files, edit code and run commands in your project. A chatbot only answers in text; you copy the code, run it and report back yourself.

## What is an AI agent?

The word is used loosely, so it helps to start from a definition with a source. Anthropic's engineering article [Building effective agents](https://www.anthropic.com/engineering/building-effective-agents), published 19 December 2024, separates two kinds of what it calls agentic systems:

- **Workflows**, "systems where LLMs and tools are orchestrated through predefined code paths." A programmer decides the steps in advance.
- **Agents**, "systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks." The model decides the steps as it goes.

The same article says agents "are typically just LLMs using tools based on environmental feedback in a loop." An LLM is a large language model, the text-predicting network explained in the [thread on what an LLM is](/forum/posts/what-is-an-llm-and-how-does-it-write-code/). A tool is a function the model can ask the surrounding program to run, such as "read this file" or "run this command". The loop is what makes it an agent: act, look at the result, decide what to do next.

## How does the agent loop work for code?

Visual Studio Code's [AI overview](https://code.visualstudio.com/docs/agents/overview), read on 16 October 2026, describes it for a failing test:

1. The agent finds the test and reads the related code to understand the failure.
2. It edits the implementation or tests based on the task and your constraints.
3. It runs the tests, inspects the results, and revises its changes if needed.
4. You review the diff and validation results and decide which changes to keep.

The page calls this "repeated reasoning, action, and validation" the agent loop. Anthropic's article makes the same point: at each step an agent needs "ground truth" from the environment, "such as tool call results or code execution", to judge its progress, and it usually stops on completion or on a limit such as "a maximum number of iterations."

## How is a coding agent different from a chatbot?

| | Chatbot | Workflow | Coding agent |
| --- | --- | --- | --- |
| Who picks the next step | You, one message at a time | The programmer, in fixed code | The model, during the task |
| What it can touch | Only the text you paste in | Whatever the fixed steps call | Your files, terminal and connected tools |
| Feedback | You run the code and paste the error back | Checks built into the pipeline | Reads test output and error messages itself |
| Typical result | An answer or a code block | A predictable output for a known task | A set of file changes, often with a test run |
| Main risk | Wrong code that you paste in | Breaks on inputs nobody planned for | Wrong changes made quickly, plus commands you did not expect |

The difference is not the model. The same LLM can sit behind a chat window and behind an agent. What changes is the program around it: an agent's host program gives the model tools, runs them on your machine or in a cloud environment, and feeds the results back. Anthropic's [Claude Code overview](https://code.claude.com/docs/en/overview) describes its agent as a tool that "reads your codebase, edits files, runs commands, and integrates with your development tools"; a chatbot does none of that unless you do it by hand.

Many coding agents can also take extra tools from MCP servers, small programs that offer actions such as opening a GitHub issue. The [MCP server thread](/forum/posts/what-is-an-mcp-server-in-plain-terms/) explains how those plug in.

## Why does code suit agents so well?

Anthropic's article gives four reasons coding agents work: "Code solutions are verifiable through automated tests", agents "can iterate on solutions using test results as feedback", the problem space is "well-defined and structured", and "output quality can be measured objectively." The same paragraph adds the limit: "human review remains crucial for ensuring solutions align with broader system requirements." Tests tell an agent whether code runs, not whether it does what your users need.

## What can go wrong with an agent?

Anthropic lists the costs plainly: "The autonomous nature of agents means higher costs, and the potential for compounding errors." A chatbot's mistake stops at the answer. An agent's mistake can become the input to its next ten steps. The article recommends "extensive testing in sandboxed environments, along with the appropriate guardrails." VS Code's [trust and safety page](https://code.visualstudio.com/docs/agents/concepts/trust-and-safety) adds a point beginners miss: "Stopping a request or restoring workspace files doesn't reverse completed terminal commands, network requests, deployments, or changes to external services."

To try a coding agent for the first time:

1. Use a project under Git with everything committed, so every change shows up in `git diff` and can be undone.
2. Start in the mode that asks before edits and commands, and read each request before you approve it.
3. Give it a small task with a test that proves success, such as "make this failing test pass without changing the test".
4. Keep secrets out of the folder. An agent that can read files can read `.env`.
5. Review the full diff yourself before you commit.

Which agent to start with depends on where your code lives and which models you are allowed to use; the [coding agents thread](/forum/posts/claude-code-codex-or-copilot-how-do-coding-agents-differ/) compares three, and the CodeLifter [agents directory](https://codelifter.com/agents/) lists twelve with their licences and rules files.

## Short version

- An agent is an LLM that chooses its own steps and uses tools in a loop; a workflow follows steps a programmer fixed in advance.
- A chatbot only returns text; a coding agent reads files, edits them and runs commands itself.
- The model can be identical; the difference is the tools and the loop around it.
- Agents make mistakes faster and can run commands that cannot be undone, so start under Git with approvals on.

## Reply 1 by CodeLifter editors (staff), 2026-11-03

**Is agentic AI the same thing as an AI agent?** Not quite. "Agentic" is the wider word. Anthropic's [Building effective agents](https://www.anthropic.com/engineering/building-effective-agents) uses "agentic systems" for everything from fixed pipelines to fully autonomous agents, and names five workflow patterns that are agentic but are not agents. Prompt chaining runs a task as a fixed sequence of model calls, each processing the previous output. Routing classifies an input and sends it to a specialised prompt or model. Parallelization runs subtasks at once, or the same task several times and compares the answers. Orchestrator-workers has one model split a task and hand the parts to other model calls. Evaluator-optimizer has one call generate and another critique in a loop. All of these use an LLM with tools, retrieval or memory, which the article calls "the augmented LLM", but the steps are fixed by code. The article's advice is to start simple: "optimizing single LLM calls with retrieval and in-context examples is usually enough" for many applications, and agents are for "open-ended problems where it's difficult or impossible to predict the required number of steps." So when a product page says "agentic", ask which of these it means.

## Reply 2 by CodeLifter editors (staff), 2026-11-07

**Is it safe to let an AI agent run commands on your computer?** It is as safe as the limits you set, and approval prompts alone are a weak limit. VS Code's [trust and safety page](https://code.visualstudio.com/docs/agents/concepts/trust-and-safety), read on 16 October 2026, lists three problems with relying on per-command approval: "Approval fatigue", where you stop reading what you approve during long sessions; "Parsing limitations", because auto-approval rules can be bypassed by "shell aliases, quote concatenation, and complex shell syntax"; and "Prompt injection", where "malicious content in files, tool outputs, or web pages can attempt to trick the agent into running harmful commands." Its answer is agent sandboxing, which "uses operating system-level isolation to restrict what terminal commands can access", so an auto-approved command still cannot leave the folders and network you allowed. The page notes that turning on sandboxing "does not block outbound network access by default", so check that setting separately. It also says an untrusted workspace runs in restricted mode, "which also disables agents." Practical rule: run agents on code you trust, inside a sandbox or container where your tool offers one, with no production credentials on the machine.

---
Cite as: CodeLifter Forum, "What is an AI agent, and how is a coding agent different from a chatbot?", https://codelifter.com/forum/posts/what-is-an-ai-agent-and-how-is-a-coding-agent-different-from-a-chatbot/, accessed 2026-11-12.
