AgentHub - The App Store for AI Agents
Project description
๐ค AgentHub
The "App Store for AI Agents" - Discover, compose, and use AI agents with one-line simplicity
๐ Documentation โข ๐ Quick Start โข ๐ค Contributing โข ๐ง Contact
๐ What is AgentHub?
Transform weeks of AI agent integration into one line of code. AgentHub makes powerful AI agents as easy to use as installing a Python package โ and lets you compose them into robust multi-agent Teams.
๐บ๏ธ At a Glance
- What you do: Install agents, customize with tools/knowledge, and compose a Team to solve complex goals
- What you get: High-level
agent.solve()andTeam().solve()APIs, isolation, auto-install, and monitoring - Who it's for: Developers and builders who want pragmatic, composable AI systems without boilerplate
๐ฏ Core Abilities
AgentHub revolutionizes how you work with AI agents:
- ๐งฉ Compose Multi-Agent Systems: Build a
Team()by plugging together pre-built or custom agents - ๐ง Universal Intelligence:
agent.solve()andTeam().solve()for high-level, goal-driven execution - ๐ง Customize Agents: Add custom tools and domain knowledge to any agent
- ๐ช Agent Marketplace: Discover and install agents from GitHub with one command
- ๐ One-Line Integration:
ah.load_agent("user/agent")- no complex setup required - ๐ Isolated Environments: No dependency conflicts between agents
- โก Auto-Installation: Agents install automatically when needed
- ๐ฏ CLI Interface: Full command-line management and execution
- ๐ Comprehensive Monitoring: Full visibility into agent execution and performance
Before AgentHub
# Traditional approach: 2-4 weeks setup
# 1. Find agent on GitHub
# 2. Clone repository
# 3. Read documentation
# 4. Install dependencies (version conflicts!)
# 5. Configure environment
# 6. Debug integration issues
# 7. Write wrapper code
# 8. Test and validate
With AgentHub
# One line, 30 seconds
import agenthub as ah
coding_agent = ah.load_agent("agentplug/coding-agent")
code = coding_agent.generate_code("neural network class")
๐งฉ Build Multi-Agent Teams (High-Level Flow)
Create complex systems by composing pre-built agents (research, analysis, data access, planning, quality control, ...) and your custom agents into a Team().
import agenthub as ah
# 1) Load pre-built agents from the marketplace (customize via load params)
research = ah.load_agent(
"agentplug/research-agent",
external_tools=["web_search"], # attach your tools
knowledge=["knowledge/base/"] # attach your knowledge sources
)
analysis = ah.load_agent(
"agentplug/analysis-agent",
knowledge=["knowledge/base/"]
)
planner = ah.load_agent("agentplug/planning-agent")
qc = ah.load_agent("agentplug/quality-control-agent")
# 3) Compose into a Team
# Team API preview โ designed for simple, high-level orchestration
from agenthub import Team # Coming soon
team = Team(name="ResearchPipeline", agents=[planner, research, analysis, qc])
# 4) High-level goal, single entry point
result = team.solve("Analyze the latest LLM papers and produce actionable insights")
print(result["result"]) # Unified output
Flow to build:
- Pick agents: research, analysis, data access, planning, quality control, ...
- Customize: pass
external_tools=[...]andknowledge=[...]toah.load_agent(...) - Compose: add agents into a
Team() - Solve: call
Team().solve(goal)to run the entire multi-agent pipeline
โจ Key Features
- ๐งฉ Team Composition (High-Level Logic): Create a
Team()and plug agents together to build complex systems - ๐ง Universal Solve Method:
agent.solve()andTeam().solve()- describe goals, not steps - ๐ช Agent Marketplace: Discover and install agents from GitHub with one command
- ๐ One-Line Integration:
ah.load_agent("user/agent")- no complex setup required - ๐ ๏ธ Custom Tools & Knowledge: Create tools with
@tool, connect viarun_resources(), and attach domain knowledge - ๐ Isolated Environments: No dependency conflicts between agents
- โก Auto-Installation: Agents install automatically when needed
- ๐ฏ CLI Interface: Full command-line management and execution
- ๐ Comprehensive Monitoring: Full visibility into agent execution and performance
๐ Quick Start
โก Install AgentHub
# Install AgentHub
pip install agenthub-sdk
# Verify installation
agenthub --version
๐ฏ Your First Agent (30 seconds)
import agenthub as ah
# ๐ช One line to load any agent
coding_agent = ah.load_agent("agentplug/coding-agent")
# ๐ง Universal solve method - AI automatically selects the best approach
result = coding_agent.solve("Create a Python function that calculates compound interest")
print(result["result"])
# โ
Magic happens automatically:
# โข GitHub repository cloned
# โข Virtual environment created
# โข Dependencies installed
# โข Agent validated and ready
# โข AI selects optimal method for your query
๐ง Universal Solve Method
Describe your goal in natural language โ agent.solve() (and soon Team().solve()) selects the best internal method and executes the steps:
import agenthub as ah
# Load any agent
coding_agent = ah.load_agent("agentplug/coding-agent")
analysis_agent = ah.load_agent("agentplug/analysis-agent")
# ๐ง AI automatically selects the best method for each query
code = coding_agent.solve("Create a neural network class") # โ generate_code()
review = coding_agent.solve("Review this code: def hello(): print('world')") # โ review_code()
explanation = coding_agent.solve("Explain what this function does") # โ explain_code()
# ๐ Analysis agent automatically chooses the right approach
insights = analysis_agent.solve("Analyze this customer feedback: 'Great app!'") # โ analyze_text()
data_analysis = analysis_agent.solve("Process sales_data.csv") # โ analyze_data()
# โ
No need to know specific method names - just describe what you want!
๐ ๏ธ Custom Tools & Extensions
AgentHub makes it easy to extend agents with custom tools:
from agenthub.core.tools import tool, run_resources
# Create custom tools with @tool decorator
@tool(name="web_search", description="Search the web for information")
def web_search(query: str) -> str:
"""Search the web for information."""
# Your custom implementation
return f"Search results for: {query}"
@tool(name="database_query", description="Execute SQL query on database")
def database_query(sql: str) -> dict:
"""Execute SQL query on database."""
# Your custom implementation
return {"results": "..."}
# Start the tool server - this makes tools available to agents
if __name__ == "__main__":
print("๐ Starting tool server...")
run_resources() # This starts the MCP server
Using Tools with Agents:
import agenthub as ah
# Load agent with external tools (tools are now available after run_resources())
coding_agent = ah.load_agent(
"agentplug/coding-agent",
external_tools=["web_search", "database_query"] # Connect to your custom tools
)
result = coding_agent.solve("Search for React best practices and create a component")
# โ
Agent can now use your custom web_search tool!
๐ Complete Tool Workflow Example
Here's the complete workflow for using custom tools with agents:
# 1. Define and start tools (run this first)
from agenthub.core.tools import tool, run_resources
@tool(name="web_search", description="Search the web for information")
def web_search(query: str) -> str:
return f"Search results for: {query}"
if __name__ == "__main__":
run_resources() # Start MCP server
# 2. Use tools with agents (run this after starting tools)
import agenthub as ah
coding_agent = ah.load_agent(
"agentplug/coding-agent",
external_tools=["web_search"] # Connect to your custom tool
)
result = coding_agent.solve("Search for Python best practices and create a function")
# โ
Agent can now use your web_search tool!
๐ Isolated Environments
Each agent runs in its own isolated environment:
# No dependency conflicts between agents
coding_agent = ah.load_agent("agentplug/coding-agent") # Uses Python 3.11
data_agent = ah.load_agent("agentplug/data-agent") # Uses Python 3.12
ml_agent = ah.load_agent("agentplug/ml-agent") # Uses different packages
# All agents work independently without conflicts
๐ป CLI Commands
# Get agent information
agenthub info agentplug/scientific-paper-analyzer
# Install new agent
agenthub agent install agentplug/scientific-paper-analyzer
# Execute agent method (multiple ways)
agenthub exec agentplug/scientific-paper-analyzer analyze_paper "research.pdf"
agenthub exec agentplug/scientific-paper-analyzer analyze_paper '{"file": "research.pdf"}'
agenthub exec agentplug/scientific-paper-analyzer analyze_paper --interactive
# Agent management commands
agenthub agent list # List installed agents
agenthub agent status agentplug/scientific-paper-analyzer # Check agent status
agenthub agent remove agentplug/scientific-paper-analyzer # Remove an agent
agenthub agent backup agentplug/scientific-paper-analyzer # Create backup
agenthub agent restore agentplug/scientific-paper-analyzer # Restore from backup
agenthub agent repair agentplug/scientific-paper-analyzer # Repair broken agent
agenthub agent migrate agentplug/scientific-paper-analyzer # Migrate Python version
agenthub agent optimize agentplug/scientific-paper-analyzer # Optimize environment
agenthub agent analyze-deps agentplug/scientific-paper-analyzer # Analyze dependencies
# System validation
agenthub validate
๐ ๏ธ Creating Your Own Agent
1. Create Agent Files
mkdir my-coding-agent
cd my-coding-agent/
Create agent.py:
class CodingAgent:
def __init__(self):
self.name = "Coding Agent"
def generate_code(self, description: str) -> str:
"""Generate code based on description."""
return f"# Generated code for: {description}\nprint('Hello, World!')"
def review_code(self, code: str) -> str:
"""Review and improve code."""
return f"Code review: {code} looks good!"
Create agent.yaml:
name: coding-agent
version: 1.0.0
description: AI agent for code generation and review
author: your-username
entry_point: agent.py:CodingAgent
2. Test Locally
agenthub exec ./my-coding-agent generate_code "hello world"
3. Publish to GitHub
git init
git add .
git commit -m "Initial agent release"
git remote add origin https://github.com/your-username/my-coding-agent.git
git push -u origin main
4. Share with the World
# Anyone can now use your agent:
import agenthub as ah
agent = ah.load_agent("your-username/my-coding-agent")
code = agent.generate_code("React component")
๐ Examples
๐ง Universal Solve Method (Recommended)
import agenthub as ah
# Load agents
coding_agent = ah.load_agent("agentplug/coding-agent")
analysis_agent = ah.load_agent("agentplug/analysis-agent")
# ๐ฏ AI automatically selects the best method for each query
code = coding_agent.solve("Create a React component for data table")
print(code["result"])
review = coding_agent.solve("Review this code: def hello(): print('world')")
print(review["result"])
insights = analysis_agent.solve("Analyze this customer feedback: 'Great app!'")
print(insights["result"])
๐ ๏ธ Direct Method Calls
import agenthub as ah
# Load coding agent
coding_agent = ah.load_agent("agentplug/coding-agent")
# Direct method calls (when you know the specific method)
code = coding_agent.generate_code("React component for data table")
print(code["result"])
review = coding_agent.review_code("def hello(): print('world')")
print(review["result"])
๐ง Universal Solve Method Benefits
- ๐ฏ No Method Learning: Just describe what you want
- ๐ค AI Method Selection: Automatically chooses the best approach
- ๐ Natural Language: Use plain English queries
- ๐ Consistent Interface: Same pattern across all agents
๐ค Contributing
We welcome contributions! You can:
- Build and contribute new tools (via
@toolandrun_resources()) - Create new pre-built agents (publishable GitHub repos with
agent.yaml) - Enhance existing agents (add methods, improve prompts, optimize flows)
- Improve documentation and examples
Here's how to get started:
๐ Development Setup
# 1. Fork and clone
git clone https://github.com/YOUR_USERNAME/agenthub.git
cd agenthub
# 2. Setup environment
python3.12 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e ".[dev]"
# 3. Run tests
pytest tests/ -v
# 4. Make changes
git checkout -b feature/your-feature
๐ฏ Ways to Contribute
- ๐งฐ Tools: Add new tools or improve existing ones
- ๐ค Pre-built Agents: Create and share agents for common tasks
- ๐ Enhancements: Optimize agent methods, prompts, and pipelines
- ๐ Bug Reports: Open an Issue
- ๐ Documentation: Improve guides and examples
- ๐ง Code: Fix bugs, add features
- ๐จ Design: UI/UX improvements
- ๐ Testing: Help improve test coverage
๐ Support & Community
๐ฌ Get Help
| Platform | Purpose | Link |
|---|---|---|
| ๐ฌ Discord | Live chat and support | Join Server |
| ๐ฆ Twitter | Updates and announcements | @AgentHub |
| ๐ง Email | Business inquiries | agenthub@agentplug.net |
๐ Report Issues
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Security Issues: agenthub@agentplug.net
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ AgentHub - Making AI agents as easy as pip install
One line. Infinite possibilities.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agenthub_sdk-0.1.4-py3-none-any.whl.
File metadata
- Download URL: agenthub_sdk-0.1.4-py3-none-any.whl
- Upload date:
- Size: 184.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c8153d2bff8b4305c782de59ed09d7c709fef16db7cb49ed48217e5018bbd97
|
|
| MD5 |
200f6d0549177346e2bcba4763f33bd4
|
|
| BLAKE2b-256 |
026575303eca2984804846c58249734019f94680fef886811c6267a7d17e2a8e
|