Skip to content

omerada/AgentHub

πŸ€– AgentHub

A collection of plug-and-play AI agents that automate real tasks.

Python 3.10+ License: MIT PRs Welcome

10 ready-to-use agents Β· CLI + API Β· Extensible framework Β· OpenAI / OpenRouter compatible

Quick Start Β· Agents Β· API Server Β· Build Your Own Β· Roadmap


What is AgentHub?

AgentHub is an open-source library of AI agents that automate real-world tasks β€” SEO analysis, market research, content creation, lead generation, and more. Each agent is production-ready, modular, and can be used via CLI, API, or imported as a Python module.

No complex setup. No boilerplate. Just run.
python run_agent.py seo "Analyze the SEO of https://yoursite.com"
python run_agent.py startup "Generate AI startup ideas for healthcare"
python run_agent.py blog "Write a blog post about autonomous agents"

πŸ”₯ Features

  • 10 Specialized Agents β€” Each agent is an expert at a specific task
  • One-Line Execution β€” Run any agent with a single CLI command
  • REST API β€” FastAPI server to integrate agents into any workflow
  • Tool System β€” Web search, scraping, file I/O, API calls built-in
  • Memory System β€” Agents remember context across reasoning steps
  • OpenRouter / OpenAI Compatible β€” Use any LLM provider
  • Modular Architecture β€” Easy to extend, customize, or chain agents
  • Pipeline Support β€” Chain multiple agents for complex workflows
  • Auto Retry β€” Exponential backoff on LLM failures
  • Step Callbacks β€” Monitor agent reasoning in real-time
  • Structured Logging β€” Built-in Python logging for debugging
  • Docker Ready β€” One-command deployment with Docker Compose

⚑ Quick Start

1. Clone & Install

git clone https://github.com/yourusername/AgentHub.git
cd AgentHub
pip install -r requirements.txt

2. Set your API key

# Option A: OpenRouter (recommended – access to 100+ models)
export OPENROUTER_API_KEY=your_key_here

# Option B: OpenAI directly
export OPENAI_API_KEY=your_key_here

3. Run an agent

python run_agent.py seo "Analyze the SEO of https://example.com"

That's it. πŸŽ‰


πŸ€– Available Agents

Agent Key Description
πŸ” SEO Analyzer seo Full website SEO audit with actionable recommendations
πŸ’‘ Startup Idea Generator startup Generates and validates startup ideas with market analysis
🐦 Twitter Content twitter Creates content calendars, tweets, and thread strategies
πŸ“Š Market Research market In-depth market analysis with SWOT and competitive landscape
πŸ”§ Code Review code_review Reviews code for bugs, security issues, and best practices
✍️ Blog Writer blog SEO-optimized, publication-ready blog posts
🎯 Lead Generation leads Finds and qualifies B2B leads with outreach suggestions
πŸ“ˆ Trend Finder trends Discovers emerging trends with impact analysis
βš”οΈ Competitor Analyzer competitor Deep competitive analysis with feature comparison
πŸš€ Product Launch launch Complete launch plans with go-to-market strategies

Usage

# CLI
python run_agent.py <agent_key> "Your task description"

# Examples
python run_agent.py seo "Audit https://mysite.com for SEO issues"
python run_agent.py startup "Generate fintech startup ideas in Latin America"
python run_agent.py twitter "Create a week of Twitter content for a dev tools brand"
python run_agent.py market "Research the no-code platform market"
python run_agent.py code_review "Review the code in ./src/main.py"
python run_agent.py blog "Write about microservices vs monoliths"
python run_agent.py leads "Find leads for a B2B email marketing tool"
python run_agent.py trends "What are the emerging trends in Web3?"
python run_agent.py competitor "Compare Figma vs Sketch vs Adobe XD"
python run_agent.py launch "Plan the launch of a new AI coding assistant"

🌐 API Server

AgentHub includes a FastAPI server for REST API access:

# Start the server
uvicorn server:app --reload

# Run an agent via API
curl -X POST http://localhost:8000/agent/seo \
  -H "Content-Type: application/json" \
  -d '{"task": "Analyze SEO of https://example.com"}'

# List available agents
curl http://localhost:8000/agents

API Endpoints

Method Endpoint Description
GET /health Health check
GET /agents List all available agents
POST /agent/{name} Run an agent with a task

πŸ”— Agent Pipelines

Chain multiple agents for complex workflows:

from agenthub.agents.trend_finder_agent import TrendFinderAgent
from agenthub.agents.startup_idea_agent import StartupIdeaAgent
from agenthub.agents.competitor_analyzer_agent import CompetitorAnalyzerAgent

# Step 1: Find trends
trends = TrendFinderAgent().run("Emerging AI trends in 2026")

