Skip to main content
Home/Glossary/AI Agent

AI Agent

An LLM-driven system that perceives context, decides, and acts via tools and APIs in a loop to accomplish tasks — often with memory and some degree of autonomy.

AI AgentsAlso called: "AI agent", "autonomous agent", "LLM agent"

An AI agent is an LLM-driven system that perceives its context, decides what to do, and acts through tools and APIs in a loop until a task is complete. The defining feature is the loop: rather than returning one response, an agent observes, chooses an action, executes it, reads the result, and decides again — typically carrying memory across steps and operating with some autonomy.

The agent loop, concretely

  1. The host gives the model a goal plus a set of tool definitions.
  2. The model returns either a normal answer or a structured tool call (see function calling).
  3. The application validates and executes the tool, then feeds the output back.
  4. The model uses that output to answer, or to call another tool — and the loop repeats.

Where the protocols fit

Practical notes The same autonomy that makes agents powerful expands their attack surface: any tool an agent can call, an attacker who controls its inputs can try to misuse. Apply least privilege, audit tool calls, and require human approval for high-impact actions — the MCP Security Risks post details the threat classes. To build and orchestrate agents see the Claude Agent SDK guide, Claude Code Dynamic Workflows, and the breakdown of MCP vs. subagents vs. skills vs. hooks. Generate a starter config with the Claude Code config generator.