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

# Replace a module via direct URL

> Downloads a .tar.zst archive from the supplied direct URL and replaces the existing module installation. The stored registry source is cleared, making the module a direct-installed item. After a successful archive replacement every non-missing service targeting this adapter is regenerated via the new module's generateDefinition. Services that fail regeneration are marked stale and cannot be invoked until synced.



## OpenAPI

````yaml /cyrnel/openapi.json patch /modules/{moduleId}
openapi: 3.0.0
info:
  title: Cyrnel API
  description: >-
    Cyrnel is a universal layer that connects AI agents and LLM applications to
    any external service, API, or device regardless of protocol or standard. It
    acts as an adaptive bridge between your AI and the outside world, enabling
    seamless integrations through code execution, async operation handling, and
    built-in observability and security controls.
  version: 1.0.0
servers:
  - url: http://localhost:9371
security: []
paths:
  /modules/{moduleId}:
    patch:
      tags:
        - Modules
      summary: Replace a module via direct URL
      description: >-
        Downloads a .tar.zst archive from the supplied direct URL and replaces
        the existing module installation. The stored registry source is cleared,
        making the module a direct-installed item. After a successful archive
        replacement every non-missing service targeting this adapter is
        regenerated via the new module's generateDefinition. Services that fail
        regeneration are marked stale and cannot be invoked until synced.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: Module identifier.
          required: true
          description: Module identifier.
          name: moduleId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModulePatchRequest'
      responses:
        '200':
          description: Update result for the requested module.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModuleUpdateResponse'
        '400':
          description: The moduleId path parameter or request body was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: A bearer token was required but missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: The module could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '413':
          description: The downloaded archive exceeded the configured size limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: The module could not be updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '502':
          description: The archive file could not be downloaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ModulePatchRequest:
      type: object
      properties:
        url:
          type: string
          minLength: 1
          description: >-
            Direct URL of the new .tar.zst module archive to replace the
            existing installation.
      required:
        - url
      description: Request body used to replace a module via a direct download URL.
    ModuleUpdateResponse:
      type: object
      properties:
        updated:
          type: boolean
          description: Whether the module was updated (false if no change detected).
      required:
        - updated
      description: Response returned by the module update endpoint.
    ApiErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message returned by the API.
      required:
        - error
      description: Standard error envelope returned by the HTTP error middleware.

````