Component Libraries •
Project Templates
Docs •
Install •
Tutorials •
Developer Guides •
Contribute •
Blog •
Discord
Xircuits Component Library for Hugging Face – Build advanced workflows with powerful AI tools.
This library integrates Hugging Face capabilities into Xircuits workflows, enabling the use of language models, custom tool creation, and text/image processing.
Before you begin, you will need:
- Python 3.9+.
- Xircuits installed.
- Hugging Face API token
Initializes a Hugging Face language model agent with support for tools and token configuration.
Creates custom tools for Hugging Face agents with a name, description, and functionality.
Executes prompts using the initialized agent and retrieves generated responses.
Loads an image file and prepares it for AI processing.
We have provided an example workflow to help you get started with the Hugging Face Agent component library. Give it a try and see how you can create custom Hugging Face Agent components for your applications.
Check out the HF_sample.xircuits
workflow. This example initializes a Hugging Face agent and uses the HfAgentRun
component to process a prompt and generate a response. A custom tool is created and integrated with the agent to answer simple questions like "What is the capital of France?"
To use this component library, ensure that you have an existing Xircuits setup. You can then install the Hugging Face Agent library using the component library interface, or through the CLI using:
xircuits install hfagent
You can also do it manually by cloning and installing it:
# base Xircuits directory
git clone https://github.com/XpressAI/xai-hfagent xai_components/xai_hfagent
pip install -r xai_components/xai_hfagent/requirements.txt