Resources / How-to guide

How to govern OpenClaw with Cortega.

Connect OpenClaw to approved models through Cortega, then apply shared security policies and budgets. Keep OpenClaw’s channel and local-tool controls in the deployment.

Manage approved models

Give the assistant a governed model connection with centrally managed access.

Control security and consumption

Inspect routed traffic with configured guardrails and apply a budget for the assistant’s team or service.

Provide an access stop

Revoke the assistant’s Cortega key to deny new governed requests. Stop local execution through its runtime.

How it connects

Route model and tool requests through Cortega.

Employee or serviceTask and authenticated identity
External contentMessages, pages and tool results
Potential attacker instructions
↓ Task and context
OpenClaw agentChannel admission, sessions and local-tool policy
CortegaModel access · guardrails
Budgets · request records
Approved modelsHosted providers or
private inference
Tool pathOpenClaw agent → Cortega MCP gateway → authorized tools

Connect supported MCP tools separately. Keep record permissions at the destination.

Explanatory diagram · Model responses return through the gateway. Local commands and files remain subject to the agent runtime’s permissions.

Setup

Configure the connection.

01

Set up the assistant’s Cortega policy.

Create a scoped identity for the assistant and assign its team. Authorize the models it may use, set a budget and configure the security guardrails required for its workload. Use separate identities or tenants where teams or customers must not share authority.

02

Add Cortega as an OpenClaw model provider.

Add a custom provider in OpenClaw’s configuration. Replace the example endpoint and model alias below with your own, and supply the gateway key through your deployment’s supported secret source.

Example OpenClaw configuration · JSON

{
  "models": {
    "providers": {
      "cortega": {
        "baseUrl": "https://gw.example.com/v1",
        "apiKey": "${CORTEGA_GATEWAY_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "approved-assistant",
            "name": "Approved assistant model"
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "cortega/approved-assistant"
      }
    }
  }
}

This example uses an OpenAI Chat Completions-compatible endpoint. Choose the API adapter supported by your gateway and the model being served. Restart or reload OpenClaw as required by your installed version.

03

Keep the assistant on the governed route.

Review model overrides, fallbacks and environment settings so they do not silently use an unrestricted provider key. Configure channel admission and session permissions in OpenClaw. For supported MCP tools, use the Cortega MCP gateway and grant only the operations the assistant needs. Retain record-level permissions at the connected service.

04

Test a task and the stop procedure.

Run a harmless version of the intended task—for example, summarize invented support tickets through an approved connector. Confirm the model route in Cortega, test an unauthorized action against mock records, and verify the configured budget behavior. Then revoke the assistant’s gateway key and check that a new governed request is denied.

To stop the assistant itself, disable its channel or service and terminate the runtime. Gateway revocation does not cancel every request already executing, stop local commands or undo completed actions.

Check the setup

Verify the permitted and denied paths.

Continue with the product guides.

Get help configuring the deployment.

Book a demo →