Deploying an agent has three main steps:
- Creating the agent blueprint
 - Creating a build
 - Starting an instance
 
There are two main ways to deploy an agent:
- GitHub Integration - Connect your GitHub repository for automatic deployment through the platform.
 - API Deployment - Use the AgentHub API to create blueprints, builds, and instances programmatically.
 
GitHub Integration
The simplest way to deploy - connect your GitHub repository and we handle the rest.
Process:
- Navigate to Deploy
 - Select your GitHub repository
 - Choose branch and configure
 - Click deploy
 
Benefits:
- Automatic containerization
 - Dependency management
 - Environment variable setup
 - Description and summary for discoverability
 
Auto-Detection
AgentHub automatically detects:
- Language/Framework - Python, Node.js, Go, etc.
 - Dependencies - requirements.txt, package.json, go.mod
 - Entry Point - main.py, index.js, or specified in config
 - Port - Detected from code or defaults to 8080
 
Build Process
When you deploy, AgentHub:
- Clones your repository
 - Detects framework and dependencies
 - Builds optimized container image
 - Runs health checks
 - Deploys to production
 - Generates unique URLs
 
Custom Dockerfile
If you need custom build steps, include a Dockerfile in your repository:
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    && rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY . .
# Run agent
EXPOSE 8080
CMD ["python", "main.py"]
API Deployment
For advanced users, you can deploy agents using the AgentHub API.
Steps to Deploy via API
### Create agent
POST {{baseUrl}}/agents/
Content-Type: application/json
Authorization: Bearer {{apiKey}}
{
  "organization_id": "{{orgId}}",
  "name": "HTTP Agent",
  "description": "An example agent.",
  "summary": "Brief overview of HTTP Agent functionality",
  "github_repo": "https://github.com/your-org/http-agent",
  "stdin_enabled": false,
  "http_port": 80,
  "http_health_check_path": "/",
  "github_branch": "test",
  "working_directory": "/",
  "dockerfile_path": "Dockerfile",
  "long_running": false,
  "env_vars": [
    {
      "name": "KEY",
      "value": "VALUE",
      "required": true,
      "description": "Example environment variable",
      "hidden": true
    },
    {
      "name": "KEY2",
      "value": "VALUE",
      "required": true,
      "description": "Example environment variable",
      "hidden": false
    }
  ]
}
Need help? Check our FAQ or contact support