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

# Curate, publish, or unpublish a platform Fleet library entry

> Partial update. `description` and `required_credentials_reasons` are the two fields no bundle can supply, so they are operator-owned: a later bundle refetch never overwrites them. `published` moves the entry between `draft` (stored, invisible to every tenant) and `public` (live in every workspace gallery and installable). Publishing an entry whose bundle was never fetched is refused — a published entry always has something to install. Requires the `platform-library:write` scope. Send `If-Match` with the row's `etag` to reject stale edits before they can repoint the source or unpublish the entry. Omitting the header preserves last-write-wins behavior.



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json patch /v1/admin/fleet-libraries/{id}
openapi: 3.1.0
info:
  title: agentsfleet Control Plane API
  version: 1.0.0
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
servers:
  - url: https://api.agentsfleet.net
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Health
    description: System status and readiness probes
    x-mintlify:
      navigation: Health
  - name: Authentication
    description: Command Line Interface (CLI) sign-in sessions and GitHub sign-in
    x-mintlify:
      navigation: Authentication
  - name: Workspaces
    description: Create and manage workspaces
    x-mintlify:
      navigation: Workspaces
  - name: Tenant
    description: Manage tenant provider settings and models
    x-mintlify:
      navigation: Tenant
  - name: auth-identity-events
    description: >-
      Process signed account events from Clerk. This route is not for customer
      fleets.
    x-mintlify:
      navigation: Auth Identity Events
  - name: Fleets
    description: Create, configure, and run fleets
    x-mintlify:
      navigation: Fleets
  - name: Schedules
    description: Manage and receive scheduled Fleet events
    x-mintlify:
      navigation: Schedules
  - name: Memory
    description: Read and search saved fleet memory
    x-mintlify:
      navigation: Memory
  - name: Secrets
    description: Manage named secrets for fleets in a workspace
    x-mintlify:
      navigation: Secrets
  - name: Admin
    description: Manage shared provider keys and models
    x-mintlify:
      navigation: Admin
  - name: Billing
    description: Read tenant balances and charge records
    x-mintlify:
      navigation: Billing
  - name: Integration Grants
    description: Manage fleet access to third-party services
    x-mintlify:
      navigation: Integration Grants
  - name: Connectors
    description: Connect workspaces to third-party providers
    x-mintlify:
      navigation: Connectors
  - name: Fleet Keys
    description: Manage keys that let external clients call a fleet
    x-mintlify:
      navigation: Fleet Keys
  - name: API Keys
    description: Manage tenant admin API keys
    x-mintlify:
      navigation: API Keys
  - name: Webhooks
    description: Receive signed events and approval decisions
    x-mintlify:
      navigation: Webhooks
  - name: Approvals
    description: List, inspect, and resolve pending approvals
    x-mintlify:
      navigation: Approvals
  - name: Fleet
    description: Enroll and manage runners
    x-mintlify:
      navigation: Fleet
  - name: Fleet Bundles
    description: Manage fleet source bundles in a workspace
    x-mintlify:
      navigation: Fleet Bundles
  - name: Fleet library
    description: Browse and add reusable fleet sources
    x-mintlify:
      navigation: Fleet library
  - name: Model Library
    description: List models available to the tenant
    x-mintlify:
      navigation: Model Library
