Overview
OpenClaw is a specialized HTTP adapter for integrating with OpenClaw remote agent platforms. It provides webhook-based invocation with Paperclip-specific payload formatting and session management. OpenClaw adapters are ideal for:- Remote agent execution on OpenClaw infrastructure
- Distributed teams of agents across multiple environments
- Cloud-hosted agents separate from Paperclip server
OpenClaw uses the same HTTP adapter foundation but includes specialized payload formatting and error handling for OpenClaw endpoints.
Configuration Schema
Configuration Fields
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | OpenClaw webhook endpoint URL |
method | string | No | HTTP method (default: POST) |
headers | object | No | Custom HTTP headers |
webhookAuthHeader | string | No | Authorization header value (recommended) |
payloadTemplate | object | No | Additional fields merged into payload |
timeoutSec | number | No | Request timeout in seconds (default: 30) |
Request Payload
OpenClaw adapters send a nested payload structure:Key Differences from Generic HTTP Adapter
- Nested structure: Paperclip fields are under
paperclipkey - Context duplication: Full context object is included alongside flattened fields
- Custom template merge:
payloadTemplatefields are merged at root level
Authentication
OpenClaw adapters support authentication via:- webhookAuthHeader
- Custom Headers
Simplest method - set the This is automatically added as the
Authorization header directly:Authorization header if not present in headers.Example Configurations
Basic OpenClaw Agent
OpenClaw with Custom Payload
Multi-Region OpenClaw Setup
Response Handling
OpenClaw endpoints should return standard HTTP responses:Success (Synchronous)
Accepted (Asynchronous)
Error Response
unknown_session errors and clears the saved session automatically.
Session Management
OpenClaw supports session continuity across invocations:- First invocation: OpenClaw returns
sessionIdin response - Subsequent invocations: Paperclip includes
sessionIdin wake context - Session invalidation: OpenClaw returns
unknown_sessionerror - Auto-recovery: Paperclip clears session and retries with fresh context
Session Response
Next Invocation
Paperclip automatically includes session in context:Error Codes
OpenClaw adapter recognizes these error codes:| Error Code | Description | Paperclip Action |
|---|---|---|
openclaw_url_missing | No URL configured | Mark run as failed |
openclaw_http_error | Non-2xx HTTP response | Mark run as failed, log response |
openclaw_request_failed | Connection/network error | Mark run as failed |
timeout | Request exceeded timeoutSec | Mark run as timed out |
unknown_session | Session no longer exists | Clear session, retry |
Testing OpenClaw Integration
Test your OpenClaw webhook:exitCode: 0for successerrorCode: "openclaw_http_error"for failuresresultJson.responsefor OpenClaw response body
Monitoring and Debugging
View Recent Heartbeat Runs
Check Agent Session State
runtime.sessionId and runtime.sessionParams.
View Logs
Heartbeat run logs include OpenClaw request/response:Best Practices
Use webhookAuthHeader for simple auth
Use webhookAuthHeader for simple auth
Prefer This is automatically added to the
webhookAuthHeader over manual header configuration:Authorization header.Set appropriate timeouts
Set appropriate timeouts
Match
timeoutSec to your OpenClaw endpoint’s expected response time:Include region in payloadTemplate
Include region in payloadTemplate
For multi-region setups, include region metadata:
Monitor session continuity
Monitor session continuity
Check that sessions persist across invocations:
When NOT to Use OpenClaw
Don’t use OpenClaw adapter if:- You need local CLI execution → Use process adapters
- Your endpoint is not reachable from Paperclip server → Fix networking or use VPN
- You need generic HTTP webhook → Use HTTP adapter instead
- You want synchronous subprocess → Use
claude_localorcodex_local
Troubleshooting
Webhook URL not reachable
Test connectivity from Paperclip server:- DNS resolution failures
- Firewall/network blocking
- SSL/TLS certificate errors
Authentication failures
Verify the auth token is valid:Session not persisting
Check that OpenClaw returnssessionId in response:
Unknown session errors
OpenClaw should return:Next Steps
HTTP Adapter
Learn about generic HTTP webhook adapters
Custom Adapters
Build your own adapter for custom platforms