跪拜 Guibai
← All articles
Agent · Artificial Intelligence · AI Programming

Connecting an LLM API Doesn't Make an AI Agent

By 不一样的少年_ ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Many developers mistake a basic LLM integration for an agent and then hit a wall when the system can't touch their codebase. Recognizing the Harness as a distinct architectural layer clarifies what needs to be built next — tool execution, environment access, and a feedback loop — before an assistant can actually perform work.

Summary

A program that pipes user input to an LLM API and prints the response is a chatbot, not an agent. It can reason about a bug fix but cannot open `login.ts`, edit code, or run a test suite. The gap is between knowing what to do and being able to do it.

A real AI agent adds a Harness — a control system that receives tool-call requests from the model and executes them against the filesystem, shell, or editor. The model decides the next action; the Harness performs it. This turns a question-answer loop into an observe-act-check cycle.

Building the minimal chat pipeline first is still the right foundation. Tools, agent loops, memory, and planning modes all grow from that single user-input-to-model-output link.

Takeaways
Connecting an LLM API and printing answers in a terminal creates a CLI chatbot, not an AI agent.
A chatbot can reason about a task but cannot read project files, modify code, or run commands.
An AI agent adds a Harness layer that receives tool-call requests from the model and executes them against the real environment.
The core formula is: AI Agent ≈ Large Model (brain) + Harness (control system).
The Harness provides tools like `read_file`, `edit_file`, and `bash` that let the model act on a project.
Building the minimal chat pipeline first is a necessary foundation; tools, loops, and memory are added on top of it.
Conclusions

The distinction between a chatbot and an agent is not about intelligence but about whether the system can affect its environment. A model that perfectly diagnoses a bug is still just a chatbot if it cannot touch the code.

Calling the control layer a Harness rather than a framework or runtime emphasizes its role as a constraint and execution boundary, not just a tool library. This framing makes it clearer why agent behavior needs to be managed, not just enabled.

Concepts & terms
Harness
The control layer in an AI agent that sits between the large language model and the real environment. It receives tool-call requests from the model, executes them (e.g., reading files, running shell commands), manages context, and enforces behavioral constraints.
Agent Loop
The continuous cycle an AI agent runs: observe the environment, decide an action, execute it via tools, check the result, and repeat until the goal is met. This replaces the single-turn question-answer pattern of a chatbot.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