Get your dream built 10x faster

How to integrate Larry with OpenClaw

We build custom applications 5x faster and cheaper 🚀

Book a Free Consultation
4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members
Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Stuck on an error? Book a 30-minute call with an engineer and get a direct fix + next steps. No pressure, no commitment.

How to integrate Larry with OpenClaw

 

Direct answer

 

Short answer: Build Larry as an explicit OpenClaw skill by (1) choosing an authentication model (OAuth 2.0 for per-user access or an API key/service account for server-to-server), (2) implementing Larry’s API calls and webhook handlers as an external HTTPS service the skill will call, (3) installing and configuring the skill in ClawHub with the skill’s endpoint and storing credentials securely there, and (4) keeping stateful, long-running, or high-throughput pieces (databases, queues, schedulers) outside the agent runtime. Test locally (ngrok), validate webhooks and token refresh, add detailed logging and retries, and monitor API responses and scopes to debug issues.

 

Detailed plan and concrete steps

 
  • Conceptual overview
    • OpenClaw does not magically connect to Larry — you explicitly create a skill and wire authentication, endpoints, and configuration in ClawHub and in Larry’s developer console.
    • The skill runtime (the agent) can call external HTTP endpoints; any persistent or long-running work must live in external services (databases, background workers, schedulers).
  • Prerequisites
    • Larry developer account and ability to create OAuth clients and/or API keys.
    • Access to ClawHub to register and configure the skill and to store secrets/configuration for the skill.
    • An HTTPS endpoint you control (this will receive invocations from the agent and will call Larry’s API).
  • Choose authentication model
    • OAuth 2.0 — recommended when actions should be taken on behalf of end users. You’ll implement the standard redirect->authorize->token exchange and store access/refresh tokens securely. Ensure scopes requested match the actions the skill needs.
    • API key / service account — simpler for org-level integrations where one key with appropriate scopes is sufficient. Put this key in ClawHub’s secure configuration for the skill rather than hard-coding it in source.
  • Design the runtime architecture
    • Skill entrypoint: an HTTPS webhook or REST endpoint your skill exposes. OpenClaw (via the agent) will invoke this or instruct the agent to call your service depending on how you configure the skill in ClawHub.
    • External services: database for persistent data, background worker/queue (e.g., RabbitMQ, Redis Queue, or cloud-managed task service) for long-running tasks, metrics/logging service for observability.
    • Secrets: store client_id/client_secret, API keys, webhook secrets in ClawHub’s secure config or your own secret store referenced by the skill config.
  • Skill configuration in ClawHub (vendor-neutral description)
    • Create a new skill entry in ClawHub and provide:
      • Skill name and description.
      • The HTTPS endpoint the agent will call to run the skill.
      • Required permission scopes for Larry or labels that document what credentials the skill needs.
      • Where to store credentials — link to the skill’s secret fields in ClawHub (or reference environment variables if ClawHub supports that).
    • Install the skill into the OpenClaw agent environment via ClawHub so the agent knows how to invoke it. (Follow ClawHub’s UI/flow for installation; do not assume hidden behavior.)
  • Implement the HTTP handlers and Larry API calls
    • Keep the skill logic in an HTTPS service you control. The agent invokes that service; that service then calls Larry’s APIs.
    • Example: a simple Node.js Express handler that accepts a skill invocation, ensures authentication, calls Larry, and returns a result.
    const express = require('express');
    const fetch = require('node-fetch');
    const app = express();
    app.use(express.json());
    
    app.post('/skill/larry-invoke', async (req, res) => {
      <b>//</b> Validate the request came from your trusted source (compare a signature, origin, or use ClawHub-provided authentication).
      const invocation = req.body;
    
      <b>//</b> Load stored credentials (from environment or a secrets manager).
      const accessToken = process.env.LARRY_ACCESS_TOKEN;
    
      try {
        <b>//</b> Call Larry's API with the access token. Replace {LARRY_API_URL} with the real endpoint.
        const r = await fetch('{LARRY_API_URL}/some-resource', {
          method: 'POST',
          headers: {
            'Authorization': `Bearer ${accessToken}`,
            'Content-Type': 'application/json'
          },
          body: JSON.stringify({ input: invocation.input })
        });
        const body = await r.json();
    
        <b>//</b> Return the response shape expected by the agent/skill contract.
        res.json({ ok: true, result: body });
      } catch (err) {
        console.error('Larry call failed', err);
        res.status(500).json({ ok: false, error: 'integration_failed' });
      }
    });
    
    app.listen(3000, () => {
      console.log('Skill endpoint listening on :3000');
    });
    
  • Implement OAuth token exchange and refresh (if using OAuth)
    • User is redirected to Larry’s authorization URL (provided by Larry) with client_id, redirect_uri, scope, and state.
    • After user consents, Larry returns a code to your redirect URI. Exchange that code for tokens by POSTing to Larry’s token endpoint. Use secure server-side storage for refresh tokens.
  • <b>//</b> Example token exchange (replace placeholders with real URLs and values)
    curl -X POST '{LARRY_TOKEN_URL}' \
      -d 'grant_type=authorization_code' \
      -d 'code=AUTH_CODE' \
      -d 'redirect_uri=https://your-app.example.com/oauth/callback' \
      -d 'client_id=CLIENT_ID' \
      -d 'client_secret=CLIENT_SECRET'
    
  • Webhook signature verification
    • If Larry sends webhooks to your skill, Larry should provide a signature header and a shared secret. Validate by computing an HMAC (e.g., HMAC-SHA256) over the raw request body and comparing to the header. Use a timing-safe comparison.
    • Example (pseudo): compute HMAC(raw_body, webhook_secret) and compare to header value. Use the header name that Larry documents (e.g., X-Signature or similar).
  • Error handling, retries, and rate limits
    • Inspect Larry’s HTTP status codes and response bodies to implement retries with exponential backoff for transient errors (429, 5xx).
    • Respect rate-limit headers if provided. If you hit limits, queue requests in a durable queue and retry from a worker.
  • Testing and local development
    • Use a tunneling tool (ngrok) to expose your local endpoint to the internet for testing and to register as the skill endpoint in ClawHub during development.
    • Simulate Larry responses with a mock server or by using recorded responses to ensure your skill handles all edge cases (401, expired tokens, rate limits, malformed payloads).
  • Logging, observability, and debugging
    • Log all inbound invocations and outbound requests to Larry with correlation IDs (so you can trace a request end-to-end).
    • When something breaks: check your service logs, ClawHub/agent logs for the skill invocation, Larry API responses, and verify tokens/credentials and scopes. Confirm the skill is installed and the agent is invoking the expected endpoint.
  • Security considerations
    • Store secrets only in secure storage (ClawHub secrets or a dedicated secret manager). Do not commit credentials to source control.
    • Request the minimal OAuth scopes required. Use refresh tokens and rotate secrets when needed.
    • Validate webhooks and inbound requests. Use HTTPS everywhere.
  • Operational considerations
    • Move stateful pieces outside the agent runtime — databases, queues, and scheduled jobs should be run in services you control (cloud providers, containers, serverless functions) so they remain available even if agent instances restart.
    • Plan for token expiry and implement refresh token handling server-side, not in ephemeral agent memory alone.
  • Checklist before go-live
    • Credentials configured and tested in a secure place (ClawHub or secret manager).
    • Webhook verification implemented and validated.
    • OAuth flow tested (consent, token exchange, refresh).
    • Retries and rate-limit handling in place.
    • End-to-end logging and alerting configured.

