The OGP daemon must be installed. If you see errors like 'ogp: command not found', install it first:
npm install -g @dp-pcs/ogp
ogp-install-skills
ogp setup
ogp agent-comms interview
ogp config show
Full documentation: https://github.com/dp-pcs/ogp
This skill is an interactive wizard for configuring how your agent handles incoming agent-comms messages from federated peers.
Use this skill when:
Agent-comms policies control HOW your agent responds to incoming messages (separate from scope grants which control WHETHER messages are allowed).
Two layers:
Important default: when a federation request is approved, OGP auto-enables the general topic for that peer. Everything else still needs explicit policy if the user wants something more restrictive or more open.
Multi-Agent Routing (v0.2.28+):
When using notifyTargets in your OGP config, federation messages can be routed to specific agents based on the message context. Each agent can have its own agent-comms policies.
Human delivery behavior (v0.4.2+):
Use humanDeliveryTarget plus inboundFederationPolicy.mode to tell the agent whether it should forward everything, summarize, act autonomously, or wait for approval before replying.
OGP now evaluates delegated-authority rules—global defaults, per-peer overrides, message-class-specific rules (agent-work, human-relay, approval-request, status-update), and topic overrides—before finalizing delivery behavior. This determines whether the agent may reply directly or must escalate to the configured human session. On OpenClaw, /hooks/agent is the preferred delivery path; it tries to request the actual human session key only when hooks.allowRequestSessionKey=true and the requested key matches configured prefixes. When the flag is false, the hook runs in the default session (agent:main:main), so Telegram sender identity continues to appear as injected/system/cli, which is the accepted v0.4.2 limitation documented in the README and changelog. Lifecycle events such as federation approvals now surface through these same hook-driven turns, so humans see the lifecycle update without needing to poll another channel.
On OpenClaw, human-facing federated work should be handled through the platform's hook-driven agent turn (/hooks/agent). Direct sessions.send injection is a lower-level fallback or sync mechanism, not the primary behavioral path.
Multi-Framework note: Policies are framework-local. Use ogp --for openclaw ... for OpenClaw state and ogp --for hermes ... for Hermes state.
When invoked, guide the user through this flow:
# Verify OGP is running and has peers
ogp config show
ogp --for openclaw status
ogp --for openclaw federation list --status approved
If no approved peers, inform the user they need to federate first.
When the user is configuring overall human-delivery or autonomy behavior, start with the canonical interview command instead of approximating it manually:
ogp --for openclaw agent-comms interview
Use the Hermes variant when the active framework is Hermes:
ogp --for hermes agent-comms interview
This command updates:
humanDeliveryTarget when the framework supports itinboundFederationPolicy.modeAfter the interview, continue with per-peer or per-topic policy commands only if the user wants something more specific.
# Show current policies
ogp --for openclaw agent-comms policies
Present options:
If configuring specific peers, show the list and allow multi-select:
Use the peer list from:
ogp --for openclaw federation list --status approved
Prefer the peer ID shown in the list. Some commands also accept a display-name match, but the peer ID is the safest input.
Example interaction:
Select peers to configure:
[x] Stanislav (302a300506032b65)
[ ] Leonardo (5f8b2c...)
[x] Alice (9d4e1f...)
Selected: Stanislav, Alice
Ask which topics the agent should engage on:
Which topics should your agent discuss with these peers?
[x] memory-management
[x] testing
[x] general
[ ] calendar (add custom)
[ ] personal (add custom)
Add custom topic: _______
For each topic (or all topics), set the response level:
| Level | Behavior |
|---|---|
| ------- | ---------- |
full | Respond openly, share details |
summary | High-level responses only, no specifics |
escalate | Ask human before responding |
deny | Politely decline to discuss |
off | Block the topic entirely |
# Save policies for selected peers
ogp --for openclaw agent-comms configure <peer-id> \
--topics "memory-management,testing,general" \
--level full
# Or set global defaults
ogp --for openclaw agent-comms configure --global \
--topics "general,testing" \
--level summary
# Show the updated configuration
ogp --for openclaw agent-comms policies <peer-id>
ogp --for openclaw agent-comms policies
Shows global defaults and per-peer overrides.
ogp --for openclaw agent-comms policies 302a300506032b65
Shows effective policy for a specific peer (global + overrides).
ogp --for openclaw agent-comms configure --global \
--topics "general,testing" \
--level summary \
--notes "Default: be helpful but don't overshare"
ogp --for openclaw agent-comms configure <peer-id> \
--topics "memory-management,testing,general" \
--level full \
--notes "Stan is a trusted collaborator"
ogp --for openclaw agent-comms configure 302a300506032b65,5f8b2c,9d4e1f \
--topics "testing" \
--level full
Note: Prefer peer IDs. Partial peer IDs or display-name matches may work, but peer IDs are canonical.
ogp --for openclaw agent-comms add-topic <peer-id> calendar --level escalate
ogp --for openclaw agent-comms remove-topic <peer-id> personal
ogp --for openclaw agent-comms reset <peer-id>
Example:
Global: { "general": "summary", "testing": "full" }
Stan (302a300506032b65): { "memory-management": "full" }
Effective for Stan:
- general: summary (from global)
- testing: full (from global)
- memory-management: full (from Stan-specific)
Stored in the active framework's peers.json under each peer:
{
"id": "302a300506032b65",
"alias": "Stanislav",
"responsePolicy": {
"memory-management": {
"level": "full",
"notes": "Stan is working on similar architecture"
},
"testing": {
"level": "full"
},
"calendar": {
"level": "escalate",
"notes": "Ask me before sharing schedule"
}
}
}
Note: The alias field (formerly petname) is stored with the peer, but agent-comms commands should still prefer the peer ID shown by ogp federation list.
Global defaults live in the active framework config, for example ~/.ogp/config.json or ~/.ogp-hermes/config.json:
{
"humanDeliveryTarget": "telegram:123456789",
"inboundFederationPolicy": {
"mode": "summarize"
},
"agentComms": {
"globalPolicy": {
"general": { "level": "summary" },
"testing": { "level": "full" }
},
"defaultLevel": "summary",
"activityLog": true
},
"notifyTargets": {
"main": "telegram:123456789",
"scribe": "telegram:987654321"
}
}
When an agent-comms message arrives:
full: Engage openlysummary: Brief, high-level responseescalate: "Let me check with my human and get back to you"deny: "I'm not able to discuss that topic"OpenClaw delivery path: OGP should hand human-facing federated work to OpenClaw through /hooks/agent, letting the agent run a real turn and deliver via the configured human channel. A compact sessions.send note may still be used to keep session state synchronized, but that is secondary.
Multi-Agent Routing: When notifyTargets is configured, messages are routed to the appropriate agent who then applies their own policies.
Human Delivery: When humanDeliveryTarget is configured, the agent should treat "tell my human X" as a delivery obligation to that configured channel, not merely as something to mention in whatever session happens to be active.
When enabled, all agent-comms interactions are logged:
# View activity log
ogp --for openclaw agent-comms activity
# View for specific peer
ogp --for openclaw agent-comms activity <peer-id>
# View last N entries
ogp --for openclaw agent-comms activity --last 20
Log format:
2026-03-23 11:52:14 [IN] Stanislav → testing: Hello from Stan!
2026-03-23 11:52:15 [OUT] → Stanislav: Hi Stan! Test received successfully.
2026-03-23 11:55:22 [IN] Leonardo → calendar: What's David's availability?
2026-03-23 11:55:23 [OUT] → Leonardo: [ESCALATED] Checking with David...
ogp --for openclaw agent-comms configure 302a300506032b65 \
--topics "memory-management,testing,general,code-review" \
--level full \
--notes "Trusted peer, full collaboration"
ogp --for openclaw agent-comms configure 5f8b2c... \
--topics "general,status-updates" \
--level summary \
--notes "Professional contact, keep it high-level"
ogp --for openclaw agent-comms configure --global \
--topics "general,testing" \
--level escalate \
--notes "Default: check with human for new peers"
These now have a first-class CLI interview via ogp agent-comms interview, and they remain part of the same operational policy:
forward — forward all inbound federated requests/replies to the humansummarize — summarize and escalate only important/actionable itemsautonomous — act independently unless blocked or explicitly told to relay somethingapproval-required — do not act or reply until the human approvesMake the user's intent explicit during setup and documentation. Examples:
With notifyTargets configured in ~/.ogp/config.json:
{
"notifyTargets": {
"main": "telegram:123456789",
"scribe": "telegram:987654321"
}
}
Each agent can have independent policies. The main agent might have full access for operational topics, while the scribe agent handles content-related discussions.
```bash
ogp --for openclaw agent-comms policies
```
```bash
ogp --for openclaw federation scopes
```
```bash
ogp --for openclaw stop && ogp --for openclaw start --background
```
New peers inherit global defaults. Configure them specifically:
ogp --for openclaw agent-comms configure 302a300506032b65 --topics "..." --level "..."
If notifications aren't reaching the right agent:
notifyTargets and humanDeliveryTarget in the active framework configtelegram:chat_id or a raw session key like agent:main:telegram:direct:wss://localhost:18789 against a TLS-enabled local gateway, not ws://共 1 个版本