ClawPy: Minimal Single-File Python Implementation of OpenClaw with Experience Memory

What This Is
ClawPy is a minimal, single-file Python implementation of OpenClaw's autonomous task execution architecture. It runs directly in the terminal without heavy abstractions, focusing on raw prompt engineering, state machine logic, and subprocess execution.
Key Implementation Details
The script mirrors OpenClaw's core mechanics:
- Recursive Task Tree: Maintains a
tasks.txtstate file that tracks incomplete tasks. The system reads this file, decides whether to execute tasks directly or decompose them (up to 4 levels deep), and automatically bubbles up "Completed" status. - Code Interpreter & Self-Healing: Uses custom XML tags (
<python>) to write and run scripts locally. When execution hits a traceback, it catches thestderr, forces an<error>reflection tag to analyze the bug, and rewrites the code until it achieves Return Code 0. - Experience Memory System: Every time the agent successfully executes a script (explained via
<msg>tags) or reflects on a crash (<error>), it appends that insight to anexperience.txtfile. When booted up again, the system injects truncated history of past mistakes and successes into the system prompt, preventing repetition of syntax or logical errors.
Practical Use Cases
The developer built this for two main audiences:
- People who want to learn exactly how the autonomous loop works under the hood without diving into a massive codebase
- Data analysts and quants who want a lightweight agent to write and fix Pandas/financial scripts in their local environment
Important Security Note: The tool runs generated Python code directly on your machine, so the developer recommends running it in a safe environment or virtual machine.
The project is available on GitHub at https://github.com/EricChanBank/clawPy.git.
📖 Read the full source: r/openclaw
👀 See Also

Adeu v1.4: Open-Source MCP for Track Changes in DOCX
Adeu v1.4 surgically injects native OOXML redlines into DOCX files, preserving formatting, numbering, and layouts. Adds footnotes/endnotes inline editing, defined term linting, cross-reference maps, and multi-level list round-tripping.

Introducing operate.txt: A YAML spec for AI agents navigating SaaS products
A developer created operate.txt, a YAML file hosted at yourdomain.com/operate.txt that documents screen details, loading states, irreversible actions, and step-by-step paths for AI agents using computer use features. The spec addresses issues like Claude asking 'is this broken?' during legitimate loading screens.

Hypura: Storage-tier-aware LLM inference scheduler for Apple Silicon
Hypura is a Rust-based inference scheduler that places model tensors across GPU, RAM, and NVMe tiers to run models exceeding physical memory on Apple Silicon Macs. It enables running a 31GB Mixtral 8x7B on a 32GB Mac Mini at 2.2 tok/s and a 40GB Llama 70B at 0.3 tok/s where vanilla llama.cpp crashes.

Claude Code Plugin /verify: Automated Browser Testing from Your Plan
/verify is an open-source Claude Code plugin that reads your plan, spins up a real browser via Playwright MCP, checks each requirement, and gives you a pass/fail report with screenshots.