Skip to main contentIn the RAG framework, agents are specialized AI entities designed to handle specific types of requests.
In terms of RAG, an agent is a function calling agent.
Each agent is configured with a profile that determines its role, behavior, and the tools it can use and how it can use them.
Agents Profiles has the following characteristics:
- System prompt: Each agent is defined by a unique system prompt that sets its tone of voice, supported languages, and context. This system prompt establishes the role the agent plays and defines general rules for its behavior.
- Workflow type: Each agent profile includes a workflow type which controls the format of their output. Currently supported workflow types are:
- Text: Generates free-form text responses without memory management, ideal for straightforward answers (e.g., feedback generation in an education platform).
- Structured Data: Produces responses based on predefined schemas or templates, which are useful for structured content generation and validation (e.g., personalized lesson creation in Education Platform).
- Conversation: Functions as a chat application, generating free-form responses based on incoming messages and using tools to manage chat functions. This type can support streaming and session-based interactions (e.g., Digital Accountant).
- Toolset: Each agent is equipped with a selection of tools from the Tool Repository. These tools are chosen to support the agent’s specific tasks, allowing it to access data, perform calculations, generate visualizations, and more. The enabled tools for each agent can be adjusted according to the agent’s role.
Agents leverage tools as reusable modules, using them in a sequence that’s determined by the dynamically generated pipeline for each request. When a tool is enabled for an agent, the agent can determine whether the tool is needed based on the request context. It then calls the tool with parameters generated by the AI, producing a specific output to fulfill part of the task.
- Intermediate Memory: When an agent calls a tool, it temporarily stores the output in session memory, allowing it to be referenced or used in subsequent steps. This enables complex workflows where multiple tools might be chained together, and memory is updated iteratively as new information becomes available.
- Input and Output Schema: Each tool has a strict input and output schema. This structured design ensures that agents know exactly what type of data is required to use each tool and what format the results will take. Output schemas are crucial as they allow the agent to use tool results as input for subsequent tools or as final answers.