Component Libraries •
Project Templates
Docs •
Install •
Tutorials •
Developer Guides •
Contribute •
Blog •
Discord
Xircuits Component Library for Agent! Enable intelligent agents with memory, tool usage, and dynamic decision-making.
This library empowers Xircuits with components to build intelligent agents that can interact dynamically with users, store and query memories, and utilize tools for specific tasks. It supports OpenAI and VertexAI agents for creating advanced conversational systems.
Before you begin, you will need the following:
- Python3.9+.
- Xircuits.
Initializes the agent with a name, provider (OpenAI/VertexAI), memory, tools, and system prompts. This is the foundation of the agent setup.
Runs the agent with a given conversation and allows the agent to use tools dynamically. Outputs the conversation history and the agent's last response.
Defines a tool for the agent to use during interactions. The tool can perform custom actions based on user input.
Outputs the result of a tool back to the agent, enabling it to complete its task or provide a response.
Creates a collection of tools (toolbelt) for the agent, which can be referenced in workflows to enhance functionality.
Implements local, temporary memory using NumPy for storing and querying embeddings.
Integrates with the Vecto API to provide external memory support for long-term storage and querying.
Streams a response string word-by-word, mimicking the typing effect often seen in modern conversational systems.
We have provided an example workflow to help you get started with the Agent component library. Give it a try and see how you can create custom Agent components for your applications.
This example uses the AgentRun component to create a conversational agent named HodlBot. The agent uses the get_current_time tool to respond to user queries about the current time in specific locations.
To use this component library, ensure that you have an existing Xircuits setup. You can then install the Agent library using the component library interface, or through the CLI using:
xircuits install agent
You can also do it manually by cloning and installing it:
# base Xircuits directory
git clone https://github.com/XpressAI/xai-agent xai_components/xai_agent
pip install -r xai_components/xai_agent/requirements.txt