Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@ It keeps the primary `main` agent on the normal NemoClaw inference route and add
| Sub-agent model | `nvidia-omni/private/nvidia/nemotron-3-nano-omni-reasoning-30b-a3b` |
| Delegation tool | `sessions_spawn` |

The sub-agent uses Omni as the specialist model for image tasks.
Omni is used as the specialist model for image tasks.
The primary orchestration model remains responsible for conversation, planning, and deciding when to delegate.

## Update the Sandbox Config

Fetch the current OpenClaw config from the sandbox, patch it with your auxiliary provider and `agents.list` changes, then upload it back.

```bash
export SANDBOX=my-assistant
export DOCKER_CTR=openshell-cluster-nemoclaw
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- cat /sandbox/.openclaw/openclaw.json > /tmp/openclaw.json
```console
$ export SANDBOX=my-assistant
$ nemoclaw "$SANDBOX" exec -- cat /sandbox/.openclaw/openclaw.json > /tmp/openclaw.json
```

Create `/tmp/openclaw.updated.json` with the OpenClaw sub-agent config.
Expand All @@ -56,13 +55,13 @@ For the Omni example, the demo provides `vlm-demo/vlm-subagent/openclaw-patch.py
Upload the patched config and refresh the hash.
In the default mutable state, this keeps the local hash consistent but does not make it tamper-proof; lock the config root-owned and read-only afterward if the sandbox should enforce config integrity at startup.

```bash
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 644 /sandbox/.openclaw/openclaw.json
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 644 /sandbox/.openclaw/.config-hash
cat /tmp/openclaw.updated.json | docker exec -i "$DOCKER_CTR" kubectl exec -i -n openshell "$SANDBOX" -c agent -- sh -c 'cat > /sandbox/.openclaw/openclaw.json'
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- /bin/bash -c "cd /sandbox/.openclaw && sha256sum openclaw.json > .config-hash"
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 444 /sandbox/.openclaw/openclaw.json
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 444 /sandbox/.openclaw/.config-hash
```console
$ SANDBOX_CTR=$(docker ps --format '{{.Names}}' \
> | awk -v name="$SANDBOX" '$0 == "openshell-" name || $0 ~ "^openshell-" name "-" { print; exit }')
$ test -n "$SANDBOX_CTR"
$ cat /tmp/openclaw.updated.json \
> | docker exec -i --user root "$SANDBOX_CTR" sh -c 'cat > /sandbox/.openclaw/openclaw.json'
$ docker exec --user root "$SANDBOX_CTR" sh -c 'cd /sandbox/.openclaw && sha256sum openclaw.json > .config-hash && chown sandbox:sandbox openclaw.json .config-hash && chmod 660 openclaw.json .config-hash'
```

Check `/tmp/gateway.log` after upload and confirm the gateway hot-reloaded the provider or `agents.list` change.
Expand All @@ -77,10 +76,10 @@ For the Omni example:
```

Use the same provider ID that appears in `models.providers`, such as `nvidia-omni`.
After uploading the auth profile, make sure the sandbox user owns the sub-agent directory:
After uploading the auth profile, make sure the sub-agent directory is owned by the sandbox user:

```bash
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chown -R sandbox:sandbox /sandbox/.openclaw/agents/vision-operator
```console
$ docker exec --user root "$SANDBOX_CTR" chown -R sandbox:sandbox /sandbox/.openclaw/agents/vision-operator
```

## Allow Auxiliary Provider Egress
Expand Down
17 changes: 8 additions & 9 deletions docs/inference/set-up-sub-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ Fetch the current OpenClaw config from the sandbox, patch it with your auxiliary

```bash
export SANDBOX=my-assistant
export DOCKER_CTR=openshell-cluster-nemoclaw
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- cat /sandbox/.openclaw/openclaw.json > /tmp/openclaw.json
nemoclaw "$SANDBOX" exec -- cat /sandbox/.openclaw/openclaw.json > /tmp/openclaw.json
```

Create `/tmp/openclaw.updated.json` with the OpenClaw sub-agent config.
Expand All @@ -66,12 +65,12 @@ Upload the patched config and refresh the hash.
In the default mutable state, this keeps the local hash consistent but does not make it tamper-proof; lock the config root-owned and read-only afterward if the sandbox should enforce config integrity at startup.

```bash
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 644 /sandbox/.openclaw/openclaw.json
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 644 /sandbox/.openclaw/.config-hash
cat /tmp/openclaw.updated.json | docker exec -i "$DOCKER_CTR" kubectl exec -i -n openshell "$SANDBOX" -c agent -- sh -c 'cat > /sandbox/.openclaw/openclaw.json'
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- /bin/bash -c "cd /sandbox/.openclaw && sha256sum openclaw.json > .config-hash"
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 444 /sandbox/.openclaw/openclaw.json
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 444 /sandbox/.openclaw/.config-hash
SANDBOX_CTR=$(docker ps --format '{{.Names}}' \
| awk -v name="$SANDBOX" '$0 == "openshell-" name || $0 ~ "^openshell-" name "-" { print; exit }')
test -n "$SANDBOX_CTR"
cat /tmp/openclaw.updated.json \
| docker exec -i --user root "$SANDBOX_CTR" sh -c 'cat > /sandbox/.openclaw/openclaw.json'
docker exec --user root "$SANDBOX_CTR" sh -c 'cd /sandbox/.openclaw && sha256sum openclaw.json > .config-hash && chown sandbox:sandbox openclaw.json .config-hash && chmod 660 openclaw.json .config-hash'
```

Check `/tmp/gateway.log` after upload and confirm the gateway hot-reloaded the provider or `agents.list` change.
Expand All @@ -89,7 +88,7 @@ Use the same provider ID that appears in `models.providers`, such as `nvidia-omn
After uploading the auth profile, make sure the sandbox user owns the sub-agent directory:

