← Back to Plugins
Tools

Enterprise

haoyuxiao0223 By haoyuxiao0223 👁 27 views ▲ 0 votes

Enterprise multi-tenant plugin for OpenClaw โ€” governance, audit, isolation, collaboration, and reliability

GitHub

Install

npm install -g

Configuration Example

{
  "enterprise": {
    "enabled": true,
    "kernel": {
      "storage": { "backend": "postgres", "connectionString": "env:DATABASE_URL" },
      "queue": { "backend": "redis", "url": "env:REDIS_URL" },
      "cache": { "backend": "redis", "url": "env:REDIS_URL" },
      "eventBus": { "backend": "redis", "url": "env:REDIS_URL" },
      "lock": { "backend": "redis", "url": "env:REDIS_URL" }
    },
    "governance": {
      "identity": { "provider": "token" },
      "authorization": { "engine": "scope" }
    },
    "audit": {
      "sinks": [
        { "type": "log" },
        { "type": "storage" }
      ]
    },
    "reliability": {
      "metrics": { "provider": "prometheus", "port": 9090 }
    }
  }
}

README

# OpenClaw Enterprise Plugin

Enterprise multi-tenant extension for [OpenClaw](https://github.com/openclaw/openclaw) โ€” adds governance, audit, isolation, collaboration, and reliability layers for enterprise deployments.

## Features

- **Kernel** โ€” Pluggable infrastructure abstractions (Storage, Queue, Cache, EventBus, Lock, Secret) with Memory, PostgreSQL, and Redis backends
- **Governance** โ€” Identity providers (Token, OIDC), authorization engines (RBAC, Scope-based), quota management, content filtering
- **Audit** โ€” Event pipeline with pluggable sinks (Log, Storage, Webhook, EventBus)
- **Collaboration** โ€” Task state machine, workflow engine, agent handoff, knowledge store
- **Embedding API** โ€” REST API with rate limiting, API key management, message envelope
- **Isolation** โ€” Agent runtime backends (Kubernetes), resource limiting
- **Reliability** โ€” Circuit breaker, retry policies, checkpointing, health checks, timeout management, Prometheus metrics
- **Middleware** โ€” AuthN, AuthZ, tenant context, audit logging, rate limiting pipeline

## Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 OpenClaw Gateway                 โ”‚
โ”‚  (upstream โ€” syncs independently)               โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚            Enterprise Plugin (this repo)         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Kernel   โ”‚ โ”‚ Governance โ”‚ โ”‚     Audit     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚Collabora.โ”‚ โ”‚ Embedding  โ”‚ โ”‚   Isolation   โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”‚
โ”‚  โ”‚Reliabilityโ”‚ โ”‚ Middleware โ”‚                     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚          PostgreSQL  โ”‚  Redis  โ”‚  Kubernetes     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

## Installation

### As an OpenClaw Plugin

```bash
# Install OpenClaw
npm install -g openclaw

# Install the enterprise plugin
openclaw plugins install @openclaw/enterprise
```

### From Source (Development)

```bash
git clone https://github.com/haoyuxiao0223/openclaw-enterprise-plugin.git
cd openclaw-enterprise-plugin
npm install
```

## Configuration

Add the `enterprise` section to your `openclaw.json`:

```json
{
  "enterprise": {
    "enabled": true,
    "kernel": {
      "storage": { "backend": "postgres", "connectionString": "env:DATABASE_URL" },
      "queue": { "backend": "redis", "url": "env:REDIS_URL" },
      "cache": { "backend": "redis", "url": "env:REDIS_URL" },
      "eventBus": { "backend": "redis", "url": "env:REDIS_URL" },
      "lock": { "backend": "redis", "url": "env:REDIS_URL" }
    },
    "governance": {
      "identity": { "provider": "token" },
      "authorization": { "engine": "scope" }
    },
    "audit": {
      "sinks": [
        { "type": "log" },
        { "type": "storage" }
      ]
    },
    "reliability": {
      "metrics": { "provider": "prometheus", "port": 9090 }
    }
  }
}
```

## Deployment

### Docker Compose

```bash
cd deploy/docker-compose
docker compose up -d
```

This starts OpenClaw with enterprise mode, PostgreSQL, and Redis.

### Kubernetes (Helm)

```bash
helm install openclaw-enterprise deploy/helm/openclaw-enterprise \
  --set postgres.auth.password=<your-password>
```

## Project Structure

```
โ”œโ”€โ”€ index.ts                 # Plugin entry (definePluginEntry)
โ”œโ”€โ”€ bootstrap.ts             # Enterprise subsystem assembly
โ”œโ”€โ”€ openclaw.plugin.json     # Plugin manifest for OpenClaw discovery
โ”œโ”€โ”€ package.json             # npm package with openclaw metadata
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ kernel/              # Infrastructure abstractions
โ”‚   โ”œโ”€โ”€ kernel-impl/         # Memory / Postgres / Redis implementations
โ”‚   โ”œโ”€โ”€ governance/          # Identity, authorization, quota, content filter
โ”‚   โ”œโ”€โ”€ audit/               # Audit pipeline + sinks
โ”‚   โ”œโ”€โ”€ collaboration/       # Task FSM, workflow, handoff, knowledge
โ”‚   โ”œโ”€โ”€ embedding/           # REST API, rate limiter, API key management
โ”‚   โ”œโ”€โ”€ isolation/           # Agent runtime, resource limiter
โ”‚   โ”œโ”€โ”€ reliability/         # Circuit breaker, retry, checkpoint, health
โ”‚   โ”œโ”€โ”€ middleware/          # AuthN, AuthZ, tenant, audit, rate limit
โ”‚   โ””โ”€โ”€ registry.ts         # EnterpriseModules type definitions
โ”œโ”€โ”€ deploy/
โ”‚   โ”œโ”€โ”€ Dockerfile.enterprise
โ”‚   โ”œโ”€โ”€ docker-compose/
โ”‚   โ””โ”€โ”€ helm/
โ”œโ”€โ”€ database-schema.sql      # PostgreSQL schema
โ”œโ”€โ”€ rls-policies.sql         # Row-Level Security policies
โ””โ”€โ”€ docs/
    โ”œโ”€โ”€ PRD-openclaw-enterprise-architecture.md
    โ”œโ”€โ”€ api-design.md
    โ””โ”€โ”€ tech-desigh.md
```

## How It Works

This plugin integrates with OpenClaw using the standard plugin API:

- **`registerService`** โ€” Bootstraps the enterprise kernel and all modules on gateway start, tears down on stop
- **`registerHttpRoute`** โ€” Mounts the enterprise REST API at `/api/v1/*` on the gateway HTTP server

The enterprise modules are completely decoupled from OpenClaw core:
- Zero imports from upstream OpenClaw source code
- All types are self-contained within this plugin
- Configuration is read from the `enterprise` section of `openclaw.json`

## License

MIT โ€” See [LICENSE](LICENSE) for details.

Based on [OpenClaw](https://github.com/openclaw/openclaw) (MIT License, Copyright 2025 Peter Steinberger).
tools

Comments

Sign in to leave a comment

Loading comments...