Spaces:
Sleeping
AgentPro
AgentPro is a flexible framework for building AI agents with multiple specialized tools. This repository allows you to create powerful agents that can search the internet, generate code, analyze YouTube videos, create presentations, and more.
Features
- π§ Flexible Agent Architecture: Built on the ReAct framework to combine reasoning and action
- π§ Modular Tool System: Easily extend with custom tools
- π Internet Search: Real-time web search using the Ares API
- π» Code Generation & Execution: Generate and run Python code on-the-fly
- π¬ YouTube Analysis: Search, extract transcripts, and summarize YouTube videos
- π Presentation Generation: Create PowerPoint presentations automatically
Quick Start
Installation
Clone the repository and install the required packages:
git clone https://github.com/traversaal-ai/AgentPro.git
cd AgentPro
pip install -r requirements.txt
Configuration
Create a .env
file in the root directory with your API keys:
OPENAI_API_KEY=your_openai_api_key
TRAVERSAAL_ARES_API_KEY=your_traversaal_ares_api_key
Ares internet tool: Searches the internet for real-time information using the Traversaal Ares API. To get TRAVERSAAL_ARES_API_KEY
. Follow these steps:
- Go to the Traversaal API platform
- Log in or create an account
- Click "Create new secret key"
- Copy the generated key and paste in
.env
file :
Running the Agent
From the command line:
python main.py
This starts an interactive session with the agent where you can enter queries.
Basic Usage
from agentpro import AgentPro, ares_tool, code_tool, youtube_tool
agent = AgentPro(tools=[ares_tool, code_tool, youtube_tool])
# Run a query
response = agent("Generate a summary on the latest AI advancements")
print(response)
You can also use the Quick Start Jupyter Notebook to run AgentPro directly in Colab.
π Traversaal x Optimized AI Hackathon 2025
Weβre teaming up with the Optimized AI Conference 2025 to host a global hackathon on AI Agents β open to all developers, builders, researchers, and dreamers working on intelligent systems.
The Challenge
Build a real, functional AI Agent that solves a real-world problem.
This isnβt about flashy demos. We want to see domain-specific, usable, vertical agents β like:
- π§βπΌ Customer Support Agents
- π¬ Research Assistants
- π Data Analyst Agents
- π‘ Or something totally original
You can use any framework, but we recommend trying AgentPro β our open-source toolkit designed for rapid prototyping and robust architecture.
Key Dates
- Hackathon Starts: April 9, 2025
- Submission Deadline: April 15, 2025
- Winners Announced: April 15, 2025 (Live @ Optimized AI Conference)
Prizes + Recognition
Prize Tier | Reward |
---|---|
π₯ Grand Prize | $1,000 |
π₯ Runner-Up | $500 |
π₯ Honorable Mention x2 | $250 |
Plus:
- 1:1 Mentorship opportunities
- Invitation to Traversaalβs AI Fellowship Program
Want to be a Judge?
Weβre looking for global experts in AI, product, UX, and enterprise applications to help evaluate the submissions. π Apply to be a Judge
For more details, follow this link
π© Questions? Reach us at hackathon-oai@traversaal.ai
Data Science Agent
https://github.com/user-attachments/assets/aeeb91e4-134e-4a14-bbc4-2523ba236c56
Tools Overview
The AgentPro toolkit comes with a variety of default tasks, such as:
- Internet Research: "What are the latest developments in quantum computing?"
- Code Generation: "Create a Python script to analyze stock prices and generate a chart"
- YouTube Analysis: "Find and summarize recent videos about machine learning"
- Presentation Creation: "Make a presentation about renewable energy sources"
AresInternetTool
Searches the internet for real-time information using the Traversaal Ares API.
ares_tool = AresInternetTool()
result = ares_tool.run("recent advances in AI")
CodeEngine
Generates and executes Python code based on natural language descriptions.
code_tool = CodeEngine()
result = code_tool.run("create a bar chart comparing FAANG stocks")
YouTubeSearchTool
Searches for YouTube videos, extracts transcripts, and summarizes content.
youtube_tool = YouTubeSearchTool()
result = youtube_tool.run("machine learning tutorials")
SlideGenerationTool
Creates PowerPoint presentations from structured content.
slide_tool = SlideGenerationTool()
slides = [
{"slide_title": "Introduction", "content": "Overview of the topic"},
{"slide_title": "Key Points", "content": "The main arguments and findings"}
]
result = slide_tool.run(slides)
DataAnalysisTool
Analyzes data files and provides statistical insights, visualizations, and exploratory data analysis.
data_tool = DataAnalysisTool()
# Basic usage with a file path
result = data_tool.run("path/to/data.csv")
# With specific analysis parameters
analysis_params = {
"file_path": "path/to/data.csv",
"analysis_type": "visualization",
"viz_type": "correlation",
"columns": ["age", "income", "education"]
}
result = data_tool.run(analysis_params)
Creating Custom Tools
You can create your own tools by extending the Tool
base class:
from agentpro.tools.base import Tool
class MyCustomTool(Tool):
name: str = "My Custom Tool"
description: str = "Description of what your tool does"
arg: str = "Information about the required input format"
def run(self, prompt: str) -> str:
# Your tool implementation here
return "Result of the tool operation"
Then initialize your agent with the custom tool:
custom_tool = MyCustomTool()
agent = AgentPro(tools=[custom_tool, ares_tool, code_tool])
Project Structure
agentpro/
βββ agentpro/
β βββ __init__.py
β βββ agent.py # Main agent implementation
β βββ tools/
β β βββ __init__.py
β β βββ base.py # Base tool classes
β β βββ ares_tool.py # Internet search
β β βββ code_tool.py # Code generation
β β βββ youtube_tool.py # YouTube analysis
β β βββ slide_tool.py # Presentation generation (**Work in progress**)
β βββ examples/
β βββ __init__.py
β βββ example_usage.py # Usage examples
βββ main.py # CLI entry point
βββ requirements.txt # Dependencies
βββ .env # API keys (create this file)
Requirements
- Python 3.8+
- OpenAI API key
- Traversaal Ares API key (for internet search)
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for more details.