Skip to main content
OpenClaw can use Prem API as a custom OpenAI-compatible provider. OpenClaw sends Chat Completions requests to the local Confidential Proxy, which encrypts them before network egress.
OpenClaw, its workspace, channels, local tools, plugins, and MCP servers remain outside the Prem confidential runtime. This setup protects supported model traffic, not the complete agent.
Use the local Confidential Proxy for sensitive model traffic. Go to the confidential setup.

Confidential API

How the connection works

Before you start

You need:
  • OpenClaw installed. See the OpenClaw setup guide.
  • A Prem API key. See API Keys.
  • A 32-byte client KEK encoded as 64 hexadecimal characters.
  • The current Prem gateway and enclave endpoints.
  • A chat model returned by your Prem model-list request.
Check the installed version:
This configuration has been exercised with OpenClaw 2026.7.1-2 using a normal agent turn and a local file-reading tool call.

1. Set your secrets

Generate the KEK once if you do not have one:
Store the KEK in a secret manager. Do not place either secret in openclaw.json as a literal value.

2. Start the Confidential Proxy

Do not use --no-attest. Keep attestation enabled for confidential inference.

3. Select an enabled model

Use an id returned by this request. The example below uses qwen36-27b. Test it before starting OpenClaw:

4. Configure OpenClaw

OpenClaw reads JSON5 from ~/.openclaw/openclaw.json. Add a custom provider:
The provider must use api: "openai-completions". The Confidential Proxy does not expose /v1/responses. OpenClaw allows the exact baseUrl origin in its guarded model-request path. See the OpenClaw custom-provider reference. Validate the file:

5. Run one agent turn

Run a bounded local turn before connecting channels or schedules:
Inspect the returned provider and model. They should identify prem-confidential and the model you configured. OpenClaw can stream model output through the Chat Completions connection. Tool calls return through the encrypted model channel, but OpenClaw executes each tool in its local environment.

Tool and channel boundary

Review channel allowlists, tool permissions, secret storage, workspace access, and external egress separately.

Agent limits

The encrypted chat endpoint permits one active stream for each API key. Parallel OpenClaw agents using the same key can receive 429 responses. Start with one worker. Serialize model turns or assign a separate Prem API key to each concurrent worker. Review Agents & Automation before enabling unattended schedules or channels.

Troubleshooting

Run openclaw config validate. Check the field names and confirm that api is openai-completions.
The provider is using the wrong adapter. Set api to openai-completions and restart the affected agent process.
Confirm that the Confidential Proxy is running in the same host environment. A container or remote OpenClaw worker needs a reachable proxy address instead of its own loopback interface.
Call /v1/models with the Prem API key and use a returned model ID in both provider locations.
Wait for the current stream to finish. Reduce parallel agent turns or use separate API keys for concurrent workers.

Frequently asked questions

Is OpenClaw running inside the enclave?

No. OpenClaw runs on your machine. Only supported model inference traffic passes through the encrypted Prem path.

Does OpenClaw need the Prem TypeScript SDK?

No. It calls the OpenAI-compatible surface exposed by the local proxy.

Can OpenClaw use tools through this setup?

Yes, when the selected model produces compatible tool calls. OpenClaw executes those tools outside the enclave.

Can I expose the proxy to a remote OpenClaw host?

Yes, but that changes the local trust boundary. Use TLS, authenticated private networking, a restrictive firewall, and a controlled host binding. Do not expose an unauthenticated plaintext listener to the public internet.

Router

Beta
Router is not confidential. Use this path only for non-sensitive prompts, workspace context, and tool results.
OpenClaw uses Router through a separate openai-completions provider.
Confirm that kimi-k3 appears in GET /v1/models for this key. Otherwise, use an exact returned model ID. See Router models. Add a provider named prem-router with these values: Use the complete JSON in the Router OpenClaw configuration, then run openclaw config validate. Do not start the Confidential Proxy or pass a KEK for this provider.

Confidential Proxy

Review modes, routes, keys, and daemon controls.

OpenAI-compatible clients

Understand the interface used by OpenClaw.

Agents & Automation

Review concurrency, retries, and unattended operation.

Security Model

Review the protected and unprotected parts of the flow.