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

# Create a skill from a document

> Creates a skill from a SKILL.md document and returns it. The document's frontmatter supplies the skill's name and description, which are validated against the Agent Skills standard: the name must be lowercase letters, digits, and single hyphens, and a description is required because it is the only signal the model has when deciding whether to use the skill. To create one from a zipped directory instead, use managedAgentsPublishSkillBundle. Do not automatically retry an ambiguous transport failure: list skills first, because this operation does not replay a prior response and another submission can create another skill.



## OpenAPI

````yaml /managed-agents/openapi.yaml post /managed-agents/v1/skills
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.14.0
  description: >-
    The Recursion Managed Agents REST API. Authenticate with a Recursion API key
    as a bearer token. An organization-scoped key acts in its own organization
    and needs nothing else; a tenant-scoped key must also send
    `x-organization-id` with an organization id or `default`. Field names follow
    each operation's published schema.
servers:
  - url: https://api.recursion.labelbox.com
security:
  - bearerAuth: []
paths:
  /managed-agents/v1/skills:
    post:
      tags:
        - Skills
      summary: Create a skill from a document
      description: >-
        Creates a skill from a SKILL.md document and returns it. The document's
        frontmatter supplies the skill's name and description, which are
        validated against the Agent Skills standard: the name must be lowercase
        letters, digits, and single hyphens, and a description is required
        because it is the only signal the model has when deciding whether to use
        the skill. To create one from a zipped directory instead, use
        managedAgentsPublishSkillBundle. Do not automatically retry an ambiguous
        transport failure: list skills first, because this operation does not
        replay a prior response and another submission can create another skill.
      operationId: managedAgentsCreateSkill
      parameters:
        - $ref: '#/components/parameters/RecursionTenantId'
        - $ref: '#/components/parameters/RecursionOrganizationId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SkillRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Skill'
          description: >-
            A reusable procedure an agent loads when it judges the procedure
            relevant. Its name and description are disclosed in every turn; the
            instructions enter the conversation only when the agent activates
            it. Updating a skill mints a new immutable SkillVersion.
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidJson'
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                discriminator:
                  propertyName: code
                  mapping:
                    invalid_json:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidJson'
                    invalid_request:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                x-recursion-error-codes:
                  - invalid_json
                  - invalid_request
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnauthorized'
                x-recursion-error-codes:
                  - unauthorized
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
                x-recursion-error-codes:
                  - forbidden
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorNotFound'
                x-recursion-error-codes:
                  - not_found
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorConflict'
                x-recursion-error-codes:
                  - conflict
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '413':
          description: Payload Too Large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorPayloadTooLarge'
                x-recursion-error-codes:
                  - payload_too_large
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '415':
          description: Unsupported Media Type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnsupportedMediaType'
                x-recursion-error-codes:
                  - unsupported_media_type
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '429':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: Too Many Requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorRateLimitExceeded'
                x-recursion-error-codes:
                  - rate_limit_exceeded
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                x-recursion-error-codes:
                  - internal_error
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '502':
          description: A dependent service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyFailure'
                x-recursion-error-codes:
                  - bad_gateway
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '503':
          description: Service Unavailable.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorSkillStorageUnconfigured
                discriminator:
                  propertyName: code
                  mapping:
                    managed_agents_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                    service_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                    skill_storage_unconfigured:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorSkillStorageUnconfigured
                x-recursion-error-codes:
                  - managed_agents_unavailable
                  - service_unavailable
                  - skill_storage_unconfigured
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '504':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: A dependent service timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyTimeout'
                x-recursion-error-codes:
                  - gateway_timeout
