Agents

An “agent” is an automated reasoning and decision engine. It takes in a user input/query and can make internal decisions for executing that query in order to return the correct result. The key agent components can include, but are not limited to:

  • Breaking down a complex question into smaller ones

  • Choosing an external Tool to use + coming up with parameters for calling the Tool

  • Planning out a set of tasks

  • Storing previously completed tasks in a memory module

Research developments in LLMs (e.g. ChatGPT Plugins), LLM research (ReAct, Toolformer) and LLM tooling (LangChain, Semantic Kernel) have popularized the concept of agents.

Agents + LlamaIndex

LlamaIndex provides some amazing tools to manage and interact with your data within your LLM application. And it can be a core tool that you use while building an agent-based app.

  • On one hand, some components within LlamaIndex are “agent-like” - these make automated decisions to help a particular use case over your data.

  • On the other hand, LlamaIndex can be used as a core Tool within another agent framework.

In general, LlamaIndex components offer more explicit, constrained behavior for more specific use cases. Agent frameworks such as ReAct (implemented in LangChain) offer agents that are more unconstrained + capable of general reasoning.

There are tradeoffs for using both - less-capable LLMs typically do better with more constraints. Take a look at our blog post on this for a more information + a detailed analysis.

Learn more

Our Putting It All Together section has more on agents