Book Your Free 30‑Minute Migration Call

Speak one‑on‑one with a senior engineer about your no‑code app, migration goals, and budget. In just half an hour you’ll leave with clear, actionable next steps—no strings attached.

Book a Free Consultation

Troubleshooting Larry and OpenClaw Integration

1

Handshake failed: Larry client cannot connect to OpenClaw daemon (clawd) over ClawRPC socket - how to troubleshoot?

The client cannot open the ClawRPC socket to clawd. Fix by confirming clawd is running, that the socket path is correct and accessible to the Larry client, and by examining clawd logs and permissions (SELinux, user, ownership). Restarting clawd or matching versions often resolves the handshake failure.

 

Quick checks

 

  • Is clawd running? sudo systemctl status clawd or ps aux | grep clawd
  • Does the socket exist & permissions? ls -l /var/run/openclaw/clawd.sock; check owner/group and mode
  • Logs: sudo journalctl -u clawd -e
  • Connectivity: try a local unix-socket connect from the client

const net = require('net');
const socket = '/var/run/openclaw/clawd.sock';
const c = net.createConnection({ path: socket });
c.on('connect', () => { console.log('connected'); c.end(); });
c.on('error', (err) => { console.error('connect error', err.message); process.exit(1); });

2

OpenClaw Router registration error "Undefined template" when registering Larry handlers with clawctl register-handler - what causes it and how to fix?

The "Undefined template" error means clawctl couldn't locate the template your Larry handler references during registration — usually because the handler manifest doesn’t declare the template, the template filename/path/name is wrong, or the built handler package omitted the templates. Fix by correcting the manifest, including the template files in the package, and re-running registration.

 

