Concepts

AI Agents

Autonomous systems that combine language models with reasoning, memory, and tool use to execute complex multi-step tasks with minimal human intervention.

growing#ai-agents#llm#autonomous-systems#tool-use#agentic-ai#react-pattern

What they are

An AI agent is a system that uses a language model as its reasoning core, but goes beyond answering questions: it can plan, execute actions, observe results, and adjust its behavior in a closed loop.

The fundamental difference between a chatbot and an agent is autonomy. A chatbot answers a question and waits for the next one. An agent receives a goal, decomposes the problem, decides which tools to use, executes intermediate steps, and delivers a result — all with minimal human intervention.

Components of an agent

A typical agent has four components:

  1. Language model (LLM): the brain that reasons, plans, and generates text. Decides what to do at each step.
  2. Memory: stores conversation context, previous results, and accumulated knowledge. Can be short-term (context window) or long-term (vector databases, files).
  3. Tools: external functions the agent can invoke — APIs, databases, file systems, browsers, terminals. The Model Context Protocol (MCP) standardizes how agents access these tools.
  4. Execution loop: the reasoning-action-observation cycle the agent repeats until the task is complete.

Execution patterns

ReAct (Reason + Act)

The most common pattern. The agent alternates between reasoning about what to do and executing actions:

Thought: I need to look up the current price of AAPL
Action: search_price(ticker="AAPL")
Observation: $187.50
Thought: Now I can respond to the user
Response: The current price of AAPL is $187.50

Plan and execute

The agent first creates a complete plan and then executes each step. Useful for complex tasks where order matters.

Multi-agent

Multiple specialized agents collaborate to solve a problem. Each agent has a specific role (researcher, writer, reviewer) and they communicate with each other.

Current frameworks

FrameworkLanguageFocus
LangGraphPythonState graphs for agentic flows
CrewAIPythonAgent teams with roles
Strands AgentsPythonModular agents from AWS
AutoGenPythonMulti-agent conversations
Vercel AI SDKTypeScriptAgents in web applications

Current limitations

  • Reliability: agents can enter loops, make incorrect decisions, or hallucinate about the state of the world.
  • Cost: each step in the loop consumes tokens. A complex task can require dozens of model calls.
  • Security: an agent with tool access can execute destructive actions if not properly constrained.
  • Observability: debugging why an agent made a specific decision is difficult. Traces and logs are essential.

References

Concepts