Skip to content

A guide runs Loom beside Agent Substrate, with each actor's token injected by the egress gateway - #639

Merged
zlareb1 merged 10 commits into
mainfrom
docs/agent-substrate
Nov 13, 2026
Merged

zlareb1 merged 10 commits into
mainfrom
docs/agent-substrate

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

A guide runs Loom in the same Kubernetes cluster as Agent Substrate: each sandboxed agent reaches Loom's MCP endpoint through Substrate's egress gateway, which adds that agent's Loom token to every request.

Why

Agent Substrate runs agents as sandboxed actors on Kubernetes, with egress denied by default and credentials injected by its egress gateway. Those two features are what an agent needs to use Loom safely: an egress rule that allows Loom's Service and nothing else, and a per-agent token the actor never holds. The guide composes Substrate's documented features with Loom's Helm chart and per-agent tokens.

Facts taken from Substrate's documentation and source at tag v1.0.0 (docs/reference/kubectl-ate.md, docs/reference/api-guide.md, docs/guides/egress-traffic.md, docs/guides/egress-credential-injection.md, docs/guides/observability.md, docs/guides/egress-trust-bundle.md, api/ateapi/v1/ateapi.proto), each checked against the tagged files:

  • Actors and their templates live in Substrate's control plane and are managed with kubectl ate; the egress policy is per actor (one, named default), created with kubectl ate create egress-policy, and denies everything it does not allow.
  • effects.replaceHeaders with credentialUri: ate-secret://k8s.io/default/<namespace>/<secret>/<key> replaces a header the actor sends; a request without the header goes out unchanged, and a missing Secret or grant is refused. The credential provider reads only namespaces the atespace is granted in k8s-credential-provider-namespace-policy.
  • On an http rule the gateway does not originate TLS, so the token crosses the gateway-to-Loom hop in cleartext; the page says so.
  • kubectl ate update egress-policy replaces all rules and needs the current policy's metadata (docs/reference/kubectl-ate.md, "Egress Policies"); an https rule needs the egress trust bundle mounted in the actor (egress-trust-bundle.md).
  • The credential provider grants an atespace whole namespaces (allowedNamespaces), so the page gives each atespace a token namespace of its own; a shared one would let any granted atespace inject another atespace's agent token.
  • The Kubernetes credential provider reads the Secret on every request (cmd/credential-provider/kubernetes-secrets/kubeprovider.go, a Secrets().Get per call), so replacing the Secret rotates a token without a restart.
  • Actor container environment takes literal values only, so a token there would sit in the template and its snapshots; the page keeps it in the egress rule instead.
  • Connections reach Loom from the atenet-egress pods in ate-system. The chart's NetworkPolicy admits any source while ingressFrom is empty; the page says to add the gateway to a list that is set, since a set list replaces the default.

Substrate documents no MCP-client configuration; the page's client entry is Loom's own (/mcp with a placeholder header) and links the MCP clients page for each client's key names.

Scope and risk

One new docs page, a row on the integrations index, and the llms.txt line docs_reference.py generates for it. No code.

The page is marked untested against a live cluster: Substrate needs Kubernetes 1.37 or later and a gVisor or microVM runtime, which the machine this was written on cannot run. Each Substrate step is from Substrate's own docs; the combination (an http rule with header injection to an in-cluster Service) has not been run end to end.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: reverting removes the page.

Tests

  • tests/unit/test_doc_links.py, test_public_copy.py, test_published_links.py: pass.
  • make format lint; the prose checker on the page. A docs-only change: the unit and integration suites were left to CI.
  • Not run: the guide on a live Substrate cluster (see Scope and risk).

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. Checked: each Substrate command and field against Substrate's v1.0.0 docs and source, and the Loom parts against the Helm chart and token docs.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed. (format and lint run locally; a docs-only change, the rest in CI)
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/reference/ tables (python scripts/codegen/docs_reference.py), the reach manifest, schemas/schema.sql (make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

…ected by the egress gateway

The page installs Loom with the Helm chart, mints a token per agent into a per-atespace Secret namespace, and gives each actor an egress policy that allows Loom's Service and replaces the Authorization header with that token, so no token sits in a template or snapshot. Marked as not run end to end on a live cluster.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 force-pushed the docs/agent-substrate branch from f8d2af9 to 550ee54 Compare November 13, 2026 17:50
zlareb1 and others added 9 commits November 13, 2026 17:57
The MCP client step comes before the policy and ends by creating the actor from its template; the policy step ends by resuming it. The ConfigMap fragment shows its data key, and the grant sentence names what is granted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…trust bundle

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ider after a rotation

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Substrate's Kubernetes credential provider reads the Secret on each request (v1.0.0 kubeprovider.go), so a rotation needs no restart; the page gives the replace command, says which field tells actors apart, and words the template requirements as requirements.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 9fbdb0f into main Nov 13, 2026
44 checks passed
@zlareb1
zlareb1 deleted the docs/agent-substrate branch November 13, 2026 19:20
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