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

# Trigger an agent run

> Initiates a new run for the specified AI agent within its configured service line.



## OpenAPI

````yaml POST /agents/{agent_id}/runs
openapi: 3.1.0
info:
  title: Scrums.com API
  version: 1.0.0
  description: >-
    The Scrums.com Software Engineering Orchestration Platform (SEOP) REST API.
    Every capability — talent, managed delivery, ODS, infrastructure,
    intelligence, and agents — operates through a Service Line (LIN-*). Base
    URL: https://api.scrums.com/v1
servers:
  - url: https://api.scrums.com/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Service Lines
    description: Manage SEOP Service Lines (LIN-*) across all product types.
  - name: Organizations
    description: Top-level account containers (ORG-*).
  - name: Workspaces
    description: Team workspaces nested within an organization (WS-*).
  - name: AI Agent Gateway
    description: Trigger and monitor AI agent runs (AGT-*, RUN-*).
  - name: Observability & Metrics
    description: Health scores, risk signals, and delivery metrics.
  - name: ODS
    description: On-Demand Solutions scoping and request management.
  - name: Talent Marketplace
    description: Submit and manage vetted talent placement requests.
paths:
  /agents/{agent_id}/runs:
    post:
      tags:
        - AI Agent Gateway
      summary: Trigger an agent run
      description: >-
        Initiates a new run for the specified AI agent within its configured
        service line.
      operationId: createAgentRun
      parameters:
        - name: agent_id
          in: path
          required: true
          description: The unique identifier of the agent (e.g. AGT-26-000012).
          schema:
            type: string
            pattern: ^AGT-
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRunInput'
            example:
              input:
                prompt: Summarise sprint velocity for Q1 2026.
              triggered_by: USR-26-000044
      responses:
        '200':
          description: The newly created agent run.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AgentRun'
              example:
                data:
                  id: RUN-26-001812
                  agent_id: AGT-26-000012
                  service_line_id: LIN-26-091844
                  status: running
                  input:
                    prompt: Summarise sprint velocity for Q1 2026.
                  output: null
                  tokens_used: null
                  duration_ms: null
                  triggered_by: USR-26-000044
                  started_at: '2026-04-15T10:22:00Z'
                  completed_at: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    AgentRunInput:
      type: object
      required:
        - input
        - triggered_by
      properties:
        input:
          type: object
          example:
            prompt: Summarise sprint velocity for Q1 2026.
        triggered_by:
          type: string
          pattern: ^USR-
          example: USR-26-000044
    AgentRun:
      type: object
      properties:
        id:
          type: string
          pattern: ^RUN-
          example: RUN-26-001812
        agent_id:
          type: string
          pattern: ^AGT-
          example: AGT-26-000012
        service_line_id:
          type: string
          example: LIN-26-091844
        status:
          type: string
          enum:
            - pending
            - running
            - awaiting_approval
            - completed
            - failed
            - cancelled
          example: running
        input:
          type: object
          example:
            prompt: Summarise sprint velocity for Q1 2026.
        output:
          type: object
          nullable: true
          example: null
        tokens_used:
          type: integer
          nullable: true
          example: null
        duration_ms:
          type: integer
          nullable: true
          example: null
        triggered_by:
          type: string
          example: USR-26-000044
        started_at:
          type: string
          format: date-time
          example: '2026-04-15T10:22:00Z'
        completed_at:
          type: string
          format: date-time
          nullable: true
          example: null
    Error:
      type: object
      required:
        - code
        - message
        - status
      properties:
        code:
          type: string
          example: not_found
        message:
          type: string
          example: The requested resource was not found.
        status:
          type: integer
          example: 404
  responses:
    BadRequest:
      description: The request was malformed or contained invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: invalid_request
            message: workspace_id is required.
            status: 400
    Unauthorized:
      description: Missing or invalid authentication token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: unauthorized
            message: Bearer token is missing or expired.
            status: 401
    Forbidden:
      description: >-
        The authenticated principal does not have permission to perform this
        action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: forbidden
            message: You do not have access to this resource.
            status: 403
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: not_found
            message: The requested resource was not found.
            status: 404
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````