```bash
docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chown -R sandbox:sandbox /sandbox/.openclaw/agents/vision-operator
docker exec --user root "$SANDBOX_CTR" chown -R sandbox:sandbox /sandbox/.openclaw/agents/vision-operator
```

## Allow Auxiliary Provider Egress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ Fetch the current OpenClaw config from the sandbox, patch it with your auxiliary

```console
$ export SANDBOX=my-assistant
$ export DOCKER_CTR=openshell-cluster-nemoclaw
$ docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- cat /sandbox/.openclaw/openclaw.json > /tmp/openclaw.json
$ nemoclaw "$SANDBOX" exec -- cat /sandbox/.openclaw/openclaw.json > /tmp/openclaw.json
```

Create `/tmp/openclaw.updated.json` with the OpenClaw sub-agent config.
Expand All @@ -57,12 +56,12 @@ Upload the patched config and refresh the hash.
In the default mutable state, this keeps the local hash consistent but does not make it tamper-proof; lock the config root-owned and read-only afterward if the sandbox should enforce config integrity at startup.

```console
$ docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 644 /sandbox/.openclaw/openclaw.json
$ docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 644 /sandbox/.openclaw/.config-hash
$ cat /tmp/openclaw.updated.json | docker exec -i "$DOCKER_CTR" kubectl exec -i -n openshell "$SANDBOX" -c agent -- sh -c 'cat > /sandbox/.openclaw/openclaw.json'
$ docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- /bin/bash -c "cd /sandbox/.openclaw && sha256sum openclaw.json > .config-hash"
$ docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 444 /sandbox/.openclaw/openclaw.json
$ docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chmod 444 /sandbox/.openclaw/.config-hash
$ SANDBOX_CTR=$(docker ps --format '{{.Names}}' \
> | awk -v name="$SANDBOX" '$0 == "openshell-" name || $0 ~ "^openshell-" name "-" { print; exit }')
$ test -n "$SANDBOX_CTR"
$ cat /tmp/openclaw.updated.json \
> | docker exec -i --user root "$SANDBOX_CTR" sh -c 'cat > /sandbox/.openclaw/openclaw.json'
$ docker exec --user root "$SANDBOX_CTR" sh -c 'cd /sandbox/.openclaw && sha256sum openclaw.json > .config-hash && chown sandbox:sandbox openclaw.json .config-hash && chmod 660 openclaw.json .config-hash'
```

Check `/tmp/gateway.log` after upload and confirm the gateway hot-reloaded the provider or `agents.list` change.
Expand All @@ -80,7 +79,7 @@ Use the same provider ID that appears in `models.providers`, such as `nvidia-omn
After uploading the auth profile, make sure the sub-agent directory is owned by the sandbox user:

```console
$ docker exec "$DOCKER_CTR" kubectl exec -n openshell "$SANDBOX" -c agent -- chown -R sandbox:sandbox /sandbox/.openclaw/agents/vision-operator
$ docker exec --user root "$SANDBOX_CTR" chown -R sandbox:sandbox /sandbox/.openclaw/agents/vision-operator
```

## Allow Auxiliary Provider Egress
Expand Down
Loading