Skip to main content

Fullstack App Integration: Agents Meet Your App

Your web app’s backend triggers OpenServ workflows and uses the responses. This works with any framework — Next.js, Express, Flask, Rails, or even a static site with serverless functions.

How It Works

  1. Your Agent / Workflow runs on OpenServ (custom agent, marketplace agent, or both).
  2. Your backend POSTs to the webhook URL with input data.
  3. With waitForCompletion: true, the call blocks until the workflow finishes and returns the result.
  4. Your frontend renders the result.
This works with:
  • Custom agents (runless or runnable) — make sure the agent server is running
  • Marketplace-only workflows — no agent server needed
  • Multi-agent pipelines — custom + marketplace combos

Step 1: Have a Working Workflow

Before connecting your app, you need a workflow with a webhook trigger (waitForCompletion: true). If you don’t have one yet, create it using any of the other guides: After setup, you’ll have a webhook URL like:

Step 2: Connect Your App

The Prompting Guide

Tell your AI coding tool (Cursor, Windsurf, OpenClaw, etc.) to build the integration. Pick the prompt that matches your situation:

“I already have an app, just add the integration"

"Build me a new app from scratch"

"I want to use the OpenServ client package”


The Two Integration Approaches

Approach 1: Raw HTTP (No Dependencies)

Works with any language or framework. Just POST to the webhook URL:
See Webhook URLs in the client reference for URL format details.
Handles authentication, token resolution, and error handling:
See Firing Triggers for all fireWebhook() options.

Important Notes

Timeout: Always set timeout to at least 600 seconds (10 minutes) when creating the trigger. Agents often need significant time, especially in multi-agent workflows.
ScenarioAgent Server Required?
Marketplace-only workflowNo — marketplace agents are hosted by OpenServ
Custom agent (runless or runnable)Yes — run(agent) must be running
Multi-agent (custom + marketplace)Yes — the custom agent needs to be running
For production: Deploy your custom agent to a VPS with DISABLE_TUNNEL=true and set the endpointUrl in provision(). Your web app can be deployed anywhere — it just calls the webhook URL.

Debugging

Webhook returns 404? The trigger token is wrong or the trigger isn’t activated. Webhook times out? The agent server isn’t running, or the workflow is taking longer than the timeout. Paste this to OpenClaw: