Skip to main content

Quickstart

Get up and running with AgentGate in 15 minutes. By the end of this guide, you’ll have submitted your first work order and retrieved the results.

Prerequisites

Before you begin, you’ll need:
  • An AgentGate account with an organization
  • An organization API key
  • A GitHub repository or codebase to work with
Don’t have an account? Sign up to get started.

Step 1: Get Your API Key

  1. Log in to your AgentGate Dashboard
  2. Navigate to SettingsAPI Keys
  3. Click Create API Key
  4. Give your key a name (e.g., “Development”)
  5. Select the scopes you need (or use wildcard for full access)
  6. Copy and save your API key securely
Your API key is only shown once. Store it securely and never commit it to source control.
API keys follow the format org_live_ followed by a random string.

Step 2: Make Your First API Call

Let’s submit a simple work order. This example asks AgentGate to add a README file to a repository.
curl -X POST https://agentgate.mynewapi.com/v1/work-orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskPrompt": "Create a README.md file that describes this project based on the code structure",
    "workspaceSource": {
      "type": "git",
      "repository": "https://github.com/your-org/your-repo",
      "branch": "main"
    }
  }'
You’ll receive a response like:
{
  "workOrderId": "wo_abc123xyz",
  "runId": "run_def456uvw",
  "status": "pending",
  "createdAt": "2024-01-15T10:30:00Z"
}

Step 3: Check the Result

The run executes asynchronously. Check the status by polling the run endpoint:
curl https://agentgate.mynewapi.com/v1/runs/run_def456uvw \
  -H "Authorization: Bearer YOUR_API_KEY"
Run status values:
StatusDescription
pendingQueued for execution
runningCurrently executing
succeededCompleted successfully
failedCompleted with failure
cancelledStopped by user
For production integrations, use webhooks instead of polling to receive real-time notifications when runs complete.

What Just Happened

When you submitted the work order:
  1. AgentGate validated the request and created a work order
  2. A run was created to execute the work order
  3. An isolated workspace was set up from your repository
  4. The AI agent analyzed the code and generated the README
  5. Verification ran to ensure the output meets quality standards
  6. A pull request was created with the changes (if configured)

Next Steps