Skip to content

Commit d360101

Browse files
LightHeartclaude
andcommitted
Merge origin/main — resolve README conflicts
Keep methodology framing while incorporating from main: - COLLECTIVE.md reference and component table in intro - Guardian section in reference implementation - Bigger Picture diagram, extra Quick Start options, Further Reading - Combined closing tagline with Collective reference Co-Authored-By: Claude Opus 4.6 <[email protected]>
2 parents 211854f + 8798794 commit d360101

12 files changed

Lines changed: 2839 additions & 1 deletion

COLLECTIVE.md

Lines changed: 417 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,27 @@ enough to accumulate state. The remaining 30% is a reference implementation
1414
using [OpenClaw](https://openclaw.io) and vLLM that demonstrates the patterns
1515
concretely.
1616

17+
This is the infrastructure layer of a proven multi-agent architecture — the
18+
[OpenClaw Collective](COLLECTIVE.md) — where 3 AI agents coordinate
19+
autonomously on shared projects using local GPU hardware. The companion
20+
repository **Android-Labs** (private) is the proof of work: 3,464 commits from
21+
3 agents over 8 days, producing three shipping products and 50+ technical
22+
research documents. These tools kept them running.
23+
1724
**Start here:** [docs/PHILOSOPHY.md](docs/PHILOSOPHY.md) — the conceptual
1825
foundation, five pillars, complete failure taxonomy, and a reading map based on
1926
what you're building.
2027

28+
| Component | What it does | Requires OpenClaw? | Platform |
29+
|-----------|-------------|-------------------|----------|
30+
| [Session Watchdog](#session-watchdog) | Auto-cleans bloated sessions before context overflow | Yes | Linux, Windows |
31+
| [vLLM Tool Call Proxy](#vllm-tool-call-proxy-v4) | Makes local model tool calling work | Yes | Linux |
32+
| [Token Spy](#token-spy--api-cost--usage-monitor) | API cost monitoring with real-time dashboard | No (any OpenAI/Anthropic client) | Linux |
33+
| [Guardian](#guardian) | Self-healing process watchdog with backup restore | No (any Linux services) | Linux (root) |
34+
| [Memory Shepherd](#memory-shepherd) | Periodic memory reset to prevent agent drift | No (any markdown-based agent memory) | Linux |
35+
| [Golden Configs](#golden-configs) | Working config templates for OpenClaw + vLLM | Yes | Any |
36+
| [Workspace Templates](#workspace-templates) | Agent personality/identity starter files | Yes | Any |
37+
2138
---
2239

2340
## What's Inside
@@ -59,6 +76,13 @@ scratch notes and restores MEMORY.md to a curated baseline on a schedule.
5976
Defines the `---` separator convention: operator-controlled identity above,
6077
agent scratch space below.
6178

79+
**Guardian** — Self-healing process watchdog for LLM infrastructure. Runs as a
80+
root systemd service that agents cannot kill or modify. Monitors processes,
81+
systemd services, Docker containers, and file integrity — automatically
82+
restoring from known-good backups when things break. Supports tiered health
83+
checks, recovery cascades, and generational backups. See
84+
[guardian/README.md](guardian/README.md) for full documentation.
85+
6286
**Golden Configs** — Battle-tested `openclaw.json` and `models.json` with the
6387
critical `compat` block that prevents silent failures. Workspace templates for
6488
agent personality, identity, tools, and working memory.
@@ -69,6 +93,39 @@ See [ARCHITECTURE.md](docs/ARCHITECTURE.md) and [SETUP.md](docs/SETUP.md).
6993

7094
---
7195

96+
## The Bigger Picture
97+
98+
These tools were extracted from a running multi-agent system — the [OpenClaw Collective](COLLECTIVE.md) — where AI agents coordinate autonomously on long-term projects. Here's how each component fits:
99+
100+
```
101+
┌─────────────────────────────────────────────────────────┐
102+
│ Mission Governance (MISSIONS.md) │
103+
│ Constrains what agents work on │
104+
├─────────────────────────────────────────────────────────┤
105+
│ Deterministic Supervisor (Android-18) │
106+
│ Timed pings, session resets, accountability │
107+
├──────────────┬──────────────┬───────────────────────────┤
108+
│ Session │ Memory │ Infrastructure │
109+
│ Watchdog │ Shepherd │ Guardian │
110+
│ + Token Spy │ │ │
111+
│ │ │ │
112+
│ Context │ Identity │ Process monitoring, │
113+
│ overflow │ drift │ file integrity, │
114+
│ prevention │ prevention │ auto-restore │
115+
├──────────────┴──────────────┴───────────────────────────┤
116+
│ Workspace Templates (SOUL, IDENTITY, │
117+
│ TOOLS, MEMORY) — Persistent agent identity │
118+
├─────────────────────────────────────────────────────────┤
119+
│ vLLM Tool Proxy + Golden Configs — Local inference │
120+
└─────────────────────────────────────────────────────────┘
121+
```
122+
123+
For the full architecture: **[COLLECTIVE.md](COLLECTIVE.md)**
124+
For transferable patterns applicable to any agent framework: **[docs/PATTERNS.md](docs/PATTERNS.md)**
125+
For the rationale behind every design choice: **[docs/DESIGN-DECISIONS.md](docs/DESIGN-DECISIONS.md)**
126+
127+
---
128+
72129
## Quick Start
73130

74131
### Option 1: Full Install (Session Cleanup + Proxy)
@@ -125,6 +182,29 @@ export VLLM_API_KEY=vllm-local
125182
openclaw agent --local --agent main -m 'What is 2+2?'
126183
```
127184

185+
### Option 4: Guardian (Process Watchdog)
186+
187+
Works with any Linux service stack — not OpenClaw-specific. See [guardian/README.md](guardian/README.md) for full docs.
188+
189+
```bash
190+
cd guardian
191+
cp guardian.conf.example guardian.conf
192+
nano guardian.conf # Define your monitored resources
193+
nano guardian.service # Add your paths to ReadWritePaths
194+
sudo ./install.sh # Installs to systemd as root service
195+
```
196+
197+
### Option 5: Memory Shepherd (Memory Reset)
198+
199+
Works with any agent that uses markdown memory files. See [memory-shepherd/README.md](memory-shepherd/README.md) for full docs.
200+
201+
```bash
202+
cd memory-shepherd
203+
cp memory-shepherd.conf.example memory-shepherd.conf
204+
nano memory-shepherd.conf # Define your agents and baselines
205+
sudo ./install.sh # Installs as systemd timer
206+
```
207+
128208
---
129209

130210
## Configuration
@@ -295,6 +375,14 @@ LightHeart-OpenClaw/
295375
│ ├── baselines/ # Baseline MEMORY.md templates
296376
│ └── docs/
297377
│ └── WRITING-BASELINES.md # Guide to writing effective baselines
378+
├── guardian/ # Self-healing process watchdog
379+
│ ├── guardian.sh # Config-driven watchdog script
380+
│ ├── guardian.conf.example # Sanitized example config
381+
│ ├── guardian.service # Systemd unit template
382+
│ ├── install.sh # Installer (systemd + immutable flags)
383+
│ ├── uninstall.sh # Uninstaller
384+
│ └── docs/
385+
│ └── HEALTH-CHECKS.md # Health check & recovery reference
298386
├── docs/
299387
│ ├── PHILOSOPHY.md # Start here — pillars, failures, reading map
300388
│ ├── SETUP.md # Full local setup guide
@@ -370,10 +458,20 @@ See [docs/SETUP.md](docs/SETUP.md) for the full troubleshooting guide. Quick hit
370458

371459
---
372460

461+
## Further Reading
462+
463+
- **[COLLECTIVE.md](COLLECTIVE.md)** — Full architecture of the multi-agent system this toolkit powers
464+
- **[docs/DESIGN-DECISIONS.md](docs/DESIGN-DECISIONS.md)** — Why we made the choices we did: session limits, ping cycles, deterministic supervision, and more
465+
- **[docs/PATTERNS.md](docs/PATTERNS.md)** — Six transferable patterns for autonomous agent systems, applicable to any framework
466+
- **[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)** — Deep dive on the vLLM Tool Call Proxy internals
467+
- **Android-Labs** (private) — Proof of work: 3,464 commits from 3 AI agents in 8 days
468+
469+
---
470+
373471
## License
374472

375473
Apache 2.0 — see [LICENSE](LICENSE)
376474

377475
---
378476

379-
Built from production experience by [Lightheart Labs](https://github.com/Light-Heart-Labs) and their AI agent team. The patterns were discovered by the agents. The docs were written by the agents. The lessons were learned the hard way.
477+
Built from production experience by [Lightheart Labs](https://github.com/Light-Heart-Labs) and the [OpenClaw Collective](COLLECTIVE.md). The patterns were discovered by the agents. The docs were written by the agents. The lessons were learned the hard way.

docs/ARCHITECTURE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Architecture — How It All Fits Together
22

3+
> **Scope:** This document covers the internal architecture of the vLLM Tool Call Proxy. For the architecture of the full multi-agent system this proxy serves, see [COLLECTIVE.md](../COLLECTIVE.md). For transferable patterns applicable to any agent framework, see [PATTERNS.md](PATTERNS.md).
4+
35
## The Problem
46

57
OpenClaw can't talk directly to vLLM for tool-calling tasks because of three

0 commit comments

Comments
 (0)