What causes it

 
  • Missing or mismatched template key in the handler manifest (name typo).
  • Template file not packaged or in wrong directory so Router can't load it.
  • Version/CLI mismatch where expected manifest schema differs from installed clawctl.

 

How to fix

 
  • Open your handler manifest and verify the template name matches exactly.
  • Ensure template files are in the package path the runtime expects (e.g. templates/).
  • Rebuild and run clawctl register-handler with the correct package.
// handler.yaml manifest snippet
name: larry-handler
template: larry-invoke-template // must match template filename/key

3

Serialization error on OpenClaw EventBus: Larry Protobuf schema mismatch (expected v1, got v2) - how to resolve schema/versioning issues?

 

Direct resolution

 

Short answer: make sender and receiver agree on the protobuf version — either revert the producer to v1, upgrade the consumer to accept v2 (with migration), or insert a translation shim that converts v2->v1 before EventBus deserialization. Regenerate protobuf stubs, deploy in a rolling, version-aware way, and add runtime validation and logging for schema mismatches.

 

Practical steps

 
  • Regenerate protobuf code for the target version and use those stubs in the service.
  • Add a pre-deserialize check: read a version tag or attempt v1 decode, fallback to v2 and transform.
  • Deploy producers and consumers in a rolling fashion and monitor mismatches.
  • Introduce a translator service if you can’t upgrade all parties at once.
// attempt decode with v1, fallback to v2 and transform
const v1 = rootV1.lookupType('EventV1');
const v2 = rootV2.lookupType('EventV2');

try {
  const msg = v1.decode(buffer);
  // handle v1
} catch (e) {
  // fallback to v2 then map to v1 shape
  const msgV2 = v2.decode(buffer);
  const msgV1 = { /* map fields from msgV2 to v1 */ };
  // handle transformed msgV1
}

4

Permission denied: claw-agent cannot load Larry plugin from /usr/lib/openclaw/plugins (SELinux, file ownership, or capability issue) - how to diagnose and fix?

 

Direct answer

 

Permission denied means the claw-agent process can't access the Larry plugin file; diagnose by checking UNIX permissions, SELinux context, and Linux capabilities, then fix by correcting ownership/mode, restoring SELinux labels or granting necessary capabilities (never leave SELinux disabled in production).

 

Diagnosis

 
  • Commands to run:
sudo ls -l /usr/lib/openclaw/plugins/Larry  // check owner+mode
sudo ls -Z /usr/lib/openclaw/plugins/Larry  // check SELinux context
sudo getcap /usr/lib/openclaw/plugins/Larry  // check file capabilities
sudo journalctl -u claw-agent | tail -n 50  // agent logs
sudo ausearch -m AVC -ts recent            // SELinux denials

 

Fixes

 
  • Adjust ownership/mode: sudo chown root:root ...; sudo chmod 755 ...
  • Restore SELinux label: sudo restorecon -v /usr/lib/openclaw/plugins/Larry or update policy if AVCs appear.
  • Set capabilities if needed: sudo setcap cap_net_bind_service+ep /usr/lib/openclaw/plugins/Larry
  • Test with sudo setenforce 0 only briefly to confirm SELinux is the cause, then re-enable and fix policy.
Book a Free Consultation

Still stuck?
Copy this prompt into ChatGPT and get a clear, personalized explanation.

This prompt helps an AI assistant understand your setup and guide you through the fix step by step, without assuming technical knowledge.

AI AI Prompt


Recognized by the best

Trusted by 600+ businesses globally

From startups to enterprises and everything in between, see for yourself our incredible impact.

RapidDev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with.

They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

Arkady
CPO, Praction
Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost.

He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Donald Muir
Co-Founder, Arc
RapidDev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space.

They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Mat Westergreen-Thorne
Co-CEO, Grantify
RapidDev is an excellent developer for custom-code solutions.

We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Emmanuel Brown
Co-Founder, Church Real Estate Marketplace
Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 

This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Samantha Fekete
Production Manager, Media Production Company
The pSEO strategy executed by RapidDev is clearly driving meaningful results.

Working with RapidDev has delivered measurable, year-over-year growth. Comparing the same period, clicks increased by 129%, impressions grew by 196%, and average position improved by 14.6%. Most importantly, qualified contact form submissions rose 350%, excluding spam.

Appreciation as well to Matt Graham for championing the collaboration!

Michael W. Hammond
Principal Owner, OCD Tech

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We’ll discuss your project and provide a custom quote at no cost.Â