openclaw-revenue-engine

Readme Β· MD Copy

πŸ¦žπŸ’° OpenClaw Revenue Engine

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.

License: MIT Node.js OpenClaw Moltgate


What Is This?

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.

How It Works

[Client] β†’ Pays via Moltgate Lane β†’ [Paid Inbox] β†’ [OpenClaw Agent Fetches via API] β†’ [Agent Executes Task] β†’ [Delivers Response]
  1. Clients send paid messages through tiered Moltgate lanes
  2. Your OpenClaw agent polls the Moltgate API for new paid requests
  3. The engine triages requests by lane tier and routes to the appropriate workflow
  4. The agent processes the task (consulting, code review, security audit, etc.)
  5. Response is delivered back through the platform

Features


Quick Start

Prerequisites

Installation

# 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-daemon

Configuration

Create 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 .env file. Make sure .env is in your .gitignore. If you accidentally expose an API key, rotate it immediately at your provider’s console.

Run

# Start the gateway
openclaw gateway --port 18789 --verbose
 
# In a separate terminal, start the revenue engine
npm start

Project Structure

openclaw-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

Moltgate Lanes

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.


Service Examples

The revenue engine ships with templates for common monetized agent services:

Build your own services by adding handlers to src/services/ and registering them in the lane routing config.


Security

This project follows a security-first approach:

For the full security posture document, see SECURITY.md.


Roadmap


Tech Stack

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

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before submitting a PR.

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.