What is an LLM agent
An LLM agent is a program where a large language model decides the next step toward a goal, calls tools to carry that step out, reads the result and repeats until the job is done. A plain model call answers once, while an LLM agent keeps working until the task is finished or a limit stops it.
What an LLM agent means
What is an LLM agent, in the shortest answer? It is a language model that can act as well as talk. A large language model (LLM) on its own is a text predictor. You send it a prompt, it sends back an answer, and the exchange ends there. It cannot look anything up, change a record or send a message.
An LLM agent wraps that model in a loop and gives it tools: a search, a database query, a ticketing system, an email sender. The model reads the goal, picks a tool, sees what came back and chooses again.
Four parts make one work. They map onto the classic model of a software agent:
| Part | In the classic agent | In an LLM agent |
|---|---|---|
| Sensors | What the agent perceives | The user's request, files and tool results |
| Internal state | What it remembers about the world | A record of the task so far |
| Reasoning | How it chooses an action | The language model, guided by its instructions |
| Actuators | How it acts on the world | Tool calls such as an API request or a database write |
You can also picture an LLM agent as a state machine whose next transition a reasoning model chooses. Your code defines the states and the allowed moves. The model picks which move to make.
The language model is the part that plans. Planning means breaking the goal into steps, deciding which one comes first, and revising the plan when a tool result changes what it knows. A model that plans badly makes an agent that wanders, however good its tools are.
A custom agent is an LLM agent you configure for one job. Think of it as a behavioral contract: what job it owns, which systems it can touch, what it must never do, and when it must hand the task to a person.
How it shows up in practice
Most LLM agents in small products do one narrow job well.

- Code review. A GitHub agent reads each pull request and checks it against your house standards, then leaves comments where the code breaks them.
- Feedback triage. An agent reads customer messages in Intercom, maps the customer's wording to your internal product categories, and files a Jira ticket in the right place.
- Prospecting. A founder's agent researches leads and drafts outreach emails, and a person approves every message before it is sent.
- Support. An agent answers billing complaints by looking up the account, checking the charge and proposing a fix.
- Voice. A voice AI agent takes phone calls with speech models on both ends of the same loop.
Take the billing complaint and walk the loop step by step. A customer writes "I was charged twice this month."
- The agent reads the message and sets a goal: confirm the charges and resolve them.
- It calls the billing system for the customer's last two invoices.
- It sees two charges on the same day and infers a duplicate, a fact the customer could not see directly.
- It checks the refund policy, which allows refunds for duplicate charges.
- It drafts a reply and a refund request, and hands the refund to a person to approve.
Every step is the same move: decide, act, look at the result. The model chose to fetch invoices first because the goal needed facts before a reply. When a tool returns something unexpected, such as one charge instead of two, the agent changes the plan at that step.
Not every team builds from scratch. No-code AI agent builders let you assemble the same loop from blocks, which suits simple jobs with common tools.
Why it happens
What is an LLM agent for? It handles tasks that you cannot write as a fixed script. A support ticket might need one lookup or five, and the right second step depends on what the first one returned. A script handles the common case and fails on the rest.
Compare three kinds of software:
- A plain model works like a calculator. It takes one input and gives one output, with no memory and no action.
- A traditional software agent works like a rigid script. It acts, but only along the path you wrote.
- An LLM agent works like an intern with tools. It chooses its own path toward the goal you set.
The intern comparison shows the risk as well as the benefit. Putting a model in charge of the next step moves your job from writing the path to setting the limits. The agent can call the wrong tool, repeat a step or act on a guess.
Partial information is the other reason the loop matters. An agent rarely sees the whole picture at once, so it infers what it cannot see from what the tools return, the way the billing agent inferred a duplicate charge from two invoice dates. Each tool result updates its record of the task, and the next decision builds on that record.
The task record is also where agents go wrong. Treating the chat transcript as memory works for a short task and breaks on a long one, because the transcript grows with every step and buries the facts that matter.
What to do about it
Start with the simplest option that handles your task, and give the model more freedom only where a fixed path keeps failing.
| Option | Best for | What it costs |
|---|---|---|
| A plain LLM API call | One question, one answer, no tools | One model call per request |
| A pre-built agent | Common jobs where someone else's tools and limits fit yours | The vendor's price, plus little build time |
| A custom LLM agent | Jobs that need your own systems, rules and escalation points | A varying number of model calls per task, plus your build time |
| A managed backend such as Supagen | Small teams and solo founders who want prompts, models and call logs out of their code | USD 0 or USD 29 a month for the plan |
If you build a custom agent, work in four phases: scope the job, choose the model and the loop's shape, connect the tools, then write the prompts and decide what the agent remembers.
Define the tool layer before you give the agent any tool. For each one, write down which system it touches, which actions it may take, what happens when a call fails, and who handles the edge cases. Then give the agent read access before write access, and have it hand tasks to a person before you let it act alone.
Two problems hit every LLM agent once it is live. A provider has an outage mid task, and nobody can say why one run cost more than the others. Supagen handles both. A Supagen template can list as many as ten models, each tied to a provider, with your first choice on top and backups below it, so a failed call moves down the list. You set that order in the dashboard. Supagen also records each call the agent makes: what went in, what came out, how many tokens it used, how long it took and what it cost. You can open any call as a trace and see what the agent did at each step.
Supagen is the backend for AI features and agents: small teams and solo founders keep prompts, model choice and routing, and call logging out of their code and call every model, from text to image, video and speech, through one API. Supagen has a USD 0 plan and a USD 29 plan, and there is no free trial.
Running several agents raises its own questions about permissions and oversight, which our guide to AI agent management covers. Start building free.
What is an LLM agent? Frequently asked questions
What does LLM agent mean?
An LLM agent is a program in which a large language model chooses each next step toward a goal, calls tools to act, reads the results and repeats until the task is done or a limit stops it.
How is an LLM agent different from a chatbot?
A chatbot answers messages. An LLM agent takes actions through tools, such as querying a database or filing a ticket, and decides the order of those actions itself.
What is a custom agent?
A custom agent is an LLM agent configured for one job, with its own instructions, tools and limits, and clear rules for when it must hand the task to a person.
Do LLM agents plan?
Yes. The language model breaks the goal into steps, picks the first one, and revises the plan when a tool result changes what it knows.
How do I keep an LLM agent safe?
Give it read access before write access, cap how many steps it can take, and have a person approve anything high impact, such as a refund or a sent email.