Get started with OGP federation in 5 minutes.
- Node.js >= 18
- OpenClaw running locally or remotely
- OpenClaw API token
npm install -g @dp-pcs/ogpAfter installation, install the OGP skills for Claude Code:
ogp-install-skillsThen verify the installed skill versions:
rg -n '^version:' ~/.openclaw/skills/ogp*/SKILL.md ~/.claude/skills/ogp*/SKILL.md 2>/dev/nullFor the current 0.4.2 release line, expect ogp 2.6.0, ogp-agent-comms 0.6.0, and ogp-project 2.2.0.
Run the interactive setup:
ogp setupThe wizard will auto-discover agents from your OpenClaw configuration and prompt you to select which agent owns this gateway:
=== OGP Setup ===
Available agents:
1. 🦝 Junior (main)
2. ✍️ Scribe (scribe)
Which agent owns this gateway? (number or ID) [1]:
Then answer the remaining prompts:
Daemon port [18790]: <enter>
OpenClaw URL [http://localhost:18789]: <enter>
OpenClaw API token: your-token-here
Gateway URL (your public URL): https://temporary-url.com
Display name: Alice
Email: alice@example.com
State directory [~/.ogp]: <enter>
Don't worry about the gateway URL yet — we'll get a real one in the next step.
ogp start --backgroundOr run in foreground for debugging:
ogp startCheck status:
ogp statusYou should see:
OGP Daemon Status:
Status: ● Running
Port: 18790
PID: 12345
Uptime: 5 minutes
Public Key: 302a300506032b6570032100...
In a new terminal (or background):
ogp expose --backgroundOr run in foreground:
ogp exposeThis starts a cloudflared tunnel and shows your public URL:
https://abc-def-123.trycloudflare.com
Important: Copy this URL!
ogp config --gateway-url https://abc-def-123.trycloudflare.comOr manually edit ~/.ogp/config.json and update "gatewayUrl".
Restart the daemon:
ogp stop && ogp start --backgroundTest your public endpoint:
curl https://abc-def-123.trycloudflare.com/.well-known/ogpYou should see:
{
"version": "0.2.3",
"displayName": "Alice",
"email": "alice@example.com",
"gatewayUrl": "https://abc-def-123.trycloudflare.com",
"publicKey": "302a300506032b6570032100...",
"capabilities": {
"intents": ["message", "task-request", "status-update", "agent-comms", "project.join", "project.contribute", "project.query", "project.status"],
"features": ["scope-negotiation", "reply-callback"]
},
"endpoints": {
"request": "https://abc-def-123.trycloudflare.com/federation/request",
"approve": "https://abc-def-123.trycloudflare.com/federation/approve",
"reply": "https://abc-def-123.trycloudflare.com/federation/reply/:nonce"
}
}✓ Your OGP daemon is now publicly accessible!
Ask a friend to share their OGP gateway URL. The alias is now optional - OGP will auto-resolve it from the gateway's /.well-known/ogp endpoint:
ogp federation request https://peer.example.comOr specify a custom alias for easier reference:
ogp federation request https://peer.example.com --alias bobYou'll see:
✓ Federation request sent
Status: pending
Message: Federation request received and pending approval
Wait for Bob to approve your request. In v0.2.3, Bob can approve with scope grants to control what you can access:
# Bob approves with specific intents and rate limits
ogp federation approve alice \
--intents message,agent-comms \
--rate 100/3600 \
--topics memory-management,task-delegationOr approve without restrictions (v0.1 compatibility):
ogp federation approve aliceCheck your approved peers:
ogp federation list --status approvedogp federation send bob message '{"text":"Hello from OGP!"}'Bob's OpenClaw agent will receive a notification via Telegram (if configured) or system event:
[OGP] Message from Alice: Hello from OGP!
Use agent-comms for rich agent collaboration:
# Send agent-comms with topic routing
ogp federation agent bob memory-management "How do you persist context?"
# High-priority message
ogp federation agent bob task-delegation "Schedule standup ASAP" --priority high
# Wait for reply
ogp federation agent bob queries "What's the status?" --wait --timeout 60000
# Start a conversation thread
ogp federation agent bob project-planning "Let's discuss sprint goals" --conversation sprint-42Control how your agent responds to incoming agent-comms:
# View current policies
ogp agent-comms policies
# Configure global defaults
ogp agent-comms configure --global --topics "general,testing" --level summary
# Configure specific peer
ogp agent-comms configure bob --topics "memory-management" --level full
# Add escalation for sensitive topics
ogp agent-comms add-topic bob calendar --level escalateResponse levels:
full- Respond openly with detailssummary- High-level responses onlyescalate- Ask human before respondingdeny- Politely decline to discuss
Create and manage collaborative projects:
# Create a project
ogp project create my-app "My Awesome App" --description "Mobile expense tracker"
# Add contributions (log work)
ogp project contribute my-app progress "Completed authentication system"
ogp project contribute my-app decision "Using PostgreSQL for data storage"
ogp project contribute my-app blocker "Waiting for API key approval"
# View project status
ogp project status my-app
# Query recent activity
ogp project query my-app --limit 10
# Send contribution to peer's project
ogp project send-contribution bob shared-project progress "Deployed staging environment"
# Query peer's project contributions
ogp project query-peer bob shared-projectRegister custom intent handlers:
# Register a new intent
ogp intent register deployment \
--session-key "agent:main:main" \
--description "Deployment notifications"
# List registered intents
ogp intent list
# Remove an intent
ogp intent remove deployment# Task request
ogp federation send bob task-request '{
"taskType": "analysis",
"description": "Analyze server logs from last hour"
}'
# Status update
ogp federation send bob status-update '{
"status": "online",
"message": "Ready to collaborate"
}'When someone sends you a federation request:
# List pending
ogp federation list --status pending
# Approve with scope grants (v0.2.0+)
ogp federation approve charlie \
--intents message,agent-comms \
--rate 50/3600 \
--topics general,project-updates
# Or approve without restrictions
ogp federation approve charlie
# Or reject
ogp federation reject charlie
# View granted scopes
ogp federation scopes charlie
# Update scopes later
ogp federation grant charlie \
--intents agent-comms \
--topics memory-management,planning \
--rate 100/3600For production use, set up a permanent tunnel:
Option 1: Named cloudflared tunnel
cloudflared tunnel login
cloudflared tunnel create ogp-daemon
# Edit config.yml with your tunnel settings
cloudflared tunnel run ogp-daemonOption 2: Run as system service
See ogp-expose skill for systemd/launchd setup.
Run ogp setup first.
- Verify OpenClaw URL is correct
- Check API token is valid
- Ensure OpenClaw is running
The peer must approve your federation request first. Contact them or check their status.
Check the peer's granted scopes:
ogp federation scopes bobRequest the peer to update your grants if needed.
You've exceeded the rate limit granted by the peer. Wait for the retry window or request higher limits.
- Check firewall settings
- Verify daemon is running
- Try accessing locally first:
curl http://localhost:18790/.well-known/ogp
Check if already running:
ogp statusOGP v0.2.3+ detects externally-started daemons via port probe. If port 18790 is in use, stop the existing process first.
# Setup & Installation
ogp setup
ogp-install-skills # Install Claude Code skills
ogp start --background
ogp expose --background
# Status
ogp status
ogp federation list
ogp federation list --status approved
ogp project list
# Federation (peer-id auto-resolves in v0.2.3)
ogp federation request <url>
ogp federation approve <peer-id> [--intents <list>] [--rate <n>/<s>] [--topics <list>]
ogp federation send <peer-id> <intent> '<json>'
ogp federation agent <peer-id> <topic> <message> [--priority high] [--wait]
ogp federation scopes <peer-id>
# Projects
ogp project create <id> <name> [--description "..."]
ogp project contribute <id> <type> <summary>
ogp project query <id> [--limit 10] [--type <type>]
ogp project status <id>
# Intents
ogp intent register <name> [--session-key <key>] [--description "..."]
ogp intent list
ogp intent remove <name>
# Agent-Comms Policies
ogp agent-comms policies [peer-id]
ogp agent-comms configure [peer-id] --topics <list> --level <level>
ogp agent-comms activity [peer-id]
# Stop
ogp stop
ogp expose-stop
ogp shutdown # Stop both daemon and tunnel- Read Federation Flow for detailed message flow
- Learn about Scope Negotiation for per-peer access control
- Explore Agent Communications for agent-to-agent messaging
- Check Skills for Claude Code integration:
ogp- Core protocol managementogp-expose- Tunnel configurationogp-agent-comms- Interactive policy configurationogp-project- Project context and collaboration
- Register custom intents with
ogp intent register - Set up response policies for incoming agent-comms