Skip to content

fix(compose): forward AGENTGLOB_RUNTIME_URL and AGENTGLOB_RUNTIME_TOKEN to containers - #23

Open
cryptolir wants to merge 1 commit into
mainfrom
fix/compose-runtime-env-passthrough
Open

cryptolir wants to merge 1 commit into
mainfrom
fix/compose-runtime-env-passthrough

Conversation

@cryptolir

Copy link
Copy Markdown
Owner

Summary

The dashboard deploy route writes AGENTGLOB_RUNTIME_URL and AGENTGLOB_RUNTIME_TOKEN to each agent's per-agent docker.env (so docker-compose can substitute them), but the compose file did not list them in the environment: section of either service. Both vars were silently empty inside running agent containers.

This broke wallet/Rain runtime skills end to end:

  • The openclaw skills pipeline filters skills via metadata.requires.env (config-eval.ts line 85)
  • wallet skill's frontmatter requires both vars, so the env check failed at startup
  • The skill was stripped from <available_skills> — agents had no way to discover the runtime API
  • Agents fell back to general-knowledge guesses about WALLET_PRIVATE_KEY and cast

Verified

Patched both prod servers (US 5.161.84.219 + EU 89.167.70.46) with the equivalent change, recreated the raingame container, and confirmed:

$ docker exec raingame-openclaw-gateway-1 sh -c 'printenv AGENTGLOB_RUNTIME_URL'
https://app.agentglob.com

$ docker exec raingame-openclaw-gateway-1 sh -c \
    'curl -sS -H "Authorization: Bearer $AGENTGLOB_RUNTIME_TOKEN" \
       "$AGENTGLOB_RUNTIME_URL/api/runtime/wallet/balance?chain=arbitrum"'
{"ok":true,"chain":"arbitrum","address":"0x5be5...DDD48",
 "token":"ETH","decimals":18,"raw":"4984116129626000",
 "formatted":"0.004984116129626"}

All four chains return funded balances from inside the container.

Notes

  • Both vars use :- defaults so non-runtime agents (no wallet/rain) deploy without errors
  • Once this lands and the openclaw image is rebuilt + redeployed, the manual prod-server patches can be removed (the in-repo compose file becomes the source of truth again)
  • Discovered during Claude review of openclaw-dashboard#75

…EN to containers

The dashboard deploy route writes both vars to the per-agent docker.env so
docker-compose can substitute them, but the compose file did not list them
in the environment: section of either service. As a result, both vars were
silently empty inside running agent containers.

This broke wallet/Rain runtime skills end to end: the openclaw skills
pipeline filters skills via metadata.requires.env (config-eval.ts), so the
wallet skills required env check failed at startup and the skill was
stripped from the available_skills XML block. Agents had no way to
discover the runtime API and fell back to general-knowledge guesses about
WALLET_PRIVATE_KEY and cast.

Forwarding both vars (with :- defaults so non-runtime agents do not error)
makes the runtime skills visible whenever the dashboard injects credentials.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant