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

# Execute Agent

> Execute an AI agent with input payload and stream results via SSE



## OpenAPI

````yaml /openapi.json post /v1/execute
openapi: 3.1.0
info:
  title: Charm Cloud Runner API
  description: AI Agent Execution Platform - DDD Architecture
  version: 2.0.0
servers: []
security: []
tags:
  - name: Execute
    description: Agent execution with SSE streaming
  - name: Agents
    description: Agent CRUD operations
  - name: Versions
    description: Version management
  - name: Runs
    description: Run lifecycle management
  - name: Threads
    description: Thread run history
  - name: Studio
    description: Studio dashboard analytics
  - name: Billing
    description: Payments and subscriptions
  - name: Daemons
    description: Long-running agent processes
  - name: Jobs
    description: Background jobs
  - name: Notifications
    description: User notifications
  - name: Users
    description: User management
  - name: Admin
    description: Admin dashboard
  - name: Internal
    description: Internal job triggers
paths:
  /v1/execute:
    post:
      tags:
        - Execute
      summary: Execute Agent
      description: Execute an AI agent with input payload and stream results via SSE
      operationId: execute_agent_v1_execute_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteRequest'
        required: true
      responses:
        '200':
          description: Server-Sent Events stream
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ExecuteRequest:
      properties:
        agent_id:
          type: string
          title: Agent Id
        version:
          type: string
          title: Version
        input_payload:
          additionalProperties: true
          type: object
          title: Input Payload
          default: {}
        env_vars:
          additionalProperties:
            type: string
          type: object
          title: Env Vars
          default: {}
        files:
          additionalProperties:
            type: string
          type: object
          title: Files
          default: {}
        history:
          items: {}
          type: array
          title: History
          default: []
        state_snapshot:
          type: string
          title: State Snapshot
          default: ''
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
        adapter_type:
          type: string
          title: Adapter Type
          default: python
        runtime_mode:
          type: string
          title: Runtime Mode
          default: standard
        lifecycle:
          type: string
          title: Lifecycle
          default: serverless
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        completion_callback_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Completion Callback Url
      type: object
      required:
        - agent_id
        - version
      title: ExecuteRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````