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

# Public Import Agent



## OpenAPI

````yaml post /v1/agents/import
openapi: 3.1.0
info:
  title: Noxus Backend
  description: >-
    Backend API for the Noxus Platform. More information can be found at
    https://docs.noxus.ai
  version: 1.1.0
servers: []
security: []
paths:
  /v1/agents/import:
    post:
      tags:
        - V1 - Agents (Co-workers)
      summary: Public Import Agent
      operationId: public_import_agent
      parameters:
        - name: mode
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ImportMode'
            default: clone
        - name: activate
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Activate
        - name: on_missing_dependency
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/MissingDependencyPolicy'
            default: fail
        - name: dry_run
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Dry Run
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportAgentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExportableReference'
                title: Response Public Import Agent
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ImportMode:
      type: string
      enum:
        - version
        - clone
        - replace
      title: ImportMode
      description: |-
        Operator control over how a bundle's artifacts land in the target.

        - ``version``: keep the bundle's IDs. If the artifact already exists in
          the target workspace, append a new version row (Workflow/Assistant)
          or refuse with NOT_VERSIONABLE (KB/Inbox — use ``replace``). If not,
          create with the bundle's id. Lineage history is appended on every
          successful artifact write.
        - ``clone``: today's default — fresh UUIDs everywhere, no history.
        - ``replace``: keep IDs, overwrite the active definition in place. No
          version row. Lineage history is appended.
    MissingDependencyPolicy:
      type: string
      enum:
        - fail
        - warn
      title: MissingDependencyPolicy
    ImportAgentRequest:
      properties:
        definition:
          type: string
          maxLength: 104857600
          title: Definition
        version:
          $ref: '#/components/schemas/ExportFormat'
          description: >-
            Payload format. `auto` (default) detects it from the content; `v3` /
            `v4` force the base64 / YAML parse path.
          default: auto
      type: object
      required:
        - definition
      title: ImportAgentRequest
    ExportableReference:
      properties:
        reference:
          type: string
          title: Reference
        type:
          type: string
          enum:
            - kb
            - workflow
            - assistant
            - file
            - inbox
            - connection
            - secret
            - deployment
          title: Type
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
      type: object
      required:
        - reference
        - type
      title: ExportableReference
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExportFormat:
      type: string
      enum:
        - auto
        - v3
        - v4
      title: ExportFormat
      description: >-
        Wire format for an export/import payload.


        - ``auto`` (default both directions): export emits the default format
          (currently ``v3`` base64, for back-compat with existing pipelines); import
          detects the format from the payload content.
        - ``v4``: plaintext multi-doc YAML (`.nx`) — opt-in, requested on
        purpose.

        - ``v3``: legacy base64-encoded bundle.
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````