What is an AI agent?

An AI agent is a software system in which a large language model decides which steps to take and which tools to call, observes the results and repeats until it reaches a goal or hands over to a person.

Also called AI agents, LLM agent, agentic AIUpdated

A chatbot answers questions. An AI agent takes actions. Give an agent a goal ("resolve yesterday's failed payouts") and a set of tools (read the ledger, call the bank's status API, raise a ticket), and the language model chooses which tool to use, reads what comes back and decides the next step. The code around the model runs the tools, enforces limits and keeps the record.

How the agent loop works

Most agents follow the same loop:

  1. Context. The model receives the goal, its instructions, the tool definitions and the history so far.
  2. Decide. It returns either a final answer or a structured tool call, such as get_payout(payout_id="PO-88213").
  3. Act. Your code validates the call, checks permissions and runs the tool.
  4. Observe. The result is added to the context, and the loop repeats.
  5. Stop. The run ends when the model gives an answer, a step limit is reached or a person must approve something.

Tools are usually defined as functions with a JSON Schema for their inputs. The Model Context Protocol is an open standard for exposing tools and data so that many agents and applications can reuse them. Frameworks such as LangGraph, the OpenAI Agents SDK, CrewAI and Google ADK provide the loop, saved state and tracing. Our comparison of agent frameworks covers how to choose.

Example: a failed payout agent

An operations team at a lending platform gets a daily list of disbursements that didn't settle. Here is the agent's run for one of them:

Goal: resolve failed payout PO-88213
-> get_payout(PO-88213)        status=FAILED, reason="beneficiary bank timeout"
-> get_bank_status(PO-88213)   bank reports: credited at 14:02
-> check_ledger(PO-88213)      no credit entry posted
-> propose_ledger_fix(...)     draft correcting entry
PAUSED: awaiting approval from ops reviewer

The agent gathers facts from three systems and drafts the fix, and a person approves it before anything is posted. Every tool call is logged. The posting carries an idempotency key, so a retry can't post it twice.

AI agent vs agentic AI vs workflow

  • An AI agent is one system running the loop above.
  • Agentic AI is the broader term for applications built around agents, often several of them coordinated by an orchestrator.
  • A workflow with LLM steps follows a path fixed in code, and the model only fills in steps such as classifying or drafting. Many business processes work better this way, with agent-style freedom only where the path genuinely varies.

Risks and how to contain them

  • Prompt injection. An agent that reads emails, documents or web pages can be steered by text inside them. Limit the tools available at each step and treat tool output as untrusted.
  • Too much access. Give each tool the narrowest scope and run it under the user's identity, following least privilege.
  • Runaway loops. Cap steps, tokens and time per run, and alert on unusual spend.
  • Silent failure. Trace every step, and test the agent against fixed scenarios before each change using LLM evaluation.
  • Irreversible actions. Route payments, emails and record changes through human approval or a reversible staging step.

Agents work best in narrow, well-defined workflows with approvals, which is how we build them in our data and AI practice.

Any idea in mind? Let's make it real.

Tell us what you're building. You'll hear back from an engineer, not a sales team, usually within one working day.

Book a 30-min call