paths:
  /v1/admin/fleet-libraries/{id}:
    patch:
      tags:
        - Fleet library
      summary: Curate, publish, or unpublish a platform Fleet library entry
      description: >-
        Partial update. `description` and `required_credentials_reasons` are the
        two fields no bundle can supply, so they are operator-owned: a later
        bundle refetch never overwrites them. `published` moves the entry
        between `draft` (stored, invisible to every tenant) and `public` (live
        in every workspace gallery and installable). Publishing an entry whose
        bundle was never fetched is refused — a published entry always has
        something to install. Requires the `platform-library:write` scope. Send
        `If-Match` with the row's `etag` to reject stale edits before they can
        repoint the source or unpublish the entry. Omitting the header preserves
        last-write-wins behavior.
      operationId: update_platform_fleet_library
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The catalog id — the bundle's SKILL.md frontmatter name (a slug, not
            a UUID).
          schema:
            type: string
        - name: If-Match
          in: header
          required: false
          description: >-
            Optional catalog row version from the list response. Stale values
            return 412 with the current `etag`.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FleetLibraryCatalogPatch'
      responses:
        '200':
          description: The entry as it now stands.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FleetLibraryCatalogEntry'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
          description: >-
            Publish was requested for an entry with no bundle; fetch it from the
            repository first (`UZ-CATALOG-002`).
        '412':
          $ref: '#/components/responses/Error'
          description: >-
            The `If-Match` value is stale. The problem body carries the current
            `etag` (`UZ-CATALOG-005`).
        '503':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    FleetLibraryCatalogPatch:
      type: object
      description: >-
        Partial update of a catalog entry. Every field is optional, and an
        absent field is left untouched. Editing the description never blanks the
        credential copy, and the entry id is never patchable.


        A `source_repo` or `source_ref` that differs from the stored value
        discards the stored bundle and returns the entry to draft, atomically.
        The bundle was built from the old source, so an entry never advertises a
        source it is not serving. Re-sending the stored value is a no-op.
      properties:
        name:
          type: string
          maxLength: 200
          description: Display name. Operator-owned — survives bundle refetches.
        source_repo:
          type: string
          maxLength: 512
          description: '`owner/repo`. Validated with the same rules as onboarding.'
        source_ref:
          type: string
          maxLength: 100
          description: Branch or tag the next fetch should use.
        description:
          type: string
        required_credentials_reasons:
          type: object
          additionalProperties:
            type: string
        published:
          type: boolean
          description: >-
            true publishes the entry (requires a bundle); false withdraws it
            back to draft, which removes it from every gallery and blocks new
            installs. Workspaces already running the fleet are unaffected.
    FleetLibraryCatalogEntry:
      type: object
      description: >-
        One row of the platform Fleet library catalog, as the operator sees it.
        Metadata only — never bundle markdown, a support-file body, or an
        object-store key.
      required:
        - id
        - name
        - description
        - source_repo
        - source_ref
        - visibility
        - content_hash
        - requirements
        - required_credentials_reasons
        - etag
        - updated_at
      properties:
        id:
          type: string
          description: The catalog id — the bundle's SKILL.md frontmatter name.
        name:
          type: string
        description:
          type: string
          description: >-
            Operator-owned after the entry is created. Seeded from the bundle on
            the first fetch; a later refetch never overwrites it.
        source_repo:
          type: string
          description: The GitHub repository the bundle was fetched from, as `owner/repo`.
        source_ref:
          type: string
          description: The git ref the bundle was fetched at.
        visibility:
          type: string
          enum:
            - draft
            - public
          description: >-
            The publish lifecycle. `draft` — the bundle is stored and the fleet
            is invisible to every tenant. `public` — live in every workspace
            gallery and installable.
        content_hash:
          type: string
          nullable: true
          description: >-
            The content hash of the stored bundle, or null when no bundle has
            ever been fetched for this entry. A null hash can never be
            published.
        requirements:
          $ref: '#/components/schemas/FleetBundleRequirements'
        required_credentials_reasons:
          type: object
          additionalProperties:
            type: string
          description: >-
            Per-credential "why this fleet needs it" copy, keyed by credential
            name, shown at the install gate. Operator-owned: the importer cannot
            derive it, and a bundle refetch never overwrites it.
        etag:
          type: string
          description: >-
            Optimistic-concurrency tag over the operator-editable catalog row
            fields. Send it as `If-Match` on PATCH to prevent stale overwrites.
        updated_at:
          type: integer
          format: int64
          description: Milliseconds since the Unix epoch.
    FleetBundleRequirements:
      type: object
      required:
        - credentials
        - tools
        - network_hosts
        - trigger_present
      properties:
        credentials:
          type: array
          items:
            type: string
        tools:
          type: array
          items:
            type: string
        network_hosts:
          type: array
          items:
            type: string
        trigger_present:
          type: boolean
    ErrorBody:
      type: object
      description: RFC 7807 problem detail error response (application/problem+json)
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        docs_uri:
          type: string
          format: uri
          description: Stable link to documentation for this error code
          example: https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009
        title:
          type: string
          description: Short human-readable label, same for every occurrence of this code
          example: Fleet not found
        detail:
          type: string
          description: Instance-specific context describing what went wrong
          example: No fleet with id 'abc123' in this workspace.
        error_code:
          type: string
          description: Machine-readable error code
          example: UZ-AGT-009
        request_id:
          type: string
          description: Correlation ID for this request
        current_state:
          type: string
          description: >-
            Resource state that blocked the requested change. Present only on
            409 responses.
          example: paused
        user_message:
          type: string
          description: >
            Plain message safe to show to a user. Present only when an error
            defines one.


            Use `detail` or `title` when this field is absent.
          example: >-
            We couldn't find that Fleet. It may have been deleted, or the ID
            doesn't match one in this workspace.
        etag:
          type: string
          description: >-
            Resource version returned on 412 responses so the caller can refetch
            and retry.
  responses:
    Error:
      description: RFC 7807 problem detail error response
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub
        OAuth

````