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

# Start run

> Begin execution of a created run. The agent will start making decisions and executing actions.



## OpenAPI

````yaml api-reference/openapi.json post /runs/{id}/invoke
openapi: 3.1.0
info:
  title: Ziet API
  description: >-
    Ziet is a serverless platform for AI agents and applications. Build
    intelligent agents with @Agent and @Action decorators, or serverless APIs
    with @Endpoint and Database. Deploy with a single command—no infrastructure
    to manage.
  license:
    name: MIT
  version: 0.1.0
servers:
  - url: https://api.ziet.ai/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Deployment
    description: Deploy code
  - name: Actions
    description: Discover actions
  - name: Agents
    description: Discover and configure agents
  - name: Endpoints
    description: Discover and invoke endpoints
  - name: Runs
    description: Execute agents
  - name: Memory
    description: Manage run memory
paths:
  /runs/{id}/invoke:
    post:
      tags:
        - Runs
      summary: Start run
      description: >-
        Begin execution of a created run. The agent will start making decisions
        and executing actions.
      operationId: invokeRun
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Run started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Run:
      type: object
      required:
        - id
        - agent_id
        - status
        - created_at
      properties:
        id:
          type: string
        agent_id:
          type: string
        status:
          type: string
          enum:
            - created
            - running
            - waiting_approval
            - completed
            - failed
            - cancelled
        input:
          type: object
          additionalProperties: true
        output:
          type: object
          additionalProperties: true
        max_steps:
          type: integer
        max_tokens:
          type: integer
        memory:
          $ref: '#/components/schemas/Memory'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/RunStep'
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
    Memory:
      type: object
      required:
        - id
      properties:
        id:
          type: string
        run_id:
          type: string
        created_at:
          type: string
          format: date-time
    RunStep:
      type: object
      required:
        - id
        - type
        - status
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - action
            - decision
            - approval
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
        action_id:
          type: string
        input:
          type: object
          additionalProperties: true
        output:
          type: object
          additionalProperties: true
        started_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Format: ''Api-Key sk_live_YOUR_KEY'''

````