Agents

Certain applications require a flexible chain of calls to LLMs and other external tools based on user input. The Agent component provides flexibility for such applications. They combine the power of LLM chaining processes with access to external tools to interact with applications and accomplish tasks.

AgentInitializer

The AgentInitializer component allows you to create different agents using an LLM and tools easily.

Parameters:

  • LLM: Language Model to use.

  • Memory: Used to add memory functionality to an agent, allowing it to store and retrieve information from past conversations.

  • Tools: List of tools the agent has access to.

  • Agent: The type of agents to be integrated. Currently supported types: zero-shot-react-description, conversational-react-description, openai-functions and openai-multi-functions.

CSVAgent

A CSVAgent is an agent specialized in interacting with CSV (Comma-Separated Values) files. It provides a convenient way to extract information from the CSV file, manipulate the data, and perform operations like filtering, sorting, and aggregating. The CSV agent is built on top of the Pandas library.

Parameters:

  • LLM: Language Model to use.

  • Path: The file path to the CSV data.

JSONAgent

This agent is used while interacting with JSON (JavaScript Object Notation) files. It can iteratively explore the JSON blob to find the information needed to answer the user's question.

Parameters:

  • LLM: Language Model to use in the JSONAgent.

  • Toolkit: List of toolkits the agent has access to.

ZeroShotAgent

ZeroShotAgent agent uses the ReAct framework to determine which tool to use. It is designed to be the most general-purpose action agent.

Parameters:

  • LLM: Language Model to use.

  • Tools: List of tools the agent will have access to.

  • Prefix: String to put before the list of tools.

  • Suffix: String to put after the list of tools.

Last updated