Documentation

Docs
/
Quickstart

5-Minute Quickstart

Deploy your first agent in 5 minutes or less

In this guide you will deploy a Market News Agent that:

  • Fetches real-time market news for any topic
  • Generates AI-powered trading insights using Google Gemini
  • Runs continuously, updating every hour
  • Gets its own unique URL for sharing

Prerequisites

Step 1: Fork the Example Repository

  1. Go to example-market-news-agent
  2. Click "Fork" in the top-right corner
  3. Choose your GitHub account as the destination

Step 2: Deploy to AgentHub

  1. Visit AgentHub
  2. Click "Sign in with GitHub"
  3. Authorize AgentHub (first time only)
  4. Click "Deploy Your Agent"
  5. Select your forked example-market-news-agent repository (if no repositories show, make sure to install the AgentHub GitHub app)
  6. Choose the main branch

Done! AgentHub is now analyzing the code and generating a container.

Step 3: Configure Your Agent

You'll see the configuration page with auto-detected settings:

Required Environment Variables

You should see these two variables:

  1. TARGET_QUERY

    • What market topic to track
    • Example: "renewable energy stocks"
    • Example: "artificial intelligence companies"
  2. GEMINI_API_KEY

If these variables are set now, they will be used for all instances of this agent. You can also set them when starting an instance. You can leave them empty for now.

Important Settings

Check this box:

  • Long running - Keeps your agent running continuously

Click "Publish" to create your agent blueprint.

Step 4: Start Your Instance

  1. Wait for build - The "Builds" tab shows progress (1-2 minutes)
  2. Build complete - You'll see "Build Ready" status
  3. Click "Start an Instance"
  4. Fill environment variables:
    TARGET_QUERY: electric vehicle stocks
    GEMINI_API_KEY: AIzaSyBOUrActualAPIKeyHere123456
    
  5. Click "Start Instance"

Done! Your agent is starting up.

Step 5: Watch It Work

Instance Page Features:

  • Real-time logs - Watch your agent fetch news and generate insights
  • Unique URL - Share your running agent with others
  • Performance metrics - CPU, memory, and response time tracking

Expected Log Output:

[INFO] Agent started successfully
[INFO] Fetching news for: electric vehicle stocks
[INFO] Found 15 relevant articles
[INFO] Generated 3 trading insights:
[INFO] 1. Tesla earnings beat expectations, potential 5% upside
[INFO] 2. EV charging infrastructure expanding, benefiting ChargePoint
[INFO] 3. Battery technology breakthrough from QuantumScape
[INFO] Next update in 60 minutes

What you now have:

  • Running AI agent with unique URL
  • Real-time market analysis
  • Shareable link for social media
  • Professional agent landing page
  • Usage analytics and monitoring

Sharing Your Agent

Agent blueprints are public but not indexed, so you can share the link directly. Users can start their own instances with their API keys.

What Happens Next?

Your Agent Will:

  • Fetch market news every hour
  • Generate fresh AI insights
  • Log all activity for monitoring
  • Run continuously until you stop it

You Can:

  • Monitor performance via the dashboard
  • Share your agent with others
  • Deploy updates by creating new builds

Others Can:

  • Visit your agent's landing page
  • Start their own instance with their API keys
  • Customize the target query for their interests

Next Steps (Optional)

Build Your Own Agent

Simple Web Agent Template:

# app.py - Basic web agent template
from flask import Flask, request, jsonify
import os

app = Flask(__name__)

@app.route('/health')
def health():
    return {'status': 'healthy'}

@app.route('/chat', methods=['POST'])
def chat():
    user_message = request.json.get('message')
    
    # Your AI logic here
    response = f"AI response to: {user_message}"
    
    return jsonify({'response': response})

if __name__ == '__main__':
    port = int(os.environ.get('PORT', 8080))
    app.run(host='0.0.0.0', port=port)

Publish your code to GitHub, then follow the same steps to deploy it on AgentHub.

Explore Advanced Features

API Integration:

  • Use the AgentHub API to manage agents programmatically
  • Set up automated deployments from CI/CD pipelines
  • Build custom dashboards with webhook integration

Team Collaboration:

  • Invite team members to your organization
  • Share costs and analytics across the team

LLM Router:

  • Automatically route requests to the best LLM provider (OpenAI, Anthropic, Google, etc.)
  • Optimize costs and performance with smart routing
  • A/B test different LLMs for your agents

🚀 Ready to deploy? Start your 5-minute quickstart →