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

# Run playbook



## OpenAPI

````yaml /agent-openapi.json post /api/v1/templates/{name}/run
openapi: 3.1.0
info:
  title: Polpo API
  version: 1.0.0
  description: >-
    REST API for Polpo — an AI agent that manages teams of AI coding agents.
    Manage tasks, missions, agents, playbooks, skills, and approvals. For
    conversational interaction, use the OpenAI-compatible POST
    /v1/chat/completions endpoint.
servers:
  - url: http://localhost:3890
    description: Local development
security:
  - bearerAuth: []
paths:
  /api/v1/templates/{name}/run:
    post:
      tags:
        - Playbooks
      summary: Run playbook
      parameters:
        - schema:
            type: string
          required: true
          name: name
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                params:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
      responses:
        '201':
          description: Playbook executed
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  data:
                    type: object
                    properties:
                      mission:
                        nullable: true
                      tasks:
                        type: number
                      group:
                        type: string
                      warnings:
                        type: array
                        items:
                          type: string
                    required:
                      - tasks
                      - group
                required:
                  - ok
                  - data
        '400':
          description: Parameter validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  details:
                    nullable: true
                required:
                  - ok
                  - error
                  - code
        '404':
          description: Playbook not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - ok
                  - error
                  - code
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key passed as a Bearer token. Configure via the apiKeys field in
        polpo.json or the POLPO_API_KEY environment variable.

````