Skip to content

[Epic] Replace onboarding inputs with one declarative configuration #10904

Closed as not planned
6 of 6 issues completed
Closed as not planned

Description

@cv

Problem Statement

Replace NemoClaw's overlapping install and onboarding inputs with one versioned, declarative configuration file.

A user should describe one desired deployment: the agent, sandbox environment, inference runtime and model, network policy, integrations, and operational settings. NemoClaw should validate that document and converge the deployment through one onboarding engine.

Today, users express the same intent through interactive menus, CLI flags, NEMOCLAW_* variables, Express logic, and serving profiles. These paths require precedence rules, conflict checks, duplicated validation, and many input combinations. The result is difficult to understand, automate, test, and maintain.

This epic authorizes a product-surface redesign only after maintainers record an Accept decision. The redesign must reduce onboarding code and concepts. Adding a configuration file beside all existing interfaces does not satisfy this epic.

Desired Behavior

NemoClaw has one public desired-state contract:

nemoclaw onboard --config nemoclaw.yaml

The file specifies the complete non-secret deployment configuration, including:

  • Agent and sandbox name.
  • Host and sandbox runtime requirements.
  • Inference provider or serving profile, model, endpoint, and topology.
  • Network policy tier and presets.
  • GPU selection and read-only host mounts.
  • Messaging, web search, tools, and observability.
  • Custom image inputs when supported.

The file references credentials by source. It does not contain credential values.

NemoClaw validates the schema, resolves host compatibility and catalog references, prints a redacted plan, and applies that plan through one engine. Unknown fields, conflicting selections, unsupported combinations, and missing credential references fail before host or sandbox mutation.

Interactive or graphical setup may generate this file. It must not create a separate execution path.

Lifecycle controls such as validation, planning, apply, and recovery may remain as command options because they control execution rather than desired state.

Existing configuration flags and selection environment variables become migration inputs only. They must converge into the same contract and be removed after a defined compatibility period. Credential environment variables may remain as secret sources.

Concrete example

apiVersion: nemoclaw.nvidia.com/v1
kind: Sandbox
metadata:
  name: my-assistant
spec:
  agent: openclaw
  runtime:
    sandbox: docker
    gpu:
      mode: auto
  inference:
    provider: openai
    model: <supported-model>
    credential:
      env: OPENAI_API_KEY
  network:
    tier: balanced
  webSearch:
    provider: none
  messaging: []
  observability:
    enabled: true

Scope and Exclusions

Included

  • Define one versioned schema for complete onboarding desired state.
  • Separate desired state, secret resolution, detected host facts, and execution state.
  • Route install and onboarding decisions through one schema, validation path, plan, and apply engine.
  • Preserve supported agent, platform, provider, policy, integration, GPU, image, and recovery behavior.
  • Define deterministic validation and redacted plan output.
  • Define migration and removal rules for overlapping menus, flags, and configuration environment variables.
  • Measure and remove duplicate parsing, prompting, precedence, conflict, validation, and test machinery.
  • Keep resume checkpoints as internal execution state rather than user-authored configuration.

Excluded

  • Child-issue decomposition. We will do that after this epic receives an accepted design decision.
  • New agents, providers, platforms, policies, or integrations.
  • Secrets stored directly in the configuration file.
  • General-purpose templating, inheritance, or arbitrary scripting.
  • Compatibility overrides mixed with --config.
  • A second onboarding engine.

Constraints

  • --config must be authoritative. NemoClaw must reject overlapping configuration overrides.
  • The migration must preserve fail-closed security and recovery behavior.
  • The final implementation must produce a net reduction in the onboarding configuration code footprint.
  • The epic must define a removal target and compatibility end state before implementation starts.

Ongoing Ownership

Proposed owner: NemoClaw CLI and onboarding maintainers.

The accepted decision must name one accountable maintainer for the schema, migration, compatibility policy, and release validation.

Placement and Support Expectations

Requested placement: core NemoClaw.

This file becomes the supported public contract for install and onboarding desired state. Maintainers own schema evolution, compatibility, security review, documentation, and validation across supported agents and platforms.

Proposed product decision: Accept.

Reason: one declarative contract preserves onboarding capability while reducing user choices, precedence rules, and duplicate implementation paths.

This issue is not accepted scope until a maintainer records the final decision and accountable owner.

Validation Plan

  • Validate the schema without host mutation.
  • Produce a stable, redacted resolved plan for supported configurations.
  • Reject unknown fields and incompatible combinations before downloads or mutation.
  • Verify that credential values never enter the config, plan, logs, events, arguments, or persisted non-secret state.
  • Prove equivalent supported outcomes for representative OpenClaw, Hermes, Deep Agents, and qualified platform paths.
  • Verify failure, resume, rebuild, cleanup, and uninstall behavior from persisted configuration provenance.
  • Measure removed public inputs, parsing branches, precedence rules, conflict checks, and tests.
  • Require a net reduction in production onboarding configuration code after migration completes.
  • Update command reference, quickstarts, security guidance, and migration guidance.
  • Use local tests for schema, planning, and compatibility logic. Use live E2E only for real host, runtime, GPU, or external-service boundaries.

Compatibility Requirements

Preserve the capabilities that the maintained release supports for:

  • OpenClaw, Hermes, and LangChain Deep Agents Code.
  • Supported Linux, macOS, WSL, DGX, and container-runtime paths.
  • Hosted, compatible, local, routed, and managed inference.
  • Current policy, messaging, web search, GPU, mount, observability, and custom-image choices.

The design must define schema-version handling, release compatibility, migration diagnostics, and the date or release that removes each legacy input path.

Security or Privacy Impact

The configuration file is non-secret and may be persisted or reviewed.

Credential entries name a resolver and identifier. Providers receive credentials through the existing trusted host-side boundary. Credential values must not appear in the file, process arguments, plans, logs, events, checkpoints, or status output.