components:
  parameters:
    RecursionTenantId:
      name: x-tenant-id
      in: header
      required: false
      description: >-
        Optional tenant consistency check. When present, it must name the tenant
        bound to the API key, including when x-organization-id is `default`.
      schema:
        type: string
        minLength: 1
    RecursionOrganizationId:
      name: x-organization-id
      in: header
      required: false
      description: >-
        Organization in which to act. Required for a tenant-scoped API key.
        Optional for an organization-scoped key, where it must name that same
        organization. The value may be an organization id or `default`.
      schema:
        type: string
        minLength: 1
  schemas:
    SkillRequest:
      description: >-
        Request body for creating or updating a skill. The document is the
        source of truth: the skill's name and description come from its
        frontmatter. Publishing a new version of an existing skill goes through
        managedAgentsCreateSkillVersion, which mints one rather than editing the
        last.
      properties:
        display_title:
          description: Human-readable title for listings. Defaults to the frontmatter name.
          type: string
        document:
          description: >-
            The complete SKILL.md: YAML frontmatter delimited by --- on the very
            first line, then Markdown instructions. name and description are
            required in the frontmatter and are read from it.
          type: string
        manifest:
          description: >-
            Relative paths of files bundled with the skill, listed to the model
            when it activates the skill. Paths must stay inside the skill
            directory.
          items:
            type: string
          type: array
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          description: >-
            Caller-owned key/value data stored with the skill and returned
            unchanged.
          type: object
        skill_group_id:
          description: >-
            Catalog group to file this skill under. Send an empty string to
            remove it from its group; omit to leave the group unchanged.
            Grouping is for browsing and bulk attachment only and is never
            disclosed to the model.
          type:
            - 'null'
            - string
      required:
        - document
      type: object
      additionalProperties: false
    Skill:
      description: >-
        A reusable procedure an agent loads when it judges the procedure
        relevant. Its name and description are disclosed in every turn; the
        instructions enter the conversation only when the agent activates it.
        Updating a skill mints a new immutable SkillVersion.
      properties:
        created_at:
          description: Server-assigned RFC 3339 timestamp of when the skill was created.
          format: date-time
          type: string
        description:
          description: >-
            When to use this skill. Disclosed to the model in every turn, so it
            is the whole routing signal: write it as the condition under which
            the skill applies.
          type: string
        display_title:
          description: >-
            Human-readable title shown wherever skills are listed. Defaults to
            the name.
          type: string
        latest_instruction_chars:
          description: >-
            Length in characters of the newest version's instructions, the body
            disclosed to the model when it activates the skill. Zero for a skill
            with no version yet. Instructions are truncated at 64000 characters
            when a session assembles them.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        latest_skill_version_id:
          description: >-
            Server-maintained id of the newest version of this skill; agents
            that attach it without pinning a version use this one.
          type: string
        latest_version_number:
          description: >-
            How many versions this skill has, which is also the number of the
            newest one, since versions are numbered from 1 in creation order.
            Zero for a skill with no version yet.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          description: >-
            Caller-owned key/value data stored with the skill and returned
            unchanged.
          type: object
        name:
          description: >-
            The skill's addressable name, lowercase with single hyphens, e.g.
            cut-release. This is what an agent passes to the activation tool.
          type: string
        organization_id:
          description: >-
            Organization that owns the skill. Server-assigned from the caller's
            credentials; a value sent in a request body is ignored.
          type: string
        skill_group_id:
          description: >-
            Catalog group this skill is filed under, if any. Grouping is for
            browsing and for attaching a set of skills to an agent in one entry;
            it is never disclosed to the model and does not scope the skill's
            name.
          type: string
        skill_id:
          description: >-
            Server-assigned id of the skill, used in the skill and skill-version
            routes.
          type: string
        source:
          description: >-
            Where the skill came from: platform, organization, or repository.
            Decides which skill wins a name collision, most specific first.
          type: string
        updated_at:
          description: >-
            Server-assigned RFC 3339 timestamp of the most recent update to the
            skill.
          format: date-time
          type: string
      required:
        - organization_id
        - skill_id
        - name
        - description
        - source
        - created_at
        - updated_at
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorInvalidJson:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_json
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInvalidRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_request
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unauthorized
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorForbidden:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - forbidden
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorNotFound:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - not_found
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorConflict:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - conflict
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorPayloadTooLarge:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - payload_too_large
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnsupportedMediaType:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unsupported_media_type
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorRateLimitExceeded:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - rate_limit_exceeded
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInternalError:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - internal_error
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyFailure:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - bad_gateway
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorManagedAgentsUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - managed_agents_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorServiceUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - service_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorSkillStorageUnconfigured:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - skill_storage_unconfigured
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyTimeout:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - gateway_timeout
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    PlatformSafeJsonValue:
      description: >-
        A JSON value whose integer members stay within the exact ECMAScript
        safe-integer range at every nesting level.
      oneOf:
        - type: 'null'
        - type: boolean
        - type: string
        - type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        - type: number
          not:
            type: integer
        - type: array
          items:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
        - additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
    ManagedAgentsApiErrorDetails:
      type: object
      properties:
        field:
          description: >-
            Request field or header responsible for the error, when one can be
            identified.
          type: string
        issues:
          description: >-
            Boundary-validation failures as path-prefixed human-readable
            messages.
          type: array
          items:
            type: string
        requestId:
          description: Request correlation identifier for support and log lookup.
          type: string
        retryable:
          description: >-
            Server advice about failure transience. `true` means transient,
            `false` means non-transient, and absence gives no advice. Automatic
            replay is allowed only when this field is not `false` and the
            operation-specific retry and idempotency contract permits replay.
          type: boolean
      additionalProperties:
        $ref: '#/components/schemas/PlatformSafeJsonValue'
      description: >-
        Optional structured error details. Reserved transport fields are typed;
        code-specific fields remain forward compatible.
  headers:
    RecursionOrganizationId:
      description: Organization id resolved for this request.
      schema:
        type: string
        minLength: 1
    RecursionTenantId:
      description: Tenant id resolved for this request.
      schema:
        type: string
        minLength: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````