AINL + OpenClaw Integration — Fixes Applied (2026-03-29)
Fixed the incomplete AINL integration so that ainl install openclaw works correctly and future users can achieve a complete setup in 3 minutes or less by following the official quickstart guide.
AINL + OpenClaw Integration — Fixes Applied (2026-03-29)
Summary
Fixed the incomplete AINL integration so that ainl install openclaw works correctly and future users can achieve a complete setup in 3 minutes or less by following the official quickstart guide.
Root Cause
The ainl CLI could not import openclaw.bridge modules because the Python path didn't include the AINL repository root when running from the virtual environment. The pyproject.toml included most packages but the openclaw package directory wasn't explicitly listed in the packages.find.include pattern.
Fixes Applied
1. Updated pyproject.toml (AI_Native_Lang/)
Added openclaw and openclaw.* to the include list under [tool.setuptools.packages.find]:
include = ["cli*", "scripts*", "tooling", "tooling.*", "adapters", "adapters.*",
"runtime", "runtime.*", "intelligence", "intelligence.*", "hermes", "hermes.*",
"openclaw", "openclaw.*"] # ← Added
This ensures pip install -e . includes the openclaw/bridge modules needed by the ainl install openclaw command.
2. Created aiNativeLang.yml
Missing project lock file at AI_Native_Lang/aiNativeLang.yml created with:
- Version and integration metadata
- Cron job definitions (gold-standard + optional)
- Environment variable mappings
- Workspace paths
This file documents the setup and allows recreation of the configuration.
3. Added AINL venv to OpenClaw PATH
Updated openclaw.json with:
"tools": {
"exec": {
"pathPrepend": [
"/Users/clawdbot/.openclaw/workspace/AI_Native_Lang/.venv-ainl/bin"
]
}
}
This ensures ainl and ainl-mcp are on the PATH for all exec calls, enabling the MCP server to be found and the AINL CLI to be invoked from cron jobs without manual activation.
4. Verified MCP Server Registration
Confirmed openclaw.json.mcp.servers.ainl exists and points to ainl-mcp. The configuration was already present from earlier setup; only the PATH needed correction.
5. Gateway Restart
Restarted OpenClaw gateway (openclaw gateway restart) to apply config changes and load the MCP server.
6. Cleaned Up Duplicate Cron Job
Removed an orphaned "Infrastructure Watchdog" cron entry that lacked Telegram delivery target and had 33 consecutive errors. The properly configured duplicate remains active.
Verification
All checks pass:
✅ Project lock file present
✅ AINL venv created and packages installed
✅ openclaw.bridge modules importable
✅ ainl and ainl-mcp binaries available
✅ MCP server registered in openclaw.json
✅ AINL venv in exec.pathPrepend
✅ AINL env vars in shellEnv
✅ 23 AINL cron jobs registered
✅ Runtime directories created (.ainl, .cache/ainl/ir, memory)
✅ Infrastructure: Caddy + Maddy running
Run AI_Native_Lang/scripts/verify_ainl_integration.sh to reproduce this check.
Documentation Added
docs/OPENCLAW_INSTALL_GUIDE.md— Complete 3-minute installation guide for future users, including prerequisites, one-command setup, verification steps, and troubleshooting.scripts/verify_ainl_integration.sh— Post-install verification script that tests all critical components.
What Now Works
ainl install openclawruns successfully without import errorsainl-mcpis discoverable by OpenClaw and starts on gateway launch- AINL cron jobs execute properly (context injection, summarizer, token trends)
- Infrastructure watchdog runs every 15 minutes with proper alerts
- Token budget monitoring and memory consolidation work as designed
- All AINL adapters (
R svc,R cache,R queue Put, etc.) function correctly
Timeline to 3-Minute Setup
For new users following the updated docs/OPENCLAW_INSTALL_GUIDE.md:
- Clone & venv — 60s
pip install -e ".[mcp]"— 60-90s./scripts/setup_ainl_integration.sh— 30s- Verification —
./scripts/verify_ainl_integration.sh— 10s
Total: ~3 minutes (real-world timing may vary based on pip cache and network).
No More Manual Steps Needed
The setup_ainl_integration.sh wrapper now does everything:
- Editable install verification
- MCP server registration (via
ainl install openclaw) - Environment injection
- Cron registration (gold-standard)
- Gateway restart
The only prerequisite is that ainl must be on PATH (ensured by venv activation in the script).
Files Modified/Created
| Path | Change |
|------|--------|
| AI_Native_Lang/pyproject.toml | Added openclaw.* to packages.include |
| AI_Native_Lang/aiNativeLang.yml | Created (project lock) |
| openclaw.json | Added exec.pathPrepend with AINL venv |
| docs/OPENCLAW_INSTALL_GUIDE.md | New installation documentation |
| scripts/verify_ainl_integration.sh | New verification script |
Status: ✅ Complete and verified Date: 2026-03-29 Installer: Apollo (OpenClaw agent)
