Collection of production-ready solutions and patterns developed while working with OpenClaw AI agents.
This repository documents real solutions to real problems encountered during OpenClaw development and deployment. Each solution is battle-tested, documented, and ready to use.
𧬠Agent Editor
Problem: Need a web-based UI to edit agent configuration files (SOUL.md, USER.md, MEMORY.md) directly from the Hub dashboard.
Solution: Dark-themed, responsive editor with agent browser, file navigator, live validation, and safety confirmations.
Key Features:
- Agent browser with real-time status
- File navigator with existence indicators
- Code editor with live saving
- Auto-refresh every 30 seconds
- Safety confirmation for SOUL.md edits
- Mobile-responsive design
Status: β Production | Impact: Instant agent configuration updates, real-time collaboration
Problem: Agent memory files (MEMORY.md, daily logs) grow beyond LLM context limits, causing read errors and session failures.
Solution: Automated lifecycle management using Git hooks and scheduled audits to prevent memory bloat.
Key Features:
- Pre-commit validation (blocks >30KB MEMORY.md)
- Daily automated audits via cron
- Automatic incident archival (>30 days)
- Detailed logging and Telegram alerts
Status: β Production | Impact: 40% memory reduction, zero read errors
π Update Dashboard
Problem: Need visibility of Git sync status across multiple OpenClaw agent workspaces.
Solution: Single-page dashboard showing real-time update status for all agents.
Key Features:
- Visual Git status (up-to-date, conflicts, pending updates)
- Auto-refresh every 30 seconds
- No backend required (client-side checks)
- Clean, responsive UI
Status: β Production | Impact: Instant visibility, faster deployments
Problem: Managing agent quality metrics and tasks across multiple agents without centralized visibility.
Solution: Integrated system combining quality monitoring and visual task management.
Key Features:
- Real-time quality metrics (tokens, errors, audit stats)
- Kanban board for task tracking
- Automated data collection scripts
- Historical trend analysis
Status: β Production | Impact: Proactive issue detection, organized workflow
π° Cost Tracker
Problem: No visibility into Claude API costs across agents; difficulty identifying optimization opportunities.
Solution: Passive API usage tracker with heuristic request classification and cost breakdown by agent/model.
Key Features:
- Automatic request classification (LOCAL_VIABLE, NEEDS_CLAUDE, EDGE_CASE)
- Interactive dashboard with cost breakdown by agent/model
- Weekly reports with optimization recommendations
- Daily metrics export
Status: β Production | Impact: Data-driven cost optimization
βοΈ Agents Config
Problem: Hardcoded agent maps in Hub dashboards fall out of sync with the real openclaw.json config β dead agents appear, new agents are missing.
Solution: Web panel showing all agents with name, emoji, model, and integrations. Lessons on keeping JS maps in sync with live config.
Key Features:
- Lists all active agents with emoji, model, and integration info
- Pattern for detecting stale/dead agent entries
- Safe add/remove workflow for keeping dashboards accurate
Status: β Production | Impact: Accurate agent visibility, no stale UI entries
π MCP Google Workspace
Problem: Google Workspace MCP reports "healthy" via mcporter list even when OAuth token is expired β agents fail silently with invalid_grant.
Solution: Documented the failure pattern, correct diagnosis steps, and fix procedure.
Key Features:
- Root cause:
healthyin mcporter β valid auth token - Correct diagnostic: make a real API call, not just list tools
- Fix:
mcporter auth google-workspace --reset - Prevention: include a live test call in health checks
Status: β Documented | Impact: Faster diagnosis, no more silent auth failures
π¬ Hub Chat
Problem: Internal multi-agent chat hub needed clean agent name parsing and real-time messaging.
Solution: Chat UI wired to agent sessions with IDENTITY.md parser that strips markdown formatting (bold markers, emoji normalization).
Key Features:
- Real-time messaging via SSE
- Agent selector with identity parsing
- Bug fix:
**stripped from names before display - Dark theme, mobile-friendly
Status: β Production | Impact: Clean agent names, stable chat sessions
π Iris Contact System
Problem: Agents need a structured, extensible system to manage and query contact information with rich metadata (roles, access levels, medical history, organizational context).
Solution: JSONL-based contact database with a robust bash management tool for add/edit/get/list operations, safe backups, and JSON validation.
Key Features:
- JSONL format (compatible with jq, Python, Node.js, databases)
- Rich contact schema: roles, access levels, context preferences, metadata
- Bash management tool (
contact-update) with safe edits and auto-backups - Medical context support (allergies, diagnoses, medications in notes)
- Multi-agent integration ready (shared file, reusable patterns)
Status: β Production | Impact: Structured contact management, supports medical context, easy agent integration
π SimCert β Certificate Generator (separate repo)
Problem: SimAcademy and Asesores en Emergencias needed a way to issue verifiable PDF certificates for courses β without Moodle or paid SaaS.
Solution: Standalone Node.js microservice with PDF generation, public verification via QR, and a full admin web panel.
Key Features:
- Rasterization-based PDF engine: overlays participant data pixel-perfect on any PDF template
- Public verification at
https://verify.medexpert.mx/verify/{hash}(Cloudflare Tunnel β Pi) - Admin panel at
https://cert.medexpert.mxwith multi-user auth (admin/emisor roles) - Batch generation from CSV or paste from Google Sheets
- Certificate preview before batch emit
- Email delivery via SMTP
- SQLite β zero-config, β€50 certs/month target
Tech Stack: Node.js + Express + better-sqlite3 + pdf-lib + Pillow (Python rasterizer) + express-session
Deployment: Raspberry Pi (ARM64) behind Cloudflare Tunnel. No additional infrastructure cost.
Status: β Production (2026-03-18) | Impact: Full cert lifecycle, verifiable by anyone with the URL
| Machine | Tailscale IP | Role |
|---|---|---|
| Raspberry Pi (main) | 100.71.128.102 |
Hub, cert-server, contact manager, all agents |
| Mac Mini M1 | 100.107.30.22 |
Cloudflare Tunnel, Python API (api.medexpert.mx) |
| Agent | Model | Role |
|---|---|---|
| PM | Haiku | Coordinator, Telegram interface |
| CHAPPiE | Sonnet | Developer, QA, cert-server, Hub |
| Phoenix | Sonnet | Branding, landing pages |
| Iris Assistant | Haiku | WhatsApp assistant |
| Iris Med | Sonnet | Medical assistant |
| Atlas | Haiku | Research, web search |
| Argus | Haiku | Log monitoring, Kanban QA |
| Quill | Sonnet | Document generation |
| Echo | Haiku | Memory coordination |
| Service | Port | systemd unit |
|---|---|---|
| Hub | 8080 | oc-hub.service |
| Contact Manager | 3335 | contacts-manager.service |
| SimCert | 4000 | simcert.service |
| Subdomain | Target | Notes |
|---|---|---|
medexpert.mx |
GitHub Pages | Main site β do not touch |
api.medexpert.mx |
Mac Mini :8081 | Python API |
verify.medexpert.mx |
Pi :4000 | Public cert verification |
cert.medexpert.mx |
Pi :4000 | SimCert admin panel (auth required) |
All tunnels via Cloudflare (
438e66a3-a434-468b-8cb1-7a0565c781d9), config at~/.cloudflared/config.ymlon Mac Mini.
Status: Disabled (2026-02-19). Models removed to free disk. Binary installed at
/usr/local/bin/ollama, service disabled. The Ollama Arena solution in this repo is archived for reference.
Each solution is self-contained with:
- README.md - Problem, solution, usage
- Installation guide - Step-by-step setup
- Configuration - Customization options
- Documentation - Design decisions and lessons learned
Recommended order:
- Start with Agent Editor (day-to-day operations)
- Add Memory Management (foundational β prevents bloat)
- Deploy Update Dashboard (operational visibility)
- Deploy QA Dashboard + Kanban (quality + workflow)
- Add Cost Tracker (API spend visibility)
- Add Agents Config (keep agent dashboards accurate)
- Review MCP Google Workspace (auth failure patterns)
- Deploy SimCert for certificate issuance
These solutions follow core principles:
- β Solve real problems - No theoretical exercises
- β Production-ready - Battle-tested in live environments
- β Well-documented - Explain why, not just how
- β Self-contained - Each solution stands alone
- β Privacy-first - No external dependencies or data leaks
- β Automation-friendly - Git hooks, cron, CI/CD integration
Read each README to understand:
- What problem was encountered
- Why previous approaches failed
- How the solution works
- What was learned
- Clone the repo
- Navigate to the solution you need
- Follow the installation guide
- Customize for your environment
- Deploy and monitor
Found a better approach? Discovered an edge case? PRs welcome!
These solutions work together:
- Memory Management prevents bloat that QA Dashboard would catch
- Update Dashboard shows deployment status affecting all systems
- QA Kanban links quality issues to Memory incidents
- SimCert integrates with the Hub via API-first design
Memory Management:
- MEMORY.md: 50KB β 30KB average
- Read errors: 12/week β 0
- Session failures: -80%
Update Dashboard:
- Deployment time: -50%
- Update conflicts detected: +100%
- Manual checks: -90%
QA Dashboard + Kanban:
- Issues detected: +200% (proactive)
- Resolution time: -40%
- Task visibility: Real-time
SimCert:
- Certificate issuance: manual β automated batch
- Verification: public URL, no login required
- Infrastructure cost: $0 (runs on existing Pi)
- Languages: Bash, Python, JavaScript, Node.js
- Infrastructure: Git hooks, Cron, systemd user services, Cloudflare Tunnel
- Deployment: Local-first (Raspberry Pi), no cloud dependencies
- Integration: OpenClaw Gateway API
All solutions:
- β No external API calls (except documented integrations)
- β No credential storage
- β No sensitive data in repos
- β Local-only by default
- β Audit-friendly
Each solution includes:
- Problem statement
- Solution architecture
- Installation guide
- Usage examples
- Configuration options
- Troubleshooting
- Lessons learned
- Future ideas
Daily Driver: Agent Editor (edit agents in seconds, web UI)
Most Impactful: Memory Management (prevents critical failures)
Easiest to Deploy: Update Dashboard (single HTML file)
Most Complex: SimCert (PDF engine + auth + Cloudflare tunnel)
Best Debugging Reference: MCP Google Workspace (auth failure patterns)
Best ROI: All working together
Potential future solutions:
- Firma digital Nivel 2 en certificados (X.509, visible en Adobe)
- Webhook Moodle β SimCert para emisiΓ³n automΓ‘tica
- Activity Dashboard (metrics de agentes)
- Cross-agent communication patterns
- Skill dependency management
- Agent performance profiling
Contributions welcome! Follow these guidelines:
- Keep solutions self-contained
- Document the problem first
- Include installation guide
- Test in production before submitting
- No sensitive data
MIT License - See LICENSE for details.
Built with β€οΈ by OpenClaw agents:
- CHAPPiE - Agent Editor, Memory Management, Cost Tracker, Agents Config, Hub Chat fixes, SimCert (full stack), MCP patterns, core architecture
- PM - Update Dashboard, QA Dashboard, orchestration
- Argus - QA metrics, monitoring scripts
- Juan Ma - Architecture decisions, product direction, and our humble human π§βπΌ
Questions? Found a bug? Have a better solution?
- Open an issue
- Submit a PR
- Share your learnings
Last Updated: 2026-03-18
Version: 1.2.0
Status: Active development
"The best way to learn is to solve real problems, document them, and share the solutions."