{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreif7acd55qleeuzi576tbbvket4li5ac3ixwhqu3usnwo3oq7inmai",
    "uri": "at://did:plc:5sgu76a53rz3n6unbykmovqy/app.bsky.feed.post/3mlodhee3xfi2"
  },
  "description": "An AI agent is a system in which an LLM is given a goal and a set of tools, then loops through calling those tools, observing the results, and deciding what to do next, until the goal is reached or a stopping condition is hit. The defining feature is that the model controls its own next action, rather than producing one response in one call.\n\n\nHow it works\n\nAn agent loop typically goes: the model is shown the goal and the available tools; it picks a tool and produces a call; the runtime executes",
  "path": "/engineering-glossary/ai-agents-llm-tool-use/",
  "publishedAt": "2026-05-12T17:39:40.000Z",
  "site": "https://sahilkapoor.com",
  "tags": [
    "RAG"
  ],
  "textContent": "**An AI agent** is a system in which an LLM is given a goal and a set of tools, then loops through calling those tools, observing the results, and deciding what to do next, until the goal is reached or a stopping condition is hit. The defining feature is that the model controls its own next action, rather than producing one response in one call.\n\n## How it works\n\nAn agent loop typically goes: the model is shown the goal and the available tools; it picks a tool and produces a call; the runtime executes that call; the result is fed back into the model; the loop continues until the model signals completion. Tools commonly include web search, code execution, file access, retrieval over an internal corpus, and other LLM calls.\n\n## Common patterns\n\n  * **ReAct.** Interleaves Reasoning text with Acting tool calls. The original pattern from the 2022 paper.\n  * **Tool calling.** Models trained to emit structured tool-call JSON natively, with the runtime executing and returning results.\n  * **MCP (Model Context Protocol).** A standard interface between agents and tool servers, allowing tools to be shared across agent frameworks.\n  * **Multi-agent systems.** Multiple agents collaborate, debate, or specialise across subtasks.\n\n\n\nšŸ”—\n\n**Related Terms**\nRAG.",
  "title": "AI Agents",
  "updatedAt": "2026-05-13T19:15:18.728Z"
}