Agents serve as controllers that can reason, make decisions and invoke custom tools to expand the capabilities of off-the-shelf LLMs. For example, they can use specialised mathematical tools or call into custom databases or APIs (such as an Expert Model or custom applications) to solve math problems that LLMs often struggle with.

Many tools, including LangChain, support Agents.

ReAct is a generic agent architecture widely used to power Agent systems, such as LangGraph, CrewAI and OpenAI Swarm, to name a few. The simplest form of ReAct typically involves the following stages:

  1. Act: let the model call specific tools
  2. Observe: pass the outputs from the tools back to LLMs to process
  3. Reason: let the LLMs reason about the tool outputs to decide what to do next, such as calling more tools or passing the results back to the end users

Many ReAct frameworks support state and memory persistence, both in memory and to external storage, such as Sqlite or Postgres.

References