Skip to main content

The open-source toolkit

OpenClaw Serverless

Run AI agents on Cloud Run, with a separate home for each tenant.

Open sourceMIT license

What it does

OpenClaw Serverless deploys AI agents to Google Cloud Run. Each tenant has a separate service, service account, and storage bucket. Workspaces persist in Cloud Storage, and Telegram or Slack webhooks route messages to the appropriate agent.

What’s included

Multi-Tenant Isolation

Give each tenant its own Cloud Run service, service account, and workspace bucket.

  • Separate Cloud Run services per tenant
  • Individual service accounts with strict IAM
  • Isolated GCS workspace buckets
  • Network segmentation and secret scoping

Serverless Architecture

Scale-to-zero GCP Cloud Run instances with persistent workspace storage.

  • Zero minimum instances for idle tenants
  • Cold starts when an idle service receives a request
  • GCSFuse mounts for workspace persistence
  • Configurable instance and scaling limits

Messaging Integration

Route messages from Telegram and Slack with request validation.

  • Telegram bot webhook with timing-safe signature validation
  • Slack app with HMAC-SHA256 signature verification
  • Centralized router for tenant routing
  • Replay attack prevention

Getting it running

01

Configure Tenants

Define tenants in a YAML configuration file. Each tenant gets its own Cloud Run service, service account, and workspace.

02

Deploy with Terraform

Apply Terraform to provision all GCP infrastructure: Cloud Run services, GCS buckets, IAM bindings, and secrets.

03

Register Webhooks

Set up Telegram bot tokens or Slack app credentials. The router automatically routes incoming messages to the correct tenant.

04

Scale Automatically

Cloud Run services scale with demand and can scale to zero when idle. Storage, network, and other service costs depend on your setup.

What it helps with

Scale down when idle

Configure Cloud Run to scale to zero when inactive. Persistent storage and other Google Cloud services can still incur charges.

Separate tenant resources

Each tenant has its own service account, workspace bucket, and Cloud Run service, with access controlled through IAM.

Configure tenants in YAML

Add a tenant to the YAML configuration, review the Terraform plan, and apply it to provision the tenant’s resources.

Persistent Agent Workspaces

GCSFuse mounts Google Cloud Storage directly into containers, persisting agent state across container restarts without sync daemons.

Built with

GCP Cloud Run (Gen2) Google Cloud Storage GCSFuse Terraform Node.js 20+ Express.js Secret Manager Artifact Registry

A few things you might be wondering

What is OpenClaw Serverless?
OpenClaw Serverless is an open-source deployment architecture for running multiple isolated AI agents on Google Cloud Platform. Each tenant gets their own Cloud Run service with persistent workspace storage and webhook-based messaging integration.
How much does it cost to run?
Costs depend on instance settings, activity, storage, network traffic, and any model APIs your agents use. Scale-to-zero reduces idle compute costs; it does not remove all service costs.
What messaging platforms are supported?
Telegram and Slack integrations are included, with webhook validation and replay protection.
How is tenant isolation achieved?
Each tenant gets a separate Cloud Run service, service account, Cloud Storage bucket, and IAM bindings. Review these permissions and the network configuration for your environment.
Can I add custom agent skills?
Yes. The architecture supports custom agent skills via Git-based skill repositories. Each agent can have its own set of skills configured through the tenant YAML file.

A good place to start

Run OpenClaw Serverless in your environment.

Start with the repository’s setup guide. If you’d like help adapting it to your environment, talk to us about what you need.