# Step 2: Generate ideas based on trends
ideas = StartupIdeaAgent().run(f"Ideas based on: {trends.output}")

# Step 3: Analyze competition
analysis = CompetitorAnalyzerAgent().run(f"Competitors for: {ideas.output[:1000]}")

See the examples/ folder for complete pipeline scripts.


πŸ›  Tools

Built-in tools available to all agents:

Tool Description
web_search Search the web via DuckDuckGo (no API key needed)
scrape_url Fetch and extract text from any webpage
read_file Read local text files
write_file Write content to local files
call_api Make HTTP requests to external APIs

🧩 Build Your Own Agent

Creating a new agent takes ~20 lines:

from agenthub.core import Agent
from agenthub.tools import web_search_tool, write_file_tool

class MyCustomAgent(Agent):
    name = "My Custom Agent"
    description = "Does something amazing."
    system_prompt = """You are an expert at ..."""
    max_steps = 8

    def __init__(self, **kwargs):
        super().__init__(
            tools=[web_search_tool, write_file_tool],
            **kwargs,
        )

# Run it
agent = MyCustomAgent()
result = agent.run("Do the thing")
print(result.output)

Create a Custom Tool

from agenthub.core.tools import Tool

def my_tool_fn(query: str) -> str:
    return f"Result for: {query}"

my_tool = Tool(
    name="my_tool",
    description="Description for the LLM.",
    parameters={
        "type": "object",
        "properties": {
            "query": {"type": "string", "description": "The input query."},
        },
        "required": ["query"],
    },
    fn=my_tool_fn,
)

πŸ“ Project Structure

agenthub/
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ seo_agent/           # SEO Website Analyzer
β”‚   β”œβ”€β”€ startup_idea_agent/  # Startup Idea Generator
β”‚   β”œβ”€β”€ twitter_agent/       # Twitter Content Creator
β”‚   β”œβ”€β”€ market_research_agent/ # Market Research
β”‚   β”œβ”€β”€ code_review_agent/   # Code Reviewer
β”‚   β”œβ”€β”€ blog_writer_agent/   # Blog Writer
β”‚   β”œβ”€β”€ lead_generation_agent/ # Lead Generator
β”‚   β”œβ”€β”€ trend_finder_agent/  # Trend Finder
β”‚   β”œβ”€β”€ competitor_analyzer_agent/ # Competitor Analyzer
β”‚   └── product_launch_agent/ # Product Launcher
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ agent.py             # Base Agent class
β”‚   β”œβ”€β”€ tools.py             # Tool system
β”‚   └── memory.py            # Memory system
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ web_search.py        # Web search tool
β”‚   β”œβ”€β”€ scraper.py           # Web scraper tool
β”‚   β”œβ”€β”€ file_tools.py        # File read/write tools
β”‚   └── api_caller.py        # HTTP API tool
examples/
β”œβ”€β”€ startup_research.py      # Multi-agent pipeline
β”œβ”€β”€ seo_audit.py             # SEO audit example
└── content_pipeline.py      # Content marketing pipeline
run_agent.py                 # CLI runner
server.py                    # FastAPI server
tests/                       # Test suite (pytest)
Dockerfile                   # Container build
docker-compose.yml           # One-command deploy

🐳 Docker

# Build and run with Docker Compose
docker compose up --build

# Or with plain Docker
docker build -t agenthub .
docker run -p 8000:8000 --env-file .env agenthub

The API will be available at http://localhost:8000.


πŸ§ͺ Testing

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

πŸš€ Roadmap

  • Core agent framework with tool calling
  • 10 specialized agents
  • CLI runner
  • FastAPI REST API
  • Memory system
  • Docker support
  • Automatic retry with backoff
  • Step callbacks for monitoring
  • Comprehensive test suite
  • Streaming responses
  • Agent-to-agent communication
  • Persistent vector memory (ChromaDB / Qdrant)
  • Web UI dashboard
  • Authentication & rate limiting for API
  • More agents: Email Agent, Data Analyst, Resume Builder, Legal Reviewer
  • Plugin system for community agents
  • LangSmith / Langfuse tracing integration

🀝 Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-agent
  3. Add your agent in agenthub/agents/your_agent/
  4. Test it works: python run_agent.py your_agent "test task"
  5. Submit a pull request

See CONTRIBUTING.md for detailed guidelines.

Ideas for Contributions

  • New agents (Email, Data Analysis, Resume, Legal, etc.)
  • New tools (PDF reader, database connector, etc.)
  • UI/Dashboard
  • Better memory systems
  • Documentation improvements

πŸ“„ License

MIT License β€” see LICENSE for details.


⭐ Star this repo if you find it useful!

Built with ❀️ by the open-source community.

About

A collection of plug-and-play AI agents that automate real-world tasks like SEO, research, coding, marketing and more.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors