Readme Β· MD Copy
Monetize autonomous AI agents through Moltgate's paid inbox layer.
Turn your self-hosted OpenClaw agent into a revenue-generating machine - accept paid consulting requests, triage inbound by intent, and deliver AI-powered support services through priced message lanes.
The OpenClaw Revenue Engine bridges OpenClaw β the open-source personal AI assistant platform β with Moltgate's paid inbound messaging layer. The result: your AI agent can autonomously fetch paid messages, execute consulting workflows, and generate revenue without manual intervention.
The pitch is simple: Spam is free. Your agent's attention isn't.
[Client] β Pays via Moltgate Lane β [Paid Inbox] β [OpenClaw Agent Fetches via API] β [Agent Executes Task] β [Delivers Response]
- Clients send paid messages through tiered Moltgate lanes
- Your OpenClaw agent polls the Moltgate API for new paid requests
- The engine triages requests by lane tier and routes to the appropriate workflow
- The agent processes the task (consulting, code review, security audit, etc.)
- Response is delivered back through the platform
- Moltgate Lane Integration - Supports all Moltgate tiers: Ping, Standard, Priority, Ultra, and Micro lanes, each with configurable pricing and SLA promises
- Autonomous Fetching - Agent polls for paid messages via the Moltgate API on a configurable interval - no manual inbox checking
- Intent-Based Routing - Incoming requests are triaged by lane tier, message content, and keyword signals to route to the right workflow
- Multi-Model Support - Works with Anthropic Claude (default), OpenAI GPT, Google Gemini, or any model supported by OpenClaw's model-agnostic gateway
- Stripe-Backed Payments - All payments handled through Moltgate's Stripe integration - card data never touches your infrastructure
- Service Catalog Ready - Pre-configured for consulting services like OpenClaw security reviews, hardening audits, and AI workflow roadmaps (Ailephant)
- Crypto-Agile Security - Designed with modular encryption for PQC readiness - a differentiator for FinTech buyers evaluating your services
- Node.js 24+ (recommended) or 22.16+
- OpenClaw installed globally (
npm install -g openclaw@latest) - Moltgate account with at least one lane configured at moltgate.com
- API key from your LLM provider (Anthropic, OpenAI, etc.)
# Clone the repo
git clone https://github.com/donny-devops/openclaw-revenue-engine.git
cd openclaw-revenue-engine
# Install dependencies
npm install
# Run onboarding
openclaw onboard --install-daemonCreate a .env file in the project root:
# AI Model Configuration
ANTHROPIC_API_KEY=sk-ant-your-key-here
AI_MODEL=claude-sonnet-4-20250514
# Gateway Configuration
GATEWAY_PORT=18789
GATEWAY_HOST=127.0.0.1
# Agent Identity
AGENT_NAME=YourAgentName
# Moltgate Integration
MOLTGATE_API_KEY=your-moltgate-api-key
MOLTGATE_POLL_INTERVAL=30000
# Stripe (handled via Moltgate - no direct keys needed)
β οΈ Never commit your.envfile. Make sure.envis in your.gitignore. If you accidentally expose an API key, rotate it immediately at your provider's console.
# Start the gateway
openclaw gateway --port 18789 --verbose
# In a separate terminal, start the revenue engine
npm startopenclaw-revenue-engine/
βββ src/
β βββ agent/ # OpenClaw agent configuration and skills
β βββ engine/ # Core revenue engine β polling, triage, routing
β βββ lanes/ # Lane-specific handlers (Ping, Standard, Priority, Ultra, Micro)
β βββ services/ # Service catalog definitions and execution logic
β βββ utils/ # Helpers β logging, rate limiting, error handling
βββ config/
β βββ lanes.json # Lane pricing, SLA, and routing rules
βββ .env.example # Template environment variables
βββ .gitignore
βββ package.json
βββ README.md
| Lane | Use Case | Typical Price | SLA |
|---|---|---|---|
| Micro | Small tasks, agent handshaking | $1β$3 | Best-effort |
| Ping | Basic outreach, spam filtering | $3β$5 | 24 hours |
| Standard | Consulting asks, support escalations | $10β$25 | 12 hours |
| Priority | High-urgency business requests | $25β$75 | 4 hours |
| Ultra | Premium agent workflows, heavy runtime | $75β$200+ | 1 hour |
Lanes are fully configurable in config/lanes.json. Adjust pricing, response windows, and routing logic to match your service offerings.
The revenue engine ships with templates for common monetized agent services:
- OpenClaw Security Review ($10) - One focused security question answered by your agent
- OpenClaw Hardening Audit ($30) - Full security posture review for OpenClaw builders
- Ailephant AI Roadmap - Practical AI workflow roadmaps for founders and teams
- DevOps Consulting - Infrastructure reviews, CI/CD pipeline analysis, cloud architecture guidance
- Code Review - Automated code quality and security analysis with detailed feedback
Build your own services by adding handlers to src/services/ and registering them in the lane routing config.
This project follows a security-first approach:
- No raw card data - All payments delegated to Stripe via Moltgate
- API key scoping - Keys are scoped per-agent and per-lane with least-privilege access
- Webhook verification - All Moltgate webhooks verified via Ed25519 signatures
- Rate limiting - Configurable per-tier rate limits to prevent abuse
- Crypto-agile architecture - Encryption layer is modular and swappable for post-quantum readiness (NIST FIPS 203/204/205, ML-KEM, ML-DSA compatible)
- Environment isolation - Secrets managed via
.env, never hardcoded
For the full security posture document, see SECURITY.md.
- Core Moltgate API integration
- Lane-based request routing
- Multi-model AI support
- Real-time earnings dashboard
- Client reputation scoring
- Automated follow-up workflows
- Multi-agent support (route to specialized agents per service)
- Analytics and conversion tracking
- ClawHub skill registry publication
| Component | Technology |
|---|---|
| Runtime | Node.js 24+ / TypeScript |
| AI Platform | OpenClaw (self-hosted gateway) |
| Payment Layer | Moltgate β Stripe |
| Default Model | Anthropic Claude Sonnet |
| Deployment | Local / VPS / Docker |
Contributions are welcome. Please read CONTRIBUTING.md before submitting a PR.
- Fork the repo
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
This project is licensed under the MIT License.