import Admonition from "@theme/Admonition";
Agents
Agents are components that use reasoning to make decisions and take actions, designed to autonomously perform tasks or provide services with some degree of agency. LLM chains can only perform hardcoded sequences of actions, while agents use LLMs to reason through which actions to take, and in which order.
AgentInitializer
The AgentInitializer constructs a zero-shot agent from a language model (LLM) and additional tools.
Parameters:
- LLM: The language model used by the
AgentInitializer. - Memory: Enables memory functionality, allowing the agent to recall and use information from previous interactions.
- Tools: The tools available to the agent.
- Agent: Specifies the type of agent to instantiate. Currently supported types include
zero-shot-react-description,react-docstore,self-ask-with-search,conversational-react-description, andopenai-functions.
CSVAgent
The CSVAgent interacts with CSV (Comma-Separated Values) files, commonly used to store tabular data. Each row in a CSV file represents a record, and each column represents a field. The CSV agent can read and write CSV files, process data, and perform tasks such as filtering, sorting, and aggregating.
Parameters:
- LLM: The language model used by the
CSVAgent. - Path: The file path to the CSV data.
JSONAgent
The JSONAgent manages JSON (JavaScript Object Notation) data. This agent, like the CSVAgent, uses a language model (LLM) and a toolkit for JSON manipulation. It can explore a JSON blob to extract needed information, list keys, retrieve values, and navigate through the JSON structure.
Parameters:
- LLM: The language model used by the
JSONAgent. - Toolkit: The toolkit available to the agent.
SQLAgent
The SQLAgent interacts with SQL databases, capable of querying, retrieving data, and executing SQL statements. It provides insights into the database structure, including tables and schemas, and can perform operations such as insertions, updates, and deletions.
Parameters:
- LLM: The language model used by the
SQLAgent. - Database URI: The connection URI for the SQL database.
VectorStoreAgent
The VectorStoreAgent operates with a vector store, which is a data structure for storing and querying vector-based data representations. This agent can query the vector store to find information relevant to user inputs.
Parameters:
- LLM: The language model used by the
VectorStoreAgent. - Vector Store Info: The
VectorStoreInfoused by the agent.
VectorStoreRouterAgent
The VectorStoreRouterAgent is a custom agent that uses a vector store router. It is typically used to retrieve information from multiple vector stores connected through a VectorStoreRouterToolkit.
Parameters:
- LLM: The language model used by the
VectorStoreRouterAgent. - Vector Store Router Toolkit: The toolkit used by the agent.
ZeroShotAgent
The ZeroShotAgent uses the ReAct framework to decide which tool to use based on the tool's description. It is the most general-purpose action agent, capable of determining the necessary actions and their sequence through an LLMChain.
Parameters:
- Allowed Tools: The tools accessible to the agent.
- LLM Chain: The LLM Chain used by the agent.