AI Agent
An AI system that can perceive its environment, make decisions, use tools, and take autonomous actions to achieve a goal.
An AI agent is a system built on top of a language model that can take actions in the world, not just generate text. Rather than answering a single question, an agent receives a goal, breaks it into steps, uses tools (web search, code execution, file access, APIs), observes the results, and iterates until the task is complete.
The key difference from a standard LLM: agents have a loop. They think → act → observe → think again. This enables them to handle multi-step tasks that require dynamic decision-making — researching a topic, writing and running code, booking a flight, or managing a workflow.
Agent Types
- ReAct agents — alternate between reasoning and acting
- Plan-and-execute — make a full plan, then execute each step
- Multi-agent systems — multiple specialized agents collaborate
- Browser agents — control a web browser to complete web tasks
- Coding agents — write, run, debug code autonomously
Popular agent frameworks include LangChain, LlamaIndex, AutoGen, and CrewAI. Function calling APIs from OpenAI and Anthropic make it easy to give models access to structured tools. The main challenges are reliability (agents can get stuck in loops), safety (preventing unintended actions), and cost (multi-step tasks consume many tokens).