Validation must preserve URL checks, SSRF controls, policy requirements, image identity checks, filesystem restrictions, and fail-closed behavior before mutation.

Implementation Idea

Use one pipeline:

versioned config + detected host facts + resolved secret references
                             |
                             v
                   validated redacted plan
                             |
                             v
                        reconciliation

Any temporary wizard or legacy adapter compiles to the versioned configuration before validation. No adapter may bypass the shared pipeline.

Related work:

Category

Feature

Checklist

  • I searched existing issues and found no duplicate.
  • I described the problem and desired behavior.

Sub-issues

Sub-issues

6 of 6 Issues completed
Loading 6 sub-issues

Activity

  1. added
    enhancement
    area: cli
    area: onboarding
    needs: design
    area: architecture
    on Sep 2, 2026
  2. cv commented on Sep 2, 2026

    @cv
    CollaboratorAuthor

    Clarification: preserve guided onboarding as a configuration authoring tool.

    Users who do not know NemoClaw's agents, providers, models, policies, or integrations still need guided discovery. Agents acting for users also need a structured way to inspect compatible choices. The current menus should therefore become a configurator for the canonical YAML contract, not disappear.

    The target flow is:

    guided configurator ──> nemoclaw.yaml ──> validate ──> plan ──> apply
    human-authored YAML ──> nemoclaw.yaml ──> validate ──> plan ──> apply
    agent-authored YAML ──> nemoclaw.yaml ──> validate ──> plan ──> apply
    

    The guided configurator must:

    • Detect host capabilities and show compatible choices.
    • Explain available agents, inference options, policies, and integrations.
    • Write every non-secret choice to a versioned config file.
    • Record credential references, never credential values.
    • Show the generated file and a redacted resolved plan.
    • Ask before applying the plan.
    • Support editing an existing config file.
    • Use the same validation and apply engine as hand-authored configuration.

    The configurator must not own separate defaults, validation, state, or mutation behavior. It must not keep hidden answers outside the generated file. Applying generated YAML and applying equivalent hand-authored YAML must produce the same result.

    This preserves a guided first-run experience while removing the parallel configuration paths that create the current complexity.

  3. cv commented on Sep 3, 2026

    @cv
    CollaboratorAuthor

    Analysis outcome: the current install and onboarding inputs divide into seven clear classes. Only deployment desired state and credential references belong in the future YAML schema.

    This inventory gives each current input a starting disposition before we define exact schema fields:

    1. Map to YAML desired state.
    2. Map to a YAML credential reference.
    3. Keep as an operation control.
    4. Keep as an installer acquisition control.
    5. Derive from host detection.
    6. Keep internal temporarily, then replace with typed transport.
    7. Remove without replacement.

    Desired-state inputs

    These inputs describe what NemoClaw should deploy.

    Identity and agent

    Current input Equivalent or related input Suggested config area
    --name NEMOCLAW_SANDBOX_NAME metadata.name
    --agent NEMOCLAW_AGENT spec.agent.type
    --agents NEMOCLAW_EXTRA_AGENTS_JSON spec.agent.agents
    --tool-disclosure NEMOCLAW_TOOL_DISCLOSURE spec.agent.tools.disclosure
    none NEMOCLAW_AGENT_HEARTBEAT_EVERY spec.agent.heartbeat
    none NEMOCLAW_AGENT_TIMEOUT spec.agent.timeout

    The secondary-agent manifest should become part of, or a reference from, the canonical config. It should not remain an independent onboarding interface.

    Inference

    Current input Role
    --profile Cataloged serving profile
    --experimental-profile Hidden experimental profile
    NEMOCLAW_PROVIDER Provider or backend
    NEMOCLAW_MODEL Model
    NEMOCLAW_PROVIDER_MODEL Compatibility model alias
    NEMOCLAW_ENDPOINT_URL Compatible endpoint
    NEMOCLAW_PREFERRED_API API protocol
    NEMOCLAW_REASONING Reasoning mode
    NEMOCLAW_REASONING_EFFORT Reasoning effort
    NEMOCLAW_MAX_TOKENS Output token limit
    NEMOCLAW_CONTEXT_WINDOW Context requirement
    NEMOCLAW_SERVING_PRESET Stable serving-profile ID
    NEMOCLAW_VLLM_MODEL Managed-vLLM model
    NEMOCLAW_VLLM_EXTRA_ARGS_JSON Managed-vLLM arguments
    NEMOCLAW_MANAGED_CLUSTER_PEERS Multi-host topology
    --vllm-gpu-device / NEMOCLAW_VLLM_GPU_DEVICE Host-side inference GPU
    NEMOCLAW_VLLM_PORT vLLM port
    NEMOCLAW_OLLAMA_PORT Ollama port
    NEMOCLAW_OLLAMA_PROXY_PORT Managed Ollama proxy port
    NEMOCLAW_LLAMACPP_RECIPE Managed llama.cpp recipe
    NEMOCLAW_LOCAL_MODEL_RUNTIME Local runtime
    NEMOCLAW_ENABLE_LOCAL_MODEL_PROFILE Local-profile activation

    A catalog profile and manual provider fields should remain mutually exclusive.

    spec:
      inference:
        profile: dgx-spark-managed-vllm

    or:

    spec:
      inference:
        provider: openai
        model: <supported-model>
        endpoint: null
        api: openai
        reasoning:
          enabled: true
          effort: high
        limits:
          contextTokens: 64000
          outputTokens: 8192
        credential:
          env: OPENAI_API_KEY

    Policy and network access

    Current input Suggested config area
    NEMOCLAW_POLICY_MODE spec.network.mode
    NEMOCLAW_POLICY_TIER spec.network.tier
    NEMOCLAW_POLICY_PRESETS spec.network.presets
    NEMOCLAW_TRUSTED_PRIVATE_HOSTS spec.network.trustedPrivateHosts
    NEMOCLAW_TRUSTED_PRIVATE_INFERENCE_HOSTS spec.network.trustedPrivateInferenceHosts
    NEMOCLAW_PROXY_HOST / NEMOCLAW_PROXY_PORT spec.network.proxy
    NEMOCLAW_CORPORATE_CA_BUNDLE spec.network.trust.corporateCa.bundle
    NEMOCLAW_CORPORATE_CA_ANCHOR_DIRS spec.network.trust.corporateCa.anchorDirectories
    NEMOCLAW_CORPORATE_CA_IMPORT spec.network.trust.corporateCa.import
    spec:
      network:
        tier: balanced
        presets:
          - github
        trustedPrivateHosts: []
        trustedPrivateInferenceHosts: []
        proxy: null
        trust:
          corporateCa:
            bundle: null
            anchorDirectories: []

    Runtime resources and GPU

    Current input Equivalent or related input
    --gpu / --no-gpu Gateway and sandbox GPU selection
    --sandbox-gpu / --no-sandbox-gpu NEMOCLAW_SANDBOX_GPU
    --sandbox-gpu-device NEMOCLAW_SANDBOX_GPU_DEVICE
    --vllm-gpu-device NEMOCLAW_VLLM_GPU_DEVICE
    NEMOCLAW_RESOURCE_PROFILE Named CPU and RAM profile
    NEMOCLAW_CPU Explicit CPU override
    NEMOCLAW_RAM Explicit memory override
    NEMOCLAW_DOCKER_GPU_PATCH GPU compatibility route
    NEMOCLAW_OVERLAY_SNAPSHOTTER Container snapshotter
    NEMOCLAW_DISABLE_OVERLAY_FIX Overlay compatibility behavior
    NEMOCLAW_OPENSHELL_GATEWAY_CONTAINER_PATCH Gateway compatibility route
    spec:
      runtime:
        resources:
          profile: default
          cpu: null
          memory: null
        gpu:
          sandbox:
            mode: auto
            device: null
          inference:
            device: null
        compatibility:
          dockerGpuRoute: auto
          gatewayContainer: false
          overlayFix: auto
          snapshotter: null

    Image and filesystem

    Current input Role
    --from / NEMOCLAW_FROM_DOCKERFILE Custom Dockerfile
    --host-mount Repeatable read-only mount
    NEMOCLAW_SANDBOX_BASE_IMAGE_REF OpenClaw base-image override
    NEMOCLAW_HERMES_SANDBOX_BASE_IMAGE_REF Hermes base-image override
    NEMOCLAW_LANGCHAIN_DEEPAGENTS_CODE_SANDBOX_BASE_IMAGE_REF Deep Agents base-image override
    NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH Image-resolution behavior
    NEMOCLAW_SANDBOX_BASE_LOCAL_BUILD Local-build permission
    spec:
      sandbox:
        image:
          dockerfile: null
          base: null
          refresh: false
          allowLocalBuild: auto
        mounts:
          - source: /home/user/project
            target: /sandbox/project
            readOnly: true

    Gateway and user interfaces

    Current input Role
    NEMOCLAW_GATEWAY_PORT Gateway port
    NEMOCLAW_GATEWAY_BIND_ADDRESS Gateway bind address
    NEMOCLAW_GATEWAY_MANAGEMENT Lifecycle authority
    NEMOCLAW_DASHBOARD_PORT Dashboard host port
    NEMOCLAW_DASHBOARD_BIND Dashboard exposure
    --control-ui-port Local control UI port
    NEMOCLAW_HERMES_DASHBOARD Hermes dashboard selection
    NEMOCLAW_HERMES_DASHBOARD_PORT Hermes dashboard port
    NEMOCLAW_HERMES_DASHBOARD_TUI Hermes dashboard TUI behavior
    NEMOCLAW_HERMES_API_PORT Hermes API port
    spec:
      gateway:
        management: nemoclaw
        bind: 127.0.0.1
        port: 8080
      interfaces:
        controlUi:
          port: 19000
        dashboard:
          enabled: true
          bind: 127.0.0.1
          port: 18789

    Observability

    Current input Role
    --observability / --no-observability Runtime observability opt-in
    NEMOCLAW_OBSERVABILITY Environment equivalent
    NEMOCLAW_OPENCLAW_OTEL OpenClaw conversation telemetry
    NEMOCLAW_OPENCLAW_OTEL_ENDPOINT OTLP endpoint
    NEMOCLAW_OPENCLAW_OTEL_SAMPLE_RATE Sampling
    NEMOCLAW_OPENCLAW_OTEL_SERVICE_NAME Service identity
    NEMOCLAW_MCP_TOOLS_LIST_TIMEOUT_MS MCP runtime behavior
    spec:
      observability:
        enabled: true
        otlp:
          endpoint: http://host.openshell.internal:4318
          sampleRate: 1
          serviceName: openclaw-gateway

    NEMOCLAW_TRACE, NEMOCLAW_TRACE_DIR, and NEMOCLAW_TRACE_FILE trace the onboarding operation. They are execution controls, not deployment desired state.

    Web search

    Current input Role
    NEMOCLAW_WEB_SEARCH_PROVIDER brave, tavily, or none
    BRAVE_API_KEY Brave credential source
    TAVILY_API_KEY Tavily credential source
    spec:
      integrations:
        webSearch:
          provider: brave
          credential:
            env: BRAVE_API_KEY

    Messaging

    Channel Configuration inputs Credential source
    Telegram TELEGRAM_ALLOWED_IDS, TELEGRAM_REQUIRE_MENTION, TELEGRAM_GROUP_POLICY TELEGRAM_BOT_TOKEN
    Slack SLACK_ALLOWED_USERS, SLACK_ALLOWED_CHANNELS SLACK_BOT_TOKEN, SLACK_APP_TOKEN
    Discord DISCORD_SERVER_ID, DISCORD_REQUIRE_MENTION, DISCORD_USER_ID DISCORD_BOT_TOKEN
    Teams MSTEAMS_APP_ID, MSTEAMS_TENANT_ID, TEAMS_ALLOWED_USERS, MSTEAMS_PORT, TEAMS_REQUIRE_MENTION MSTEAMS_APP_PASSWORD
    Google Chat GOOGLECHAT_AUDIENCE_TYPE, GOOGLECHAT_AUDIENCE, GOOGLECHAT_APP_PRINCIPAL, GOOGLECHAT_ALLOWED_USERS, GOOGLE_CHAT_PROJECT_ID, GOOGLE_CHAT_SUBSCRIPTION_NAME GOOGLECHAT_SERVICE_ACCOUNT
    WeChat WECHAT_ACCOUNT_ID, WECHAT_BASE_URL, WECHAT_USER_ID, WECHAT_ALLOWED_IDS WECHAT_BOT_TOKEN
    WhatsApp WHATSAPP_MODE, WHATSAPP_ALLOWED_IDS Interactive QR enrollment
    spec:
      integrations:
        messaging:
          - channel: telegram
            credential:
              env: TELEGRAM_BOT_TOKEN
            allowedIds:
              - "123456789"
            requireMention: true
            groupPolicy: restricted

    NEMOCLAW_EXTRA_PLACEHOLDER_KEYS should become a bounded list of named credential references instead of an environment-variable naming convention.

    Credential sources

    Credential values must not appear in the YAML file. The config should name a resolver and identifier.

    Inference and model-acquisition credential inputs include:

    • NVIDIA_INFERENCE_API_KEY, with compatibility alias NVIDIA_API_KEY.
    • OPENROUTER_API_KEY.
    • OPENAI_API_KEY.
    • ANTHROPIC_API_KEY.
    • COMPATIBLE_ANTHROPIC_API_KEY.
    • GEMINI_API_KEY.
    • COMPATIBLE_API_KEY.
    • NOUS_API_KEY.
    • NGC_API_KEY.
    • NIM_NGC_API_KEY.
    • HF_TOKEN, with compatibility alias HUGGING_FACE_HUB_TOKEN.
    • Compatibility bridge NEMOCLAW_PROVIDER_KEY.

    Target representation:

    credential:
      env: OPENAI_API_KEY

    Operation and lifecycle controls

    These inputs describe how to run an operation. They should not be persisted under spec:

    • --non-interactive / NEMOCLAW_NON_INTERACTIVE.
    • --resume.
    • --fresh / NEMOCLAW_FRESH.
    • --recreate-sandbox / NEMOCLAW_RECREATE_SANDBOX.
    • --yes, -y, and NEMOCLAW_YES.
    • --events=jsonl.
    • --no-ollama-autostart / NEMOCLAW_OLLAMA_NO_AUTOSTART.
    • NEMOCLAW_NON_INTERACTIVE_SUDO_MODE.
    • NEMOCLAW_IGNORE_RUNTIME_RESOURCES.
    • NEMOCLAW_AUTO_FIX_FIREWALL.
    • NEMOCLAW_SKIP_TELEGRAM_REACHABILITY.
    • NEMOCLAW_SKIP_SLACK_AUTH_VALIDATION.
    • NEMOCLAW_TRACE, NEMOCLAW_TRACE_DIR, and NEMOCLAW_TRACE_FILE.

    These controls should either remain as a small operation interface or become distinct validate, plan, and apply operations.

    Consent and destructive authorization

    The following are attestations or one-operation capabilities. Persisting them as ordinary desired state would be unsafe:

    • --yes-i-accept-third-party-software / NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE.
    • NEMOCLAW_ACCEPT_EXPERIMENTAL_OPENSHELL_UPGRADE.
    • NEMOCLAW_OPENSHELL_UPGRADE_PREPARED.
    • NEMOCLAW_CONFIRM_LEGACY_MANAGED_RECREATE.
    • NEMOCLAW_RECREATE_WITHOUT_BACKUP.

    Installer-only inputs

    These govern how NemoClaw itself is acquired. They stay outside sandbox desired state.

    Installer flags:

    • --non-interactive.
    • --yes-i-accept-third-party-software.
    • --defer-onboarding.
    • --fresh.
    • --station-deepseek.
    • --force-station-install.
    • Hidden --experimental-profile.
    • --version / -v.
    • --help / -h.

    Installer environment inputs:

    • NEMOCLAW_INSTALL_TAG.
    • NEMOCLAW_INSTALL_REF.
    • NEMOCLAW_DEFER_ONBOARDING.
    • NEMOCLAW_NO_EXPRESS.
    • NEMOCLAW_SINGLE_SESSION.
    • NEMOCLAW_ACCEPT_EXPERIMENTAL_OPENSHELL_UPGRADE.
    • NEMOCLAW_OPENSHELL_UPGRADE_PREPARED.
    • NEMOCLAW_CONFIRM_LEGACY_MANAGED_RECREATE.

    --station-deepseek currently combines an installer mode with an inference choice. The inference choice belongs in YAML. Host qualification remains an install or apply concern. Express installation should become a config generator or preset resolver, not a separate configuration engine.

    Host context

    These inputs affect detection or command execution. NemoClaw should derive them rather than copy them into user-authored desired state:

    • HOME, PATH, TMPDIR, and XDG_*.
    • HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY, including lowercase variants.
    • DOCKER_HOST, DOCKER_CONTEXT, and DOCKER_CONFIG.
    • DOCKER_TLS, DOCKER_TLS_VERIFY, and DOCKER_CERT_PATH.
    • CONTAINERS_CONF.
    • CI, terminal state, locale, and color settings.
    • Existing Docker, GPU, OpenShell, firmware, and platform facts.

    The config can state a requirement such as GPU required. It should not store detected host facts.

    Internal and test-only inputs

    These inputs must not enter the public schema:

    • NEMOCLAW_MESSAGING_PLAN_B64.
    • NEMOCLAW_STARTUP_PROFILE_B64.
    • NEMOCLAW_CORPORATE_CA_B64.
    • NEMOCLAW_EXTRA_AGENTS_JSON_B64.
    • NEMOCLAW_INFERENCE_INPUTS.
    • NEMOCLAW_MINIMAL_BOOTSTRAP.
    • NEMOCLAW_OLLAMA_PROXY_TOKEN.
    • NEMOCLAW_MANAGED_HERMES_HASH_B64.
    • NEMOCLAW_DOCKER_GPU_PATCH_NETWORK.
    • NEMOCLAW_RESTORE_LATEST_BACKUP_ON_RECREATE.
    • NEMOCLAW_E2E_*, NEMOCLAW_TEST_*, and NEMOCLAW_RUN_LIVE_E2E.
    • Candidate qualification receipts and fault-injection controls.
    • Hidden --temp-managed-runtime and --temp-managed-runtime-catalog.

    These are internal transports, generated secrets, fixtures, or qualification controls. The new architecture should replace applicable environment transports with typed in-process values.

    Inputs that need an explicit design decision

    These inputs do not yet fit a stable schema field:

    • --apf-interceptor: providerless sandbox with special policy provenance.
    • --experimental-profile=portable: experimental runtime profile.
    • NEMOCLAW_GATEWAY_MANAGEMENT: external lifecycle authority.
    • NEMOCLAW_EXPERIMENTAL: changes which choices are exposed.
    • NEMOCLAW_CUA_ENABLED and NEMOCLAW_CUA_SANDBOX_IMAGE_REF: experimental NemoCUA activation.
    • NEMOCLAW_HERMES_AUTH and NEMOCLAW_HERMES_AUTH_METHOD: desired authentication state plus credential enrollment.
    • NEMOCLAW_OLLAMA_INSTALL_MODE: host software installation versus deployment state.
    • Gateway-container, overlay, and Docker GPU compatibility routes.

    Each needs one disposition: stable YAML field, supported profile, apply-time control, internal detail, or removal without replacement.

    Static impact evidence

    The new analyzer traced representative inputs independently to exact usages, statically related tests, and catalog-owned E2E targets.

    Input Usage locations Related tests E2E targets
    NEMOCLAW_AGENT 334 1,464 29
    NEMOCLAW_PROVIDER 604 1,393 34
    NEMOCLAW_MODEL 542 1,422 38
    NEMOCLAW_POLICY_TIER 82 1,344 10
    NEMOCLAW_SANDBOX_GPU 46 1,356 1
    NEMOCLAW_WEB_SEARCH_PROVIDER 109 1,393 4
    TELEGRAM_BOT_TOKEN 499 1,654 5
    NEMOCLAW_NON_INTERACTIVE 490 1,420 55
    --profile 49 25 0
    --sandbox-gpu 12 15 0
    --vllm-gpu-device 27 259 0

    The large related-test counts show broad import fan-in around current onboarding. They are deterministic static estimates, not proof of semantic dead code and not a requirement to run every listed test for each removal.

    Proposed next artifact

    Before fixing the exact YAML syntax, assign every current input exactly one disposition:

    Disposition Meaning
    Map to YAML Persisted deployment desired state
    Map to credential reference YAML names a resolver; the secret remains external
    Keep as operation control Controls validate, plan, apply, recovery, or output
    Keep as installer control Selects acquisition version or installer behavior
    Derive from host Detected fact, not user-authored state
    Replace typed transport Internal environment handoff to remove during refactoring
    Remove No replacement in the final product surface

    That table should be the input to schema design. It prevents consent, secret values, test controls, and detected host facts from leaking into the declarative contract.

  4. self-assigned this
    on Sep 3, 2026
  5. cv commented on Sep 3, 2026

    @cv
    CollaboratorAuthor

    The input-disposition review is complete: all 78 inventory rows and all 11 focused clarifications have an agreed decision.

    Resource model

    One configuration document describes one deployment and one gateway:

    Deployment
    └── one gateway
        ├── shared inferenceProviders[]
        └── sandboxes[]
            ├── one runtime
            ├── agents[]
            │   └── inference.routes[]
            ├── one effective network policy
            └── integrations[]
    

    A second gateway uses a second deployment document. The first schema does not need cross-gateway apply, rollback, ownership, or cleanup semantics.

    Agreed YAML structure

    • metadata.name identifies the deployment.
    • spec.gateway is singular.
    • spec.sandboxes[] supports one or more sandboxes.
    • Each sandbox has one runtime and one or more agents[].
    • Primary and secondary agents become one agent collection.
    • spec.inferenceProviders[] contains one or more shared, named providers.
    • Each agent has one or more inference.routes[] that reference a named provider and select a model.
    • Each sandbox resolves one effective network policy.
    • Integrations attach to a sandbox or to explicit agentRefs.
    • Dashboard configuration is agent-neutral. Runtime adapters translate it to Hermes, OpenClaw, or another agent runtime.

    Example:

    apiVersion: nemoclaw.nvidia.com/v1
    kind: Deployment
    
    metadata:
      name: work-agents
    
    spec:
      gateway:
        management: nemoclaw
        runtime:
          provider: docker
          gpu:
            mode: auto
        bind: 127.0.0.1
        port: 8080
        interfaces:
          controlUi:
            port: 19000
    
      inferenceProviders:
        - name: hosted-openai
          provider: openai
          endpoint: https://api.openai.com/v1
          api: openai
          credential:
            env: OPENAI_API_KEY
    
        - name: local-vllm
          profile: dgx-spark-managed-vllm
          managedServing:
            gpu:
              device: "0"
    
      sandboxes:
        - name: research
          runtime:
            provider: docker
            resources:
              profile: default
            gpu:
              mode: auto
    
          network:
            tier: balanced
            presets:
              - github
            interceptors: []
    
          agents:
            - name: primary
              type: openclaw
              tools:
                disclosure: progressive
              inference:
                routes:
                  - name: primary
                    provider: hosted-openai
                    model: <supported-model>
                    reasoning:
                      enabled: true
                      effort: high
                    limits:
                      contextTokens: 64000
                      outputTokens: 8192
              interfaces:
                dashboard:
                  enabled: true
                  port: 18789
    
          integrations:
            webSearch:
              provider: brave
              credential:
                env: BRAVE_API_KEY
            messaging:
              - name: notifications
                channel: telegram
                agentRefs:
                  - primary
                credentials:
                  botToken:
                    env: TELEGRAM_BOT_TOKEN
                allowedIds:
                  - "123456789"
                requireMention: true

    Credentials and security

    • YAML stores credential references only. It never stores credential values.
    • A first reference form is credential: { env: OPENAI_API_KEY }.
    • The reference type can add keychain or external-secret resolvers later without changing provider configuration.
    • Plans, logs, events, checkpoints, and status output show only the resolver type and identifier.
    • NEMOCLAW_EXTRA_PLACEHOLDER_KEYS has no public replacement. Each external credential reference attaches to the integration or agent profile that consumes it.
    • Channel-specific credential fields, including web-search and messaging credentials, follow the same reference-only rule.

    Stable capability decisions

    • APF remains a capability and becomes a typed sandbox network interceptor, such as network.interceptors: [{ type: apf }].
    • Portable remains a capability and becomes a stable gateway runtime provider/profile. The hidden experimental flag is removed.
    • NemoCUA remains a capability and becomes an agent type under spec.sandboxes[].agents[]. Image/profile resolution must produce a qualified compatible image.
    • Hermes authentication remains a capability under the agent-neutral agents[].auth shape. Runtime adapters own method-specific validation.
    • Ollama serving intent belongs to a named inference provider. User-versus-system host installation mode does not belong in desired state; host preparation derives a safe plan and requests elevation when needed.
    • Managed serving arguments should use profiles or typed advanced fields. The schema should not expose raw argument strings by default.

    Inputs that remain outside desired state

    Operation controls remain outside spec:

    • Validate, plan, apply, and recovery behavior.
    • Interactive versus unattended operation.
    • Confirmation policy.
    • JSONL event output.
    • Onboarding tracing.
    • Destructive authorization and third-party consent.
    • Apply-time validation policy.

    Messaging reachability and authentication probes validate an operation. They do not change the deployed channel. Remove channel-specific skip environment variables; retain one apply-time validation policy only if a current restricted-network consumer requires it. Default validation remains fail closed.

    Installer acquisition controls also remain outside sandbox desired state:

    • Release tag or exact source revision.
    • Help and version output.
    • Installer deferral and preparation controls that do not describe the deployment.

    Host context is detected rather than persisted. The config states requirements instead of copying Docker, GPU, firmware, platform, terminal, or process-environment facts.

    Public inputs with no replacement

    • Remove --force-station-install from the target public surface. It bypasses only the DGX Station release-metadata allowlist. Unsupported metadata should stop with qualification guidance. An internal qualification workflow may retain equivalent authority only if maintainers prove a current consumer.
    • Remove NEMOCLAW_SINGLE_SESSION. The config-driven planner discovers active sessions and fails before unsafe mutation.
    • Remove NEMOCLAW_EXPERIMENTAL as configuration. The configurator can reveal qualified choices; the file states exact intent.
    • Remove generic placeholder-key lists and channel-specific probe-skip variables as described above.

    Internal simplification

    Encoded and child-process environment transports, including messaging plans, startup profiles, corporate CA payloads, and extra-agent payloads, do not enter the public schema. Replace them with typed in-process values where process boundaries permit. Keep true child-process transport internal and derive it from the validated plan.

    Durable record

    This issue comment records the agreed design direction. Implementation issues and the implementation itself should record the final schema, migration sequence, validation, and removal evidence. No separate design artifact or migration ledger needs to remain in the repository.

    These decisions do not authorize implementation until this epic records the required product decision as Accept, with the reason, core placement, accountable maintainer, and validation plan.

  6. cv commented on Sep 3, 2026

    @cv
    CollaboratorAuthor

    Follow-up decisions from the line-by-line review of the proposed nemoclaw.yaml example:

    Document identity

    Use:

    apiVersion: nemoclaw.nvidia.com/v1
    kind: NemoClawConfig

    Do not use kind: Deployment. That name implies Kubernetes Deployment semantics that this file does not provide.

    Do not add metadata.name in v1. The current design has no proven consumer for a separate configuration identity. Sandbox names identify managed resources. Add configuration identity later only if ownership, selection, or reconciliation requires it.

    Managed inference GPU selection

    Replace the singular gpu.device field with a typed selector:

    managedServing:
      gpu:
        selection: all

    Supported shapes should distinguish intent:

    # Use every qualified GPU available to this runtime.
    gpu:
      selection: all
    
    # Let qualification and planning select compatible devices.
    gpu:
      selection: auto
    
    # Select exact devices.
    gpu:
      selection: explicit
      devices:
        - GPU-69adb14e-820e-bfb4-0993-171e73f68504

    Do not mix all with explicit device identifiers. Validation should reject selection: explicit without devices and reject devices for incompatible selection modes.

    Sandbox image build paths

    Use an explicit build object:

    image:
      build:
        dockerfile: ./sandbox/Dockerfile
        context: ./sandbox

    Path rules:

    • Resolve relative paths against the directory containing the configuration file, never the caller's working directory.
    • Reject absolute paths by default so the configuration remains portable.
    • Require the Dockerfile to remain inside its build context.
    • Show normalized paths and the resolved image identity in the redacted plan.
    • Treat a prebuilt image reference and image.build as mutually exclusive.
    • Omit unused image fields instead of writing null placeholders.

    Network interceptors

    The only current typed interceptor is APF:

    network:
      interceptors:
        - type: apf

    Do not invent additional interceptor types without a current consumer. Preserve APF's existing safety semantics:

    • Providerless sandbox creation.
    • Exact post-create verification.
    • Durable fallback recovery on failure.
    • Rejection of combinations that conflict with caller-supplied tier or preset policy.

    The normal-policy example should show tier and presets without an empty interceptors field. A separate APF example should show the interceptor and omit conflicting policy configuration.

    Agent inference routes and overrides

    Named inference providers hold shared defaults and external-service identity. Agent routes reference those providers and may override only agent-level inference behavior:

    spec:
      inferenceProviders:
        - name: hosted-openai
          provider: openai
          endpoint: https://api.openai.com/v1
          api: openai
          credential:
            env: OPENAI_API_KEY
    
      sandboxes:
        - name: research
          agents:
            - name: primary
              type: openclaw
              inference:
                routes:
                  - name: primary
                    providerRef: hosted-openai
                    overrides:
                      model: <supported-model>
                      reasoning:
                        enabled: true
                        effort: high
                      limits:
                        contextTokens: 64000
                        outputTokens: 8192

    Rules:

    • providerRef must match exactly one spec.inferenceProviders[].name.
    • provider inside an inference-provider entry identifies its implementation, such as openai; it is not a reference.
    • overrides uses a defined subset of the provider configuration schema, excluding name.
    • Allow route overrides for model and generation behavior, including reasoning and token limits.
    • Do not allow route overrides to change provider identity, endpoint, credentials, or managed-serving topology.
    • Reject unknown or forbidden override fields instead of ignoring them.

    These refinements replace the earlier example details where they differ. The issue remains the durable design record; no separate design document is required.

  7. cv commented on Sep 3, 2026

    @cv
    CollaboratorAuthor

    Follow-up adversarial review decisions for multi-sandbox v1

    Multi-sandbox configuration remains a v1 requirement. The apply contract is therefore explicitly non-atomic orchestration, not an all-or-nothing transaction. The following decisions refine the resource model, collision handling, partial-apply behavior, and recovery contract.

    Configuration identity and resource ownership

    Restore a human-readable configuration name and add an immutable UID:

    apiVersion: nemoclaw.nvidia.com/v1
    kind: NemoClawConfig
    metadata:
      name: work-agents
      uid: <immutable-uid>
    • metadata.name is the operator-facing deployment name.
    • metadata.uid is the durable ownership identity for the gateway, managed inference providers, sandboxes, and integration state managed by this document.
    • The UID must not be inferred from the file path or sandbox names.
    • Moving the file must not change ownership. Copying or editing a file must not silently transfer ownership.
    • Ordinary apply may mutate or delete a resource only when its owner UID and current lifecycle identity match the authority recorded in the plan and durable state.

    Each managed resource must retain at least the deployment UID, resource name, lifecycle generation, verified live-resource identity, and last-applied intent or config digest. A matching name is a lookup result, not ownership evidence.

    Name collisions and adoption

    Planning must classify existing resources before mutation:

    Observed state Required behavior
    Name absent Plan creation.
    Name present with matching UID and lifecycle identity Plan reconciliation.
    Matching UID but changed live identity Stop or require explicit recovery for drift.
    Name owned by another UID Ownership conflict; do not mutate.
    Name present without ownership evidence Unmanaged collision; do not mutate automatically.
    Registry record present but live resource absent Plan explicit stale-state recovery or recreation.
    Live resource present but registry record absent Unmanaged collision; do not mutate.
    Name present with a different/newer lifecycle generation Stale authority; do not mutate.

    Adoption is an explicit conversion operation for legacy NemoClaw or externally created sandboxes. It must verify caller authority; inspect the live runtime, agent, policy, mounts, inference routes, and integrations; reject another deployment's resource; record the adopted generation and verified live identity; explain later replacement authority; and avoid destructive replacement during adoption unless separately planned and authorized. Ordinary apply never adopts by name alone.

    Omission and pruning

    The v1 default is non-destructive:

    • Removing a sandbox, managed provider, or integration from YAML does not delete it during ordinary apply.
    • Explicit pruning is required to remove omitted resources.
    • The plan lists every prune as a destructive action.
    • Pruning affects only resources with the same deployment UID and expected lifecycle generation.
    • Drifted, foreign, shared, or ambiguous resources are retained and reported.

    Non-atomic apply outcomes

    Stable top-level outcomes:

    • succeeded: every required effect was verified.
    • failed-before-effects: validation or planning failed and nothing was dispatched.
    • partially-applied: some effects were verified and others definitively failed.
    • recovery-required: state is known, but unfinished work or failed rollback remains.
    • inconclusive: at least one dispatched effect may have occurred, but its postcondition could not be verified.

    Each gateway, provider, sandbox, and integration effect reports one of:

    • not-started
    • dispatched
    • verified
    • failed
    • inconclusive
    • rollback-planned
    • rolled-back
    • rollback-failed
    • retained

    A failed apply must not claim that nothing changed. A timeout or lost response after dispatch is inconclusive until live state is inspected; it is not proof that the operation did not occur.

    Validation and orchestration order

    Validate and observe the complete document before the first effect, including schema and semantic validation, duplicate-name rejection, exact reference resolution, supported combinations, detectable port/GPU/policy/topology conflicts, credential-reference availability, ownership collisions, paths and image inputs, and prune candidates.

    Then use this deterministic order:

    1. Parse and validate the complete document.
    2. Resolve references, qualification data, and host compatibility.
    3. Observe all targets and establish ownership/collision results.
    4. Produce the complete redacted plan.
    5. Acquire deployment and gateway mutation authority.
    6. Prepare shared gateway and managed inference resources.
    7. Apply sandboxes in deterministic order.
    8. Apply sandbox-scoped integrations.
    9. Verify all postconditions.
    10. Publish final deployment status.

    V1 executes sequentially unless a demonstrated requirement justifies concurrency. After the first required-effect failure, stop scheduling new effects, verify dispatched work, perform only proven-safe rollback, retain everything else with recovery evidence, and return the appropriate partial/recovery/inconclusive outcome.

    Durable JSONL orchestration journal

    Use a simple durable JSONL journal for the outer multi-resource apply. Persist the header before the first effect and append/fsync transitions around each dispatch and verification boundary.

    The journal binds the apply ID, deployment UID, canonical config digest, plan digest and planner/build version, bounded host-facts identity, catalog/policy/image/managed-serving identities, target deployment revision, ordered effects and dependencies, prior observed state and expected postcondition, and dispatch/verification/rollback/retention outcomes.

    Entries are schema-versioned, bounded, secret-free, and recoverable after a truncated final line. Compaction or a terminal summary may be added later, but the append log remains recovery evidence until the apply reaches a verified terminal state.

    Shared inference providers

    For v1:

    • External providers are referenced but not lifecycle-managed by NemoClaw.
    • A managed provider is owned exclusively by one deployment UID.
    • All in-document sandbox and agent dependents are recorded.
    • A provider owned by another deployment is a collision, not implicit sharing.
    • Rollback or pruning removes a managed provider only when no verified or retained sandbox depends on it.
    • Cross-deployment sharing is deferred pending a separate ownership and reference-lifetime design.

    Rollback proceeds in reverse dependency order only when owner, generation, live identity, and dependent state still permit it. Report rollback as planned, verified, failed, or inconclusive; do not promise universal rollback.

    Resume and superseding intent

    Resume binds to the exact unfinished orchestration: deployment UID, apply ID, config and plan digests, target generations, effect graph and receipts, plus revalidated host facts, catalog/image identities, paths, and credential references.

    Resume first observes every incomplete or inconclusive effect. It continues or retries only after proving the prior outcome or safe idempotence; it never restarts the whole document blindly.

    If YAML changes while an apply is incomplete, ordinary apply must require resolution of the existing journal or create an explicit superseding recovery plan. New intent must not silently reinterpret unfinished effects.

    Partial-application status

    Status combines the durable journal and registry with live observations and reports deployment name/UID, desired config digest, last apply ID and outcome, per-resource state, drift/retained/incomplete/inconclusive resources, last verification time, and the exact next recovery action.

    JSONL progress events may mirror these transitions, but status authority is durable state plus live observation, not the event stream.

    Required first implementation slice

    After this epic records Accept, the first slice remains non-mutating but models the complete multi-sandbox contract:

    • Strictly parse and canonicalize metadata.name, metadata.uid, providers, and sandboxes[].
    • Build and validate the complete dependency graph.
    • Observe and classify all collisions.
    • Produce deterministic effect ordering and destructive classifications.
    • Emit a redacted plan with ownership and expected postconditions.
    • Simulate failure points and produce the specified partial/recovery outcomes.
    • Prove zero mutation.

    The first mutating slice deliberately fails after one sandbox succeeds and proves durable journaling, truthful partial status, dependency-safe retention/rollback, and exact resume. This failure case is required acceptance evidence for multi-sandbox v1; an all-green apply alone is insufficient.

    These decisions refine earlier comments where they differ, including restoring metadata.name and adding metadata.uid because multi-resource ownership is now a proven consumer of configuration identity.

  8. cv commented on Sep 3, 2026

    @cv
    CollaboratorAuthor

    Product and engineering decision: Accept

    Decision: Accept

    Reason: Adopt one versioned, declarative NemoClawConfig as NemoClaw's supported desired-state contract for onboarding. Guided, human-authored, and agent-authored configuration must converge through the same validation, planning, and apply architecture. This direction is accepted because it reduces overlapping public inputs, precedence rules, duplicated validation, and parallel mutation paths while preserving guided onboarding as a configuration-authoring experience.

    Placement: Core NemoClaw CLI and onboarding architecture.

    Accountable owner: The NemoClaw team owns the schema, migration, compatibility policy, security review, documentation, and release validation.

    Compatibility and removal direction: The first implementation slice, #10938, is strictly read-only config export. It changes no existing input or mutation behavior, so it does not require a compatibility period or removal release. Before any later child issue introduces writes, changes existing behavior, or removes/reinterprets a public menu, flag, or selection environment variable, that child must define its compatibility policy, release target, migration diagnostics, and removal end state. Adding the configuration file as a permanent parallel execution path is not accepted.

    Validation plan:

    • Check in and validate the versioned aggregate schema.
    • Reject unknown fields, conflicts, unsupported combinations, missing provenance, and unsafe credential references before mutation.
    • Keep credential values out of configuration, plans, logs, events, arguments, checkpoints, journals, and status output.
    • Produce deterministic, redacted plans and prove fail-closed policy, URL/SSRF, image, filesystem, ownership, and recovery behavior.
    • Use local tests for schema, reconstruction, planning, compatibility, redaction, and failure handling; use live E2E only for real host, runtime, GPU, policy, or external-service boundaries.
    • Require representative supported-path evidence as later mutating slices are introduced.
    • Measure and remove duplicate public inputs, parsing, precedence, prompting, conflict, validation, and test machinery; the completed migration must reduce the production onboarding-configuration footprint.

    This decision authorizes implementation of accepted child slices within these constraints. #10938 remains the first, read-only capability slice. Adoption, UID binding, apply, pruning, rollback, and multi-resource resume remain deferred until separately scoped child issues define their mutation, ownership, compatibility, and recovery contracts.

  9. removed
    needs: design
    on Sep 3, 2026
  10. 89 remaining items

  11. cv commented on Oct 18, 2026

    @cv
    CollaboratorAuthor

    Closing as not planned. This issue concerns the TypeScript product on main, and work has moved to v1, a separate implementation. Reopen it if this still applies to main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: architecturearea: cliarea: onboardingenhancementneeds: design

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions