{"head":{"title":"What Is an AI Agent? Definition and Examples | OceanLab","description":"An AI agent is software where a language model picks the steps and tools to reach a goal. How agents work, when to use one, and the pitfalls to plan for.","canonical":"https://oceanlab.in/glossary/ai-agent"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"AI agent","path":"/glossary/ai-agent"}],"slug":"ai-agent","term":"AI agent","aka":["LLM agent","agentic AI"],"category":"AI building blocks","short":"Software where a language model decides which steps to take and which tools to call, in a loop, to reach a goal.","body":[["An agent gives an ",{"href":"/glossary/llm","text":"LLM"}," a goal, a set of tools and a loop. At each step the model looks at what it has so far, picks a tool to call, such as search, a database query or sending a message, reads the result and decides what to do next, until it finishes or hits a limit."],["The difference from a fixed workflow is who decides the path. In workflow automation, a person designs the steps in advance. In an agent, the model chooses them at run time. Many real systems are a mix: a fixed workflow with one agent step where judgment is needed."]],"why":["Agents can handle tasks where the steps vary from case to case, such as researching a request, triaging a ticket or reconciling records across systems. That flexibility costs predictability: more model calls per task, more ways to fail and more need for ",{"href":"/glossary/guardrails","text":"guardrails"},", logs and ",{"href":"/glossary/human-in-the-loop","text":"human review"}," on actions that matter."],"example":["An operations agent receives a refund request. It looks up the order, checks the refund policy, checks whether the item was returned, and either issues a refund under a set limit or prepares a summary for a person to approve."],"inBuild":null,"mistakes":[["Using an agent where a fixed workflow would do. If the steps are always the same, write them down."],["Giving the agent broad permissions. Scope each tool to the least access it needs."],["No step limit or budget. A confused agent can loop and run up cost."]],"related":[{"href":"/glossary/tool-calling","label":"Tool calling (function calling)","detail":"A way for a language model to ask your application to run a defined function and give it the result."},{"href":"/glossary/guardrails","label":"Guardrails (AI)","detail":"Checks placed around an AI model that block, fix or flag unsafe, off-topic or incorrect inputs and outputs."},{"href":"/glossary/human-in-the-loop","label":"Human-in-the-loop (HITL)","detail":"A design where a person reviews, corrects or approves what an AI system produces before it takes effect."},{"href":"/glossary/llm-evals","label":"LLM evals (evaluations)","detail":"Repeatable tests that score how well a model, prompt or AI feature does a specific task."}],"tools":[{"href":"/tools/ai-agent-cost","label":"AI agent cost","detail":"Free tool"},{"href":"/tools/workflow-automation-roi","label":"Workflow automation ROI","detail":"Free tool"}],"links":[{"href":"/compare/ai-agent-vs-workflow-automation","label":"AI agent vs workflow automation","detail":"Comparison"},{"href":"/ai-automation","label":"AI automation","detail":"How OceanLab automates company workflows with AI."},{"href":"/ai","label":"AI by industry","detail":"AI use cases, costs and risks per industry."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}