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

# Migrate Agent Sandbox

> Recreate the Hermes pod with/without gVisor; preserves PVC (no full reprovision).



## OpenAPI

````yaml /openapi.json post /api/v1/agents/{agent_id}/migrate-sandbox
openapi: 3.1.0
info:
  title: SeaOtter API
  description: >-
    SeaOtter control plane API — managed Hermes Agent hosting. Authenticate with
    a Clerk session JWT (web) or an org-scoped API key (`Authorization: Bearer
    so_…` from POST /api/v1/api-keys). Public developer docs:
    https://docs.seaotter.dev
  version: 1.0.0
servers:
  - url: https://api.seaotter.dev
    description: Production
  - url: https://seaotter-api-bpenevambq-uc.a.run.app
    description: Production (Cloud Run URL)
  - url: http://localhost:8000
    description: Local development
security: []
tags:
  - name: agents
    description: Provision and operate Hermes agents
  - name: billing
    description: Stripe plans and subscriptions
  - name: users
    description: Current user and control-plane API keys
  - name: organizations
    description: Active organization context
  - name: audit
    description: Organization audit log (Enterprise)
  - name: health
    description: Liveness probes
paths:
  /api/v1/agents/{agent_id}/migrate-sandbox:
    post:
      tags:
        - agents
      summary: Migrate Agent Sandbox
      description: >-
        Recreate the Hermes pod with/without gVisor; preserves PVC (no full
        reprovision).
      operationId: migrate_agent_sandbox_api_v1_agents__agent_id__migrate_sandbox_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MigrateSandboxBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    MigrateSandboxBody:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: true
      type: object
      title: MigrateSandboxBody
      description: >-
        Enable or disable gVisor RuntimeClass on an existing tenant (preserves
        PVC).
    AgentOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Agent UUID
        name:
          type: string
          title: Name
        status:
          $ref: '#/components/schemas/AgentStatus'
          description: >-
            pending | provisioning | running | paused | stopped | error |
            deleting
        namespace:
          type: string
          title: Namespace
          description: Kubernetes namespace (agent-{id})
        resource_plan:
          $ref: '#/components/schemas/ResourcePlan'
        env_vars:
          additionalProperties: true
          type: object
          title: Env Vars
        config:
          anyOf:
            - $ref: '#/components/schemas/AgentConfigPublic'
            - additionalProperties: true
              type: object
          title: Config
          description: Public agent config including provisioning_stages (secrets redacted)
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        dashboard_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Url
          examples:
            - https://my-hermes-abcd1234.agents.seaotter.dev
        api_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Url
        dashboard_handoff_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Handoff Url
        dashboard_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Username
        hostname:
          anyOf:
            - type: string
            - type: 'null'
          title: Hostname
      type: object
      required:
        - id
        - name
        - status
        - namespace
        - resource_plan
        - config
        - created_at
        - updated_at
      title: AgentOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentStatus:
      type: string
      enum:
        - pending
        - provisioning
        - running
        - paused
        - stopped
        - error
        - deleting
      title: AgentStatus
    ResourcePlan:
      type: string
      enum:
        - starter
        - pro
        - enterprise
      title: ResourcePlan
    AgentConfigPublic:
      properties:
        provisioning_stages:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/ProvisioningStage'
              type: object
            - type: 'null'
          title: Provisioning Stages
          description: >-
            Ordered readiness gates: namespace_created → helm_installed →
            pod_ready → sandbox_verified → dns_resolvable → tls_valid →
            wizard_reachable
        sandbox:
          anyOf:
            - type: string
            - type: 'null'
          title: Sandbox
          description: 'Runtime sandbox: gvisor | none (legacy tenants may omit)'
          examples:
            - gvisor
        dashboard_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Url
        api_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Url
        hostname:
          anyOf:
            - type: string
            - type: 'null'
          title: Hostname
        dashboard_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Username
      additionalProperties: true
      type: object
      title: AgentConfigPublic
      description: >-
        Documented subset of ``agent.config`` returned on AgentOut (extra keys
        allowed).
    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
    ProvisioningStage:
      properties:
        status:
          $ref: '#/components/schemas/StageStatus'
          description: pending | waiting | ok | error | skipped
          examples:
            - ok
        ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ms
          description: Elapsed milliseconds for this stage when known
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: Operator-facing detail (events, host, error)
        host:
          anyOf:
            - type: string
            - type: 'null'
          title: Host
          description: Hostname probed for DNS/TLS/HTTP stages
      type: object
      required:
        - status
      title: ProvisioningStage
      description: One readiness gate while an agent provisions or restores.
    StageStatus:
      type: string
      enum:
        - pending
        - waiting
        - ok
        - error
        - skipped
      title: StageStatus
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT or so_ API key
      description: >-
        Clerk session JWT for the web app, or a control-plane API key (`so_…`)
        from POST /api/v1/api-keys for programmatic / docs try-it use.

````