# Connect OpenClaw with an agent identity

Give OpenClaw its own [agent identity](/docs/ai-control-plane/identity/agents). Its chats and calls are recorded under the agent, it reaches only the servers you choose, and it can be revoked on its own.

## How it works

Each call OpenClaw makes passes two separate sign-ins:

| Sign-in | Between | What you choose |
| --- | --- | --- |
| **Agent sign-in** | OpenClaw and Speakeasy | How OpenClaw proves it is the agent: an API key, or its platform's own token. |
| **MCP sign-in** | Speakeasy and each MCP server | Whose access each call uses: your own connection, or the server's shared credential. |

The agent's API key only gets OpenClaw into Speakeasy. It never reaches your MCP servers, and choosing it does not change how Speakeasy signs in to them.

## 1. Name the agent

Open [**Identity > Agents**](https://ai.speakeasy.com/@self/projects/default/identities/agents), select **New agent identity**, and enter a name.

![The Name step with the name field highlighted](/assets/docs/ai-control-plane/guides/openclaw/01-name.webp)

## 2. Choose its servers

Select the MCP servers OpenClaw may call.

![Two servers selected](/assets/docs/ai-control-plane/guides/openclaw/02-servers.webp)

## 3. MCP sign-in: choose how Speakeasy signs in to each server

For each server, Speakeasy signs in with your own connection (open its row and select **Connect account**), so OpenClaw acts as you, or with the server's shared credential, so it acts as a service account. You can mix both.

![A shared credential and a server that needs your connection](/assets/docs/ai-control-plane/guides/openclaw/03-auth.webp)

## 4. Agent sign-in: keep API key and create the agent

Keep **API key** selected and select **Create agent**.

When to pick another sign-in

**Claude Tag** and **GKE** let an agent sign in with its platform's own token. Pick one only if OpenClaw runs on that platform. On your own computer or any other host, keep **API key**.

![The Agent sign-in step with API key and Create agent highlighted](/assets/docs/ai-control-plane/guides/openclaw/04-credential.webp)

## 5. Ask OpenClaw to add the plugin

Select **Copy** to copy the setup command. The code expires after 15 minutes.

![The setup command with Copy highlighted](/assets/docs/ai-control-plane/guides/openclaw/05-install.webp)

In an OpenClaw chat, paste the command and ask OpenClaw to add the Speakeasy plugin. It connects to the agent's gateway and installs Speakeasy hooks that record its chats.

![OpenClaw installing the Speakeasy plugin from chat](/assets/docs/ai-control-plane/guides/openclaw/06-chat.webp)

Prefer a terminal?

If you have a shell where OpenClaw runs, such as a terminal on your computer or SSH into its host, run the command there instead.

## 6. Verify

Select **Continue to verification**. It shows **Connected** after OpenClaw's first call.

![The Verify step showing Connected](/assets/docs/ai-control-plane/guides/openclaw/07-verify.webp)

Ask OpenClaw to try a tool from your servers. The agent's **Overview** then lists its chat sessions, MCP connections, and tool calls.

![The agent's chat sessions and MCP connection](/assets/docs/ai-control-plane/guides/openclaw/08-sessions.webp)

![The agent's tool calls](/assets/docs/ai-control-plane/guides/openclaw/09-tool-logs.webp)

---

Index of every Speakeasy page for agents: [llms.txt](https://www.speakeasy.com/llms.txt). AI control plane and MCP gateway content in one file: [llms-full.txt](https://www.speakeasy.com/llms-full.txt). Any page is available as markdown by appending `.md` to its URL or by requesting it with `Accept: text/markdown`.
