Concepts
These are the core concepts that Superagent uses to create AI Assistants. It contains practical examples as well as links to papers or sources.
Agents
An agent is a program or system that is designed to perform a specific task or set of tasks. In the context of Supergent, an agent is a Large Language Model that has access to a suite of datasources and tools and can decide which datasources/tools to use based on user input. One or many agents can power an AI Assistant.
Every Agent is equipped with a feature referred to as memory
. This is a crucial component
that allows the Agent to retain and recall information from its interactions.
Memory can be thought of as the agent’s short-term memory, storing recent inputs and outputs
for reference during its current task. This enables the agent to maintain context and provide
relevant responses or actions based on the information it has processed.
Datasources
Superagent allows users to do question answering over datasources
by attaching a Datasource
to an Agent
. Datasources can be both structured (CSV, JSON etc.) or unstructured (PDF, TXT, MD) and depending on the data type Superagent handles these differently.
In the case of unstructured data (like PDF, TXT, MD), Superagent employs two different strategies.
The data is split and chunked into manageable pieces. These chunks are then ingested into a vectorstore, such as Pinecone, for efficient retrieval and usage.
Alternatively, the chunked data can also be used for fine-tuning the language models specific to each Agent.
This process enhances the Agent’s ability to understand and respond to user queries more accurately and contextually.
Below is an overview of all available data sources:
Tools (third-party services or APIs)
Superagent provides the capability to create and attach various tools to an Agent
. These tools can range from ChatGPT Plugins to external APIs.
The purpose of these tools is to enhance the functionality and versatility of the Agent.
For instance, a ChatGPT Plugin could be used to improve the conversational abilities of the Agent,
while an external API could provide the Agent with access to a specific dataset or service.
The process of attaching a tool to an Agent is straightforward and flexible, allowing users to customize their Agents to best suit their needs.
Below is an overview of all available tools and their corresponding metadata:
Workflows
Workflows in Superagent consist of a sequence of Agents that run in a specific order. Each Agent in the workflow has access to its own specific datasources and tools, allowing it to perform its designated task. The output from one Agent is passed on to the next in the sequence, creating a chain of information processing and action. This allows for complex tasks to be broken down into manageable parts, each handled by a specialized Agent. The flexibility of workflows enables the creation of sophisticated systems capable of handling a wide range of tasks.
LLMs
Language models are the core computational models that power the functionality of an Agent, the nuclear power plant of an Agent. They are trained on vast amounts of text data and learn to predict the likelihood of a sentence or to generate a piece of text that follows a given input. In the context of Superagent, language models are used to understand and generate human-like text based on the user’s input and the context provided by the Agent’s memory, datasources, and tools. These models are the driving force behind the Agent’s ability to engage in meaningful and contextually relevant interactions with the user.
Vector databases
Superagent ships with support for the following vector databases:
You can set the default vectorstore by setting the VECTORSTORE
.env variable to one of th ID
in the table above, ex: VECTORSTORE=qdrant
.
Tracing and Observability
Superagent allows you to add observability to your Assistants by integration with either Langfuse (Open Source) or LangSmith. We will be supporting multiple other Open Source alternatives as well.