This comprehensive guide covers everything you need to get started with OGP, from basic single-framework setup to advanced multi-framework configurations.
- Prerequisites
- Quick Start: Single Framework
- Quick Start: Multiple Frameworks
- Framework Detection and Selection
- Using the --for Flag
- Setting a Default Framework
- Tab Completion Setup
- Using ? Style Help
- Common Workflows
- Troubleshooting
Before installing OGP, ensure you have:
- Node.js 18 or higher - Check with
node --version - An AI framework installed (one or more):
- OpenClaw - Get it at https://openclaw.ai
- Hermes - Contact your Hermes provider
- Or run standalone (no framework required)
- API credentials for your framework (generated during framework setup)
If you're using only one AI framework (e.g., OpenClaw), setup is straightforward.
npm install -g @dp-pcs/ogpInstall OGP skills for Claude Code integration:
ogp-install-skillsVerify the installed copies after an upgrade:
rg -n '^version:' ~/.openclaw/skills/ogp*/SKILL.md ~/.claude/skills/ogp*/SKILL.md 2>/dev/nullFor the current 0.4.2 release line, the changed skills should report ogp 2.6.0, ogp-agent-comms 0.6.0, and ogp-project 2.2.0.
ogp setupThe wizard will:
- Detect installed frameworks
- Prompt for framework configuration
- Create config directory (e.g.,
~/.ogp-openclaw/) - Generate cryptographic keypair
- Create meta-config at
~/.ogp-meta/config.json
Example Setup Session:
=== OGP Setup ===
🔍 Detecting installed AI frameworks...
✓ Found OpenClaw at ~/.openclaw/
Which frameworks do you want to enable OGP for?
[x] OpenClaw (Junior @ OpenClaw)
[ ] Standalone (no framework)
=== Configuring OpenClaw ===
Available agents:
1. 🦝 Junior (main)
2. ✍️ Scribe (scribe)
Which agent owns this gateway? (number or ID) [1]: 1
Daemon port [18790]: <enter>
OpenClaw URL [http://localhost:18789]: <enter>
OpenClaw API token: your-token-here
Gateway URL (your public URL): https://ogp.example.com
Display name: Alice
Email: alice@example.com
Enable optional rendezvous for invite codes / pubkey discovery? [y/N]: n
Rendezvous server URL [https://rendezvous.elelem.expert]: <enter>
✓ OpenClaw configured
Config: ~/.ogp-openclaw/
Port: 18790
Agent: Junior (main)
✓ OGP setup complete!
Default framework: openclaw
ogp start --backgroundCheck status:
ogp statusOutput:
OGP Daemon Status:
Framework: openclaw
Status: ● Running
Port: 18790
PID: 12345
Uptime: 5 minutes
Public Key: 302a300506032b6570032100...
Gateway URL: https://ogp.example.com
curl https://ogp.example.com/.well-known/ogpYou should see your gateway metadata (public key, capabilities, endpoints).
That's it! Your single-framework OGP gateway is running. Skip to Common Workflows to start federating.
If you're using multiple AI frameworks (e.g., OpenClaw and Hermes), OGP can manage separate gateways for each.
npm install -g @dp-pcs/ogpogp setupThe wizard will detect all installed frameworks:
=== OGP Setup ===
🔍 Detecting installed AI frameworks...
✓ Found OpenClaw at ~/.openclaw/
✓ Found Hermes at ~/.hermes/
Which frameworks do you want to enable OGP for?
[x] OpenClaw (Junior @ OpenClaw)
[x] Hermes (Apollo @ Hermes)
[ ] Standalone (no framework)
Select all frameworks you want to enable (use space to toggle, enter to confirm).
The wizard will prompt for configuration for each selected framework:
=== Configuring OpenClaw ===
Available agents:
1. 🦝 Junior (main)
Which agent owns this gateway? (number or ID) [1]: 1
Daemon port [18790]: <enter>
OpenClaw URL [http://localhost:18789]: <enter>
OpenClaw API token: your-openclaw-token
Gateway URL: https://ogp.example.com
Display name: Junior @ OpenClaw
Email: alice@example.com
=== Configuring Hermes ===
Available agents:
1. 🌟 Apollo (main)
Which agent owns this gateway? (number or ID) [1]: 1
Daemon port [18793]: <enter>
Hermes webhook URL [http://localhost:18792/webhooks/ogp]: <enter>
Hermes webhook secret: your-hermes-secret
Gateway URL: https://hermes.example.com
Display name: Apollo @ Hermes
Email: alice@example.com
✓ OGP configured for 2 frameworks
OpenClaw: ~/.ogp-openclaw/
Hermes: ~/.ogp-hermes/
Default framework: openclaw
Tip: Use `ogp --for openclaw <command>` or `ogp --for hermes <command>`
Or set a default: `ogp config set-default openclaw`
Start daemons for each framework:
# Start OpenClaw daemon
ogp --for openclaw start --background
# Start Hermes daemon
ogp --for hermes start --backgroundOr start all at once:
ogp --for all start --backgroundogp --for all statusOutput:
=== OpenClaw (Junior @ OpenClaw) ===
OGP Daemon Status:
Framework: openclaw
Status: ● Running
Port: 18790
PID: 12345
Uptime: 2 minutes
=== Hermes (Apollo @ Hermes) ===
OGP Daemon Status:
Framework: hermes
Status: ● Running
Port: 18793
PID: 12346
Uptime: 2 minutes
Now you have two independent OGP gateways running, one for each framework.
During setup, OGP automatically detects installed frameworks by checking:
-
Framework directories:
- OpenClaw:
~/.openclaw/ - Hermes:
~/.hermes/
- OpenClaw:
-
Framework commands:
openclawcommand availablehermescommand available
If auto-detection doesn't find your framework:
- Select "Standalone (no framework)" during setup
- Manually configure OGP_HOME before running commands:
export OGP_HOME=~/.ogp-custom
ogp setupEach framework gets its own config directory:
| Framework | Directory | Default Port |
|---|---|---|
| OpenClaw | ~/.ogp-openclaw/ |
18790 |
| Hermes | ~/.ogp-hermes/ |
18793 |
| Standalone | ~/.ogp/ |
18790 |
All configs are managed from ~/.ogp-meta/config.json.
The --for flag specifies which framework configuration to use for a command.
# Use OpenClaw config
ogp --for openclaw federation list
# Use Hermes config
ogp --for hermes federation list
# Run on all frameworks
ogp --for all federation listThe --for flag is required when:
- Multiple frameworks are configured and no default is set
- You want to override the default framework
- You want to run on all frameworks (
--for all)
The --for flag is optional when:
- Only one framework is configured (auto-selected)
- A default framework is set (uses default)
# Start specific framework daemon
ogp --for openclaw start --background
# Request federation from specific framework
ogp --for openclaw federation request https://peer.example.com
# Send message from Hermes gateway
ogp --for hermes federation send apollo message '{"text":"Hello from Hermes!"}'
# Check status of all frameworks
ogp --for all status
# List all peers across all frameworks
ogp --for all federation listWhen using --for all, OGP runs the command on all enabled frameworks and aggregates results:
$ ogp --for all federation list
=== OpenClaw (Junior @ OpenClaw) ===
PEERS:
apollo (Apollo @ Hermes) - approved
bob (Bob @ OpenClaw) - approved
=== Hermes (Apollo @ Hermes) ===
PEERS:
junior (Junior @ OpenClaw) - approved
charlie (Charlie @ Hermes) - pendingSet a default framework to avoid using --for on every command.
ogp config set-default openclawOutput:
✓ Default framework: openclaw
ogp config listOutput:
Configured frameworks:
openclaw [default] ● Enabled ~/.ogp-openclaw/ 18790
hermes ● Enabled ~/.ogp-hermes/ 18793
Once set, commands automatically use the default framework:
# No --for needed, uses openclaw (default)
ogp federation list
ogp start --background
ogp statusUse --for to override the default for a single command:
# Uses hermes instead of default (openclaw)
ogp --for hermes federation listTab completion makes command entry faster and helps discover available commands, peers, and frameworks.
ogp completion install bashReload your shell:
source ~/.bashrcogp completion install zshReload your shell:
source ~/.zshrcOnce installed, press TAB to complete commands:
# Complete commands
ogp fed<TAB>
# → ogp federation
# Complete subcommands
ogp federation <TAB>
# → list request approve reject remove send agent scopes alias
# Complete --for flag
ogp --for <TAB>
# → openclaw hermes all
# Complete peer names
ogp federation send <TAB>
# → apollo bob charlie
# Complete intents
ogp federation send apollo <TAB>
# → message task-request status-update agent-comms project.*- Command completion: Top-level commands and subcommands
- Framework completion: Framework names for
--forflag - Peer completion: Peer aliases from current framework config
- Intent completion: Available intents for
sendcommand - Flag completion: Available flags for each command
OGP provides Cisco IOS-style context-sensitive help with the ? operator.
ogp ?Output:
Available commands:
setup Initialize OGP configuration
start Start OGP daemon
stop Stop OGP daemon
status Show daemon status
federation Manage federation
agent-comms Configure agent-to-agent messaging
project Manage projects
intent Manage custom intents
config Manage configuration
expose Manage public tunnel
install Install LaunchAgent (macOS)
uninstall Remove LaunchAgent (macOS)
completion Manage shell completion
Use `ogp <command> ?` for more details.
ogp federation ?Output:
Available federation commands:
list List all peers
request Send federation request
approve Approve pending peer
reject Reject pending peer
remove Remove peer
send Send message to peer
agent Send agent-comms message
scopes View/update scopes
alias Manage peer aliases
ping Test connectivity
invite Generate invite code
accept Accept invite
connect Connect by public key
Use `ogp federation <command> ?` for usage.
ogp federation send ?Output:
Usage: ogp federation send <peer> <intent> <payload>
Arguments:
peer Peer ID, alias, or display name
intent Intent type (message, task-request, status-update, agent-comms, project.*)
payload JSON payload
Available peers (openclaw):
- apollo (Apollo @ Hermes) - approved
- bob (Bob @ OpenClaw) - approved
Example:
ogp federation send apollo message '{"text":"Hello from OGP!"}'
ogp federation send bob agent-comms '{"topic":"memory","message":"How do you persist context?"}'
ogp federation approve ?Output:
Usage: ogp federation approve <peer-id> [options]
Options:
--intents <list> Comma-separated intents (message,agent-comms)
--rate <limit> Rate limit as requests/seconds (100/3600)
--topics <list> Topics for agent-comms (memory-management,task-delegation)
Examples:
# Approve without restrictions
ogp federation approve apollo
# Approve with scope grants
ogp federation approve apollo \
--intents message,agent-comms \
--rate 100/3600 \
--topics memory-management,task-delegation
If you're using only one framework:
# Setup (once)
ogp setup
ogp start --background
# Daily usage (no --for needed)
ogp federation request https://peer.example.com
ogp federation list
ogp federation send apollo message '{"text":"Hello!"}'
ogp statusIf you're using multiple frameworks:
# Setup (once)
ogp setup
ogp --for all start --background
ogp config set-default openclaw
# Daily usage with default
ogp federation list # Uses openclaw (default)
ogp federation send apollo message '{"text":"Hello!"}'
# Explicit framework selection
ogp --for hermes federation list # Uses hermes
ogp --for hermes federation send bob message '{"text":"Hi from Hermes!"}'
# Cross-framework operations
ogp --for all status # Check all daemons
ogp --for all federation list # List all peersSetting up federation between two peers:
Alice (OpenClaw):
# 1. Start daemon and expose
ogp start --background
ogp expose --background
# 2. Share gateway URL with Bob
# Gateway: https://alice.example.com
# 3. Request federation with Bob
ogp federation request https://bob.example.com --alias bob
# 4. Wait for Bob's approval
ogp federation list --status pending
# 5. Once approved, send message
ogp federation send bob message '{"text":"Hello Bob!"}'Bob (Hermes):
# 1. Start daemon and expose
ogp --for hermes start --background
ogp --for hermes expose --background
# 2. Share gateway URL with Alice
# Gateway: https://bob.example.com
# 3. Approve Alice's request
ogp --for hermes federation list --status pending
ogp --for hermes federation approve alice \
--intents message,agent-comms \
--rate 100/3600 \
--topics general,memory-management
# 4. Send message back
ogp --for hermes federation send alice message '{"text":"Hello Alice!"}'Using agent-comms for rich collaboration:
# Revisit delegated-authority / human-delivery preferences
ogp agent-comms interview
# Configure response policies first
ogp agent-comms configure apollo \
--topics memory-management,task-delegation \
--level full
# Send agent-comms messages
ogp federation agent apollo memory-management "How do you persist long-term context?"
ogp federation agent apollo task-delegation "Can you help analyze these logs?" --priority high
# Wait for replies
ogp federation agent apollo queries "What's the status?" --wait --timeout 60000
# Check activity log
ogp agent-comms activity apolloProjects sit on top of federation. Use them to capture high-level collaboration context while each person keeps their own tools and workflow:
# Create a project
ogp project create expense-app "Expense Tracker App" \
--description "Mobile expense tracking application"
# Log work by entry type
ogp project contribute expense-app progress "Completed authentication system"
ogp project contribute expense-app decision "Using PostgreSQL for persistence"
ogp project contribute expense-app blocker "Waiting for API key approval"
# Ask a collaborator about project context
ogp federation agent apollo expense-app "I'm about to work on auth. Anything I should know?"
# Share with peer
ogp project send-contribution apollo expense-app progress "Deployed staging environment"
# Query peer's contributions
ogp project query-peer apollo expense-app --limit 10
# Check project status
ogp project status expense-appProblem: Setup wizard doesn't detect your framework.
Solution:
-
Check framework is installed:
ls ~/.openclaw/ # OpenClaw ls ~/.hermes/ # Hermes
-
Use standalone mode:
# Select "Standalone" during setup ogp setup -
Set OGP_HOME manually:
export OGP_HOME=~/.ogp-custom ogp setup
Problem: OGP prompts for framework on every command.
Solution: Set a default framework:
ogp config set-default openclawProblem: Command runs on wrong framework.
Solution:
-
Check current config:
ogp config list
-
Use explicit
--forflag:ogp --for openclaw federation list
-
Change default:
ogp config set-default hermes
Problem: ogp start fails.
Solution:
-
Check if already running:
ogp status
-
Check port availability:
lsof -i :18790 # OpenClaw default lsof -i :18793 # Hermes default
-
Check logs:
# Foreground mode shows logs ogp start -
Verify config:
cat ~/.ogp-openclaw/config.json # OpenClaw cat ~/.ogp-hermes/config.json # Hermes
Problem: Peers can't reach your gateway.
Solution:
-
Test locally first:
curl http://localhost:18790/.well-known/ogp
-
Check tunnel is running:
ogp expose status
-
Test public URL:
curl https://your-gateway.example.com/.well-known/ogp
-
Verify gateway URL in config:
ogp config show
Problem: "Peer not approved" error when sending message.
Solution:
-
Check peer status:
ogp federation list
-
Request federation if not initiated:
ogp federation request https://peer.example.com
-
Wait for peer to approve your request
Problem: "Scope not granted" or 403 error.
Solution:
-
Check granted scopes:
ogp federation scopes apollo
-
Request peer to update grants:
# Ask peer to run: ogp federation grant <your-id> \ --intents agent-comms \ --topics memory-management
Problem: "Rate limit exceeded" or 429 error.
Solution:
-
Wait for rate limit window to reset
-
Check current rate limit:
ogp federation scopes apollo
-
Request higher limit from peer
Problem: Tab completion doesn't work.
Solution:
-
Verify installation:
cat ~/.bashrc | grep ogp-completion # Bash cat ~/.zshrc | grep ogp-completion # Zsh
-
Reinstall completion:
ogp completion install bash # or zsh -
Reload shell:
source ~/.bashrc # or ~/.zshrc
Problem: Existing config not migrated properly.
Solution:
-
Check migration status:
ogp config list
-
Manual migration:
# Backup current config cp -r ~/.ogp ~/.ogp.backup # Rename to framework-specific mv ~/.ogp ~/.ogp-openclaw # Run setup to create meta-config ogp setup
-
Verify migration:
ls ~/.ogp-meta/ ls ~/.ogp-openclaw/
- Read Federation Flow for message flow details
- Learn about Scope Negotiation for access control
- Explore Agent Communications for agent-to-agent messaging
- Check CLI Reference for complete command documentation
- Install Claude Code skills for agent integration