Este repositorio contiene un script de Python que implementa un sistema multiagente. Utiliza varios modelos y herramientas El script aprovecha los modelos de Hugging Face y el modelo LiteLLM de OpenAI para crear agentes capaces de ejecutar codigo creado por el mismo agente.
- Hugging Face Integration: Utilizes Hugging Face's
CodeAgent
andHfApiModel
for executing code-related tasks. - OpenAI Integration: Implements a proxy for OpenAI's LiteLLM model to handle requests.
- Custom Tool Creation: Demonstrates how to create and use custom tools with the
@tool
decorator. - Web Scraping: Includes an example of an agent that can scrape and return data from a webpage in JSON format.
- CodeAgent: Test
- ToolCallingAgent: Test
- Search Functionality: Integrates a search tool to fetch information from DuckDuckGo.
-
UV package manager: UV install
-
Prepare environment:
uv venv --python 3.11 && source .venv/bin/activate && uv pip install -r requirements.txt
-
Install the required packages:
uv pip install -r requirements.txt
-
Create a
.env
file in the root directory and add your API tokens:HF_API_TOKEN=your_hugging_face_api_token OPENAI_API_KEY=your_openai_api_key
First Telemetry:
uv run python -m phoenix.server.main serve
then
Run the script using:
uv run main.py
memory loop is wrong driven .