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

# Create Provider Build



## OpenAPI

````yaml /development/api-reference/openapi.json post /api/v1/provider_builds
openapi: 3.1.0
info:
  title: Agentstack server
  version: 0.6.3
servers: []
security: []
paths:
  /api/v1/provider_builds:
    post:
      tags:
        - provider_builds
      summary: Create Provider Build
      operationId: create_provider_build_api_v1_provider_builds_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProviderBuildRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderBuild'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    CreateProviderBuildRequest:
      properties:
        location:
          $ref: '#/components/schemas/GithubUrl'
        on_complete:
          $ref: '#/components/schemas/OnCompleteAction'
        build_configuration:
          anyOf:
            - $ref: '#/components/schemas/BuildConfiguration'
            - type: 'null'
      type: object
      required:
        - location
      title: CreateProviderBuildRequest
    ProviderBuild:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/BuildState'
        source:
          $ref: '#/components/schemas/ResolvedGithubUrl'
        destination:
          $ref: '#/components/schemas/DockerImageID'
        build_configuration:
          anyOf:
            - $ref: '#/components/schemas/BuildConfiguration'
            - type: 'null'
        provider_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Provider Id
          description: ID of the provider added or modified by this build
        created_by:
          type: string
          format: uuid
          title: Created By
        on_complete:
          $ref: '#/components/schemas/OnCompleteAction'
          default:
            type: no_action
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        provider_origin:
          type: string
          title: Provider Origin
          readOnly: true
      type: object
      required:
        - status
        - source
        - destination
        - created_by
        - provider_origin
      title: ProviderBuild
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GithubUrl:
      type: string
      title: GithubUrl
    OnCompleteAction:
      anyOf:
        - $ref: '#/components/schemas/AddProvider'
        - $ref: '#/components/schemas/UpdateProvider'
        - $ref: '#/components/schemas/NoAction'
    BuildConfiguration:
      properties:
        dockerfile_path:
          anyOf:
            - type: string
              format: path
            - type: 'null'
          title: Dockerfile Path
          description: >-
            Path to Dockerfile relative to the repository path
            (provider_build.source.path or repository root if not defined)
      type: object
      title: BuildConfiguration
    BuildState:
      type: string
      enum:
        - missing
        - in_progress
        - build_completed
        - completed
        - failed
      title: BuildState
    ResolvedGithubUrl:
      properties:
        host:
          type: string
          title: Host
          default: github.com
        org:
          type: string
          title: Org
        repo:
          type: string
          title: Repo
        version:
          type: string
          title: Version
        version_type:
          $ref: '#/components/schemas/GithubVersionType'
        commit_hash:
          type: string
          title: Commit Hash
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
      type: object
      required:
        - org
        - repo
        - version
        - version_type
        - commit_hash
      title: ResolvedGithubUrl
    DockerImageID:
      type: string
      title: DockerImageID
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AddProvider:
      properties:
        type:
          type: string
          const: add_provider
          title: Type
          default: add_provider
        auto_stop_timeout_sec:
          anyOf:
            - type: integer
              maximum: 600
              exclusiveMinimum: 0
            - type: 'null'
          title: Auto Stop Timeout Sec
          description: >-
            Timeout after which the agent provider will be automatically
            downscaled if unused.Contact administrator if you need to increase
            this value.
        variables:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Variables
      type: object
      title: AddProvider
      description: >-
        Will add a new provider or update an existing one with the same base
        docker image ID

        (docker registry + repository, excluding tag)
    UpdateProvider:
      properties:
        type:
          type: string
          const: update_provider
          title: Type
          default: update_provider
        provider_id:
          type: string
          format: uuid
          title: Provider Id
      type: object
      required:
        - provider_id
      title: UpdateProvider
      description: Will update provider specified by ID
    NoAction:
      properties:
        type:
          type: string
          const: no_action
          title: Type
          default: no_action
      type: object
      title: NoAction
    GithubVersionType:
      type: string
      enum:
        - head
        - tag
      title: GithubVersionType
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic
    HTTPBearer:
      type: http
      scheme: bearer

````