Skip to content

feat: add OpenClaw multiplexing demo#177

Open
Maya Wang (mayawang) wants to merge 2 commits into
mainfrom
feature/openclaw-integration
Open

feat: add OpenClaw multiplexing demo#177
Maya Wang (mayawang) wants to merge 2 commits into
mainfrom
feature/openclaw-integration

Conversation

@mayawang
Copy link
Copy Markdown
Collaborator

@mayawang Maya Wang (mayawang) commented Jun 4, 2026

Overview

This PR introduces a high-fidelity demonstration of Google Claw (v2026.3.14) running on Agent Substrate. It showcases the platform's ability to handle 1.5x hardware oversubscription (3 logical agents on 2 physical pods) while preserving in-memory reasoning state across migration cycles.

Key Features Demonstrated

  • Liquid Hardware: Proactive preemption scheduling that rotates physical pod ownership based on logical task demand.
  • State Rehydration: A stateful taskCounter in the Node.js process memory survives multiple suspend/resume cycles.
  • Framework Agnostic: Demonstrates how a standard TypeScript (Hono)workload can be transformed into a Substrate-aware actor with zero code changes.
  • Interactive Dashboard: A real-time UI for visualizing pod ownership, agent phases, and unified logs.

Migration & Portability

  • The demo is located in demos/openclaw/.
  • It follows the standard Substrate demo structure with ui/ and workload/subfolders.
  • It is a standalone Node.js package with its own package.json and Dockerfile.
  • All Google-internal project IDs and credentials have been replaced with generic placeholders.

Verification

  • Verified on GKE with gVisor (runsc).
  • 100% success rate on state rehydration during 10-task "pulse" stress tests.

Demo Recording

  • Will be added soon.

  • Tests pass

  • Appropriate changes to documentation are included in the PR

@mayawang Maya Wang (mayawang) force-pushed the feature/openclaw-integration branch 3 times, most recently from af8e8cb to a18fcc3 Compare June 4, 2026 01:52
Comment thread demos/openclaw/manifests/actor-template.yaml Outdated
Comment thread demos/openclaw/manifests/demo-ui.yaml Outdated
Comment thread demos/openclaw/manifests/valkey-init.yaml Outdated
Comment thread demos/openclaw/kubectl-ate Outdated
@mayawang Maya Wang (mayawang) force-pushed the feature/openclaw-integration branch from a18fcc3 to 99c2217 Compare June 4, 2026 03:39
console.log(`[ClawAgent] Identity ${this.actorId} initialized.`);
}

public async performTask(durationMs: number) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will we consider to let /task actually invoke a real Google Claw/LLM in the image this PR builds, otherwise the workload is more like a stub rather than a real agent?

// The base path. This is both the path of the root shared folder on the
// host filesystem, and when it is mounted into ateom and atelet containers.
BasePath = "/run/ateom-gvisor"
BasePath = "/var/lib/ateom-gvisor"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this change related to this PR?

- name: run-ateom
hostPath:
path: /run/ateom-gvisor
path: /var/lib/ateom-gvisor
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this change related to this PR? Why are we changing this and NOT calling it out in the PR text? Should we do this in a separate PR and land that first if it is intentional?

Comment thread demos/openclaw/Dockerfile
RUN npm install

# Copy source code
COPY src/ ./src/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this work?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i needed to do

--- a/demos/openclaw/Dockerfile
+++ b/demos/openclaw/Dockerfile
@@ builder stage @@
 # Copy source code
-COPY src/ ./src/
+COPY workload/ ./workload/
+COPY ui/ ./ui/

 # Build zero-dependency bundles
-RUN ./node_modules/.bin/esbuild src/agent.ts \
+RUN ./node_modules/.bin/esbuild workload/agent.ts \
     --bundle --platform=node --target=node22 \
     --outfile=dist/agent.js --external:node:*

-RUN ./node_modules/.bin/esbuild src/demo-ui.ts \
+RUN ./node_modules/.bin/esbuild ui/demo-ui.ts \
     --bundle --platform=node --target=node22 \
     --outfile=dist/demo-ui.js --external:node:*


## **Metadata**
* **Environment**: `http://<YOUR_DASHBOARD_IP>`
* **Logical Identities**: Claw-Luna (Blue 🟦), Claw-Mars (Pink 🟪), Claw-Nova (Gold 🟨)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Who creates these 3 actors? is there a missing script?

Comment thread demos/openclaw/README.md

A high-density demonstration of three stateful **OpenClaw** agents (`Claw-Luna`, `Claw-Mars`, `Claw-Nova`) sharing two physical **Agent Substrate** worker pods. This PoC showcases **Liquid Hardware**: Substrate automatically suspends idle agents and rehydrates them on-demand, allowing a cluster to host significantly more logical agents than physical compute slots.

**Live Demo URL:** [http://136.119.224.22](http://136.119.224.22) (Internal/GCP)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's drop these?

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