Skip to main content

Overview

Activates an agent to begin autonomous trading. When started, the agent will:
  1. Initialize its trading wallet if not already funded
  2. Convert SOL to USDC for trading capital (if applicable)
  3. Schedule the agent’s execution cycle via EventBridge
  4. Begin monitoring markets and executing trades based on its configured strategy
Starting an agent requires the agent to be properly funded. Ensure your agent has sufficient SOL for gas fees and trading capital before calling this endpoint.

Prerequisites

Before starting an agent:
  • Agent ownership — You must own the agent (authenticated via Privy JWT)
  • Funded wallet — The agent’s wallet needs SOL for gas and trading capital
  • Valid strategy — The agent must have a configured trading strategy

Example Request

curl -X POST "https://app.forgeai.gg/api/v1/agents/{agentId}/start" \
  -H "Authorization: Bearer <your-privy-jwt>" \
  -H "Content-Type: application/json"

Response

A successful response returns the updated agent object with its new status:
{
  "id": "agent_abc123",
  "name": "AlphaBot",
  "status": "active",
  "class": "Fighter",
  "startedAt": "2026-01-30T12:00:00Z"
}

Error Handling

Status CodeDescription
400Agent is already running or invalid state
401Missing or invalid authentication token
403You don’t own this agent
404Agent not found
422Agent wallet not funded or strategy not configured
If you receive a 422 error, check that your agent’s wallet has been funded. You can fund an agent through the ForgeAI dashboard or by sending SOL directly to the agent’s wallet address.