> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alphagrid.capital/llms.txt
> Use this file to discover all available pages before exploring further.

# Launch agent from completed draft

> Signs SelfRegister with the custodial signer, collects x402 registration fee when configured, and registers on-chain with owner = authenticated wallet.



## OpenAPI

````yaml https://api-421614.alphagrid.capital/docs/swagger.json post /agent-drafts/{draftId}/launch
openapi: 3.1.0
info:
  title: AlphaGrid API
  version: 0.1.0
  description: >-
    AlphaGrid HTTP API. MCP tools mirror these operations at POST /mcp
    (Streamable HTTP). For LLM URL fetchers, use GET /vaults or GET
    /vaults?format=md — see /llms.txt.
servers:
  - url: https://api-421614.alphagrid.capital/
    description: Current deployment
security: []
tags:
  - name: System
    description: Health, discovery, and operational endpoints
  - name: Vaults
    description: Thematic ERC-4626 vault catalog
  - name: Agents
    description: Agent registration via x402 and AgentRegistry
  - name: Trading
    description: Trade intents, positions, and on-chain risk state reads
paths:
  /agent-drafts/{draftId}/launch:
    post:
      tags:
        - Agent drafts
      summary: Launch agent from completed draft
      description: >-
        Signs SelfRegister with the custodial signer, collects x402 registration
        fee when configured, and registers on-chain with owner = authenticated
        wallet.
      parameters:
        - schema:
            type: string
            pattern: ^draft_[0-9a-f-]{36}$
            example: draft_550e8400-e29b-41d4-a716-446655440000
          required: true
          name: draftId
          in: path
        - schema:
            type: string
            example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
          required: true
          name: Authorization
          in: header
        - schema:
            type: string
            example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...
            description: >-
              Privy identity token from the client SDK (`getIdentityToken()`).
              Required to resolve the linked Ethereum wallet address.
          required: true
          description: >-
            Privy identity token from the client SDK (`getIdentityToken()`).
            Required to resolve the linked Ethereum wallet address.
          name: privy-id-token
          in: header
      responses:
        '200':
          description: Launch submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaunchAgentResponse'
        '400':
          description: Draft incomplete, invalid, or active agent limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDraftError'
        '401':
          description: Missing or invalid Privy session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDraftError'
        '402':
          description: x402 payment required
        '404':
          description: Draft not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDraftError'
        '502':
          description: On-chain registration failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDraftError'
        '503':
          description: Database or configuration not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDraftError'
components:
  schemas:
    LaunchAgentResponse:
      type: object
      properties:
        agentId:
          type: string
        txHash:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
        status:
          type: string
          enum:
            - pending
        redirectUrl:
          type: string
      required:
        - agentId
        - txHash
        - status
        - redirectUrl
    AgentDraftError:
      type: object
      properties:
        error:
          type: string
      required:
        - error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.