Skip to main content

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

Python License Status PyPI version PyPI downloads

๐Ÿ“– 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() and Team().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() and Team().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=[...] and knowledge=[...] to ah.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() and Team().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 via run_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 @tool and run_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

๐Ÿ“„ License

License: MIT

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agenthub_sdk-0.1.4-py3-none-any.whl (184.9 kB view details)

Uploaded Python 3

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

Hashes for agenthub_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1c8153d2bff8b4305c782de59ed09d7c709fef16db7cb49ed48217e5018bbd97
MD5 200f6d0549177346e2bcba4763f33bd4
BLAKE2b-256 026575303eca2984804846c58249734019f94680fef886811c6267a7d17e2a8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page