Skip to content

openclaw substrate support - #1939

Merged
EItanya merged 35 commits into
mainfrom
peterj/substrate
Jun 3, 2026
Merged

EItanya merged 35 commits into
mainfrom
peterj/substrate

Conversation

@peterj

@peterj peterj commented May 27, 2026

Copy link
Copy Markdown
Collaborator

support running openclaw on substrate.

Copilot AI review requested due to automatic review settings May 27, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Agent Substrate as a new runtime option for OpenClaw/NemoClaw AgentHarnesses, alongside the existing OpenShell flow. The PR introduces new CRD/API fields, controller/provisioning logic for Substrate WorkerPool/ActorTemplate/Actor lifecycle, a kagent gateway proxy for OpenClaw UI traffic, Helm wiring/RBAC, UI form/list updates, and example documentation.

Changes:

  • Adds spec.runtime=substrate and spec.substrate configuration/status support for AgentHarness resources.
  • Implements Substrate backend/provisioner logic, shared OpenClaw bootstrap generation, and HTTP/WebSocket gateway proxying to actor pods.
  • Updates UI, Helm chart, CRDs, examples, and Go module dependencies to expose and deploy the new runtime.

Reviewed changes

Copilot reviewed 63 out of 67 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
ui/src/types/index.ts Adds Substrate harness response shape to UI types.
ui/src/lib/openshellSandboxAgents.ts Adds helpers for identifying Substrate harness rows.
ui/src/lib/openClawSandboxForm.ts Extends harness form draft generation with runtime and Substrate fields.
ui/src/lib/agentHarness.ts Generalizes harness helpers across OpenShell/Substrate runtimes.
ui/src/components/AgentListView.tsx Routes Substrate harness chat/action links to the gateway path.
ui/src/components/AgentCard.tsx Shows runtime context and links Substrate harnesses to gateway UI.
ui/src/components/agent-form/OpenClawSandboxFields.tsx Adds runtime selection and Substrate-specific form inputs.
ui/src/app/openshell/OpenshellTerminalPage.tsx Refactors terminal reconnect/autoconnect handling and messaging.
ui/next.config.ts Adds local-development /api rewrite to the controller.
helm/kagent/values.yaml Adds Substrate controller values and oauth2-proxy gateway skip-auth regex.
helm/kagent/templates/rbac/getter-role.yaml Grants controller RBAC for Substrate CRDs.
helm/kagent/templates/controller-deployment.yaml Wires Substrate Helm values into controller environment variables.
helm/kagent-crds/templates/kagent.dev_agentharnesses.yaml Regenerates Helm CRD with runtime/substrate fields.
go/go.mod Adds Substrate module dependency and related version updates.
go/go.sum Adds checksums for new/updated Go dependencies.
go/core/pkg/sandboxbackend/substrate/* Adds Substrate backend, ate-api client, provisioning, deletion, gateway-token, startup template, and tests.
go/core/pkg/sandboxbackend/openshell/* Updates OpenShell imports to use the shared OpenClaw package.
go/core/pkg/sandboxbackend/openclaw/* Moves/refactors shared OpenClaw bootstrap, policy, channels, credentials, and model config logic.
go/core/pkg/app/app.go Registers Substrate scheme, flags, backend/provisioner construction, and gateway config.
go/core/internal/httpserver/server.go Adds AgentHarness gateway route and WebSocket auth-query handling.
go/core/internal/httpserver/middleware.go Excludes gateway proxy paths from forced JSON content type.
go/core/internal/httpserver/handlers/handlers.go Passes gateway configuration into handlers.
go/core/internal/httpserver/handlers/agents.go Emits Substrate harness list entries in agent responses.
go/core/internal/httpserver/handlers/agentharness_gateway.go Adds HTTP/WebSocket reverse proxy for Substrate OpenClaw gateway UI.
go/core/internal/httpserver/handlers/agentharness_gateway*_test.go Adds gateway proxy/path behavior tests.
go/core/internal/controller/agentharness_controller.go Dispatches AgentHarness reconciliation by runtime and integrates Substrate provisioning/deletion.
go/api/v1alpha2/agentharness_types.go Adds runtime, substrate spec/status, and CRD printer column definitions.
go/api/v1alpha2/zz_generated.deepcopy.go Regenerates deepcopy methods for new AgentHarness fields.
go/api/httpapi/types.go Adds Substrate harness response DTOs.
go/api/config/crd/bases/kagent.dev_agentharnesses.yaml Regenerates base CRD with runtime/substrate schema.
examples/substrate-openclaw/README.md Documents local Substrate/OpenClaw setup and harness usage.
Files not reviewed (1)
  • go/api/v1alpha2/zz_generated.deepcopy.go: Language not supported
Comments suppressed due to low confidence (1)

go/core/pkg/sandboxbackend/openclaw/modelconfig.go:40

  • This SecretKeyRef only contains the secret name, so it will be resolved in the ActorTemplate/actor namespace. modelConfigRef can point at a ModelConfig in another namespace, and the existing OpenShell path reads the API key Secret from mc.Namespace; in that case substrate actors will look for the secret in the wrong namespace. Either reject cross-namespace ModelConfigs for substrate with a clear error or copy/reference credentials in the harness namespace before creating the ActorTemplate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/src/lib/openClawSandboxForm.ts Resolved
Comment thread helm/kagent/values.yaml Resolved
@peterj
peterj force-pushed the peterj/substrate branch from eb6a487 to 25bf681 Compare May 27, 2026 18:19
@chromatic-com

chromatic-com Bot commented May 27, 2026 •

Copy link
Copy Markdown

Tip

All tests passed and all changes approved!

🟢 UI Tests: 10 visual and accessibility changes accepted as baselines
🟢 UI Review: Approved by Peter Jausovec
Storybook icon Storybook Publish: 134 stories published

Comment on lines +51 to +56
type AgentHarnessSubstrateSnapshotsConfig struct {
// Location is the GCS URI prefix for golden and incremental snapshots.
// Example: gs://ate-snapshots/kagent/my-namespace/my-harness/
// +required
Location string `json:"location"`
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

substrate usually deploys with an instance of rustfs, how can the user specify that for snapshots?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it comes down to the way substrate is installed. with the kind installation it automatically deploys rustfs and points atelet to it.

Comment thread go/api/v1alpha2/agentharness_types.go Resolved
Comment thread go/api/v1alpha2/agentharness_types.go Resolved
Comment thread go/api/v1alpha2/agentharness_types.go Resolved
Comment thread go/api/v1alpha2/agentharness_types.go Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code only for substrate or also for openshell, I'm a little confused what the difference is

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is substrate only. we don't have a way to ssh into the workload as we have in openshell; so, instead we're launching into the openclaw UI.

@peterj
peterj force-pushed the peterj/substrate branch from c4ffeed to a161e7e Compare June 1, 2026 17:37
@peterj

peterj commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in 59959395.

Copilot finished work on behalf of peterj June 1, 2026 17:46
@EItanya
EItanya force-pushed the peterj/substrate branch from 5995939 to c4bfce5 Compare June 1, 2026 19:58
@EItanya
EItanya force-pushed the peterj/substrate branch from c4bfce5 to 4d379f1 Compare June 1, 2026 20:07
peterj added 7 commits June 1, 2026 14:16
Signed-off-by: Peter Jausovec <[email protected]>
…peterj/substrate

* 'peterj/substrate' of github.com:kagent-dev/kagent:
  Fix AgentHarness CI failures
  Split AgentHarness controllers by runtime
  Simplify substrate actor cleanup wiring
  Refine substrate AgentHarness lifecycle
  fix failing helm unit tests
  commenting out the substrate section in values
  move write ops to writer-role
  make linter happy
  pr feedback
  move startup script to a template
  split substrate and openshell, use the secrets in substrate fork for modelconfig/channels
  clean up ui/gateway stuff (use base path from openclaw)
  fix up the optional/non-optional types in the crd/values file
  substrate wip
  fix(compaction): preserve namespaced tool names in LLM summarizer prompt (#1907)
  Fix/1945 fix for wrong validation being triggered (#1946)
  fix(security): replace shell-templated skills-init with Go binary (#1842) (#1928)

Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
@EItanya
EItanya merged commit a558120 into main Jun 3, 2026
24 checks passed
@EItanya
EItanya deleted the peterj/substrate branch June 3, 2026 13:55
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
kagent 0.9.6

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre><!-- Release notes generated using configuration in .github/release.yml at v0.9.6 -->

## What's Changed
### Features
* feat(mcp): expose agents as MCP resource with change notifications by @onematchfox in kagent-dev/kagent#1856
* feat(adk): propagate parent + root context_id headers on outbound A2A calls by @Prefix in kagent-dev/kagent#1927
### Bug Fixes
* fix(compaction): preserve namespaced tool names in LLM summarizer prompt by @yashrajshuklaaa in kagent-dev/kagent#1907
* fix: preserve Ollama streaming tool calls by @andreivince in kagent-dev/kagent#1948
* fix(bedrock): preserve thinking blocks in multi-turn tool use by @mesutoezdil in kagent-dev/kagent#1873
* fix(translator): forward Anthropic config fields to model config by @mesutoezdil in kagent-dev/kagent#1962
* fix(openai): apply ReasoningEffort in applyOpenAIConfig by @mesutoezdil in kagent-dev/kagent#1959
* fix(mcp): handle null tools field in MCP server configs by @mesutoezdil in kagent-dev/kagent#1960
### Documentation
* docs(api): add field descriptions for BYO agent spec by @marians in kagent-dev/kagent#1969
### Other Changes
* Fix/1945 fix for wrong validation being triggered by @gauravshinde1729 in kagent-dev/kagent#1946
* openclaw substrate support  by @peterj in kagent-dev/kagent#1939
* chore(deps): bump the npm-minor-patch group in /ui with 14 updates by @dependabot[bot] in kagent-dev/kagent#1951
* Link fixes by @kristin-kronstain-brown in kagent-dev/kagent#1950
* RemoteMCPServer TLS + companion-Secret API + plaintext egress rewrite by @iplay88keys in kagent-dev/kagent#1905

## New Contributors
* @yashrajshuklaaa made their first contribution in kagent-dev/kagent#1907
* @andreivince made their first contribution in kagent-dev/kagent#1948
* @kristin-kronstain-brown made their first contribution in kagent-dev/kagent#1950
* @Prefix made their first contribution in kagent-dev/kagent#1927
* @marians made their first contribution in kagent-dev/kagent#1969

**Full Changelog**: https://github.com/kagent-dev/kagent/compare/v0.9.5...v0.9.6</pre>
  <p>View the full release notes at <a href="https://github.com/kagent-dev/kagent/releases/tag/v0.9.6">https://github.com/kagent-dev/kagent/releases/tag/v0.9.6</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!10637
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.

4 participants