> ## 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.

# List runs

> Get all agent runs with optional filtering.



## OpenAPI

````yaml api-reference/openapi.json get /runs
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:
    get:
      tags:
        - Runs
      summary: List runs
      description: Get all agent runs with optional filtering.
      operationId: listRuns
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
        - name: agent_id
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
              - created
              - running
              - waiting_approval
              - completed
              - failed
              - cancelled
      responses:
        '200':
          description: List of runs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Run'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    Offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
        default: 0
  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
    Pagination:
      type: object
      properties:
        total:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        has_more:
          type: boolean
    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:
    Unauthorized:
      description: Invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Format: ''Api-Key sk_live_YOUR_KEY'''

````