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

# Create agent



## OpenAPI

````yaml /api-reference/ageneral-agents-openapi.json post /v1/agents
openapi: 3.1.0
info:
  title: Agents
  version: 1.0.0
  description: >-
    Create and manage **agents**, enable **connectors**, manage **secrets**,
    poll **long-running operations**, and call selected **OpenClaw** helpers.


    **Base URL:** `https://ageneral.ai`.


    **JSON** request and response bodies use **camelCase** field names (protobuf
    JSON mapping).


    **Authentication:** `Authorization: Bearer <session JWT>` from Ageneral
    sign-in unless a route notes otherwise.


    **CreateAgent** returns a standard **`google.longrunning.Operation`**. Poll
    it with **Get operation** until **`done`** is true, then read **`response`**
    for the created **Agent**.
  contact:
    name: Ageneral
    url: https://ageneral.ai
servers:
  - url: https://ageneral.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Agent CRUD and listing.
  - name: Agent connectors
    description: Enable or disable catalog connectors for an agent.
  - name: Agent secrets
    description: List, put, and delete secret names for an agent.
  - name: Operations
    description: Poll long-running operations (for example after CreateAgent).
  - name: OpenClaw
    description: Agent-scoped OpenClaw helpers served over HTTPS.
paths:
  /v1/agents:
    post:
      tags:
        - Agents
      summary: Create agent
      operationId: createAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentRequest'
      responses:
        '200':
          description: >-
            Long-running operation (often completes immediately with **`done:
            true`**).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
        '401':
          description: Missing or invalid session.
        '403':
          description: Forbidden.
      security:
        - bearerAuth: []
components:
  schemas:
    CreateAgentRequest:
      type: object
      required:
        - projectId
      properties:
        projectId:
          type: string
        name:
          type: string
        guest:
          type: string
        runtimeProvider:
          type: string
        guestRuntimeProfile:
          type: string
          description: >-
            Catalog workload key (for example **`openclaw`**) resolved to a
            pinned fc-guest image.
        firecracker:
          $ref: '#/components/schemas/FirecrackerRuntime'
      additionalProperties: true
    Operation:
      type: object
      description: Subset of **`google.longrunning.Operation`**.
      properties:
        name:
          type: string
        done:
          type: boolean
        metadata:
          type: object
          additionalProperties: true
        response:
          type: object
          additionalProperties: true
        error:
          type: object
          additionalProperties: true
      additionalProperties: true
    FirecrackerRuntime:
      type: object
      description: Optional per-agent Firecracker overrides.
      properties:
        vcpu:
          type: integer
          format: int32
        memMib:
          type: integer
          format: int32
        runtimeDataSize:
          type: string
          description: Sparse disk size string, for example **`2G`**.
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Session JWT from Ageneral sign-in. Send as `Authorization: Bearer
        <token>`.

````