# Set up WaveBrain

You are an AI agent and your user wants you to set up WaveBrain. WaveBrain is a hosted activity log for AI agents: after you take an action that changes something outside the chat (a post, an email, an ad change, an app submission, a deploy), you report it with one `log_action` call, and your user sees it in one timeline at https://getwavebrain.com/dashboard.

It takes three steps. The free plan includes 1,000 actions a month and needs no credit card.

## Rules

- Never print, log, echo or commit the API key. Don't repeat it back in chat. Pass it to commands through the `WAVEBRAIN_API_KEY` environment variable or stdin.
- Don't create an account or sign in for your user. Signing up needs a person.
- Ask before changing config for other agents or profiles than the one you are.

## Step 1: Get an API key from your user

Send your user this message, then wait for the key:

> To connect me to WaveBrain:
> 1. Sign up (free, no credit card): https://getwavebrain.com/sign-up
> 2. Create an API key: https://getwavebrain.com/dashboard/keys
> 3. Paste the key here. It starts with `al_`.

If they already have an account, they only need steps 2 and 3. Once you have the key, keep it in `WAVEBRAIN_API_KEY` for the commands below, for example: `export WAVEBRAIN_API_KEY=<key>` in your shell session, without echoing it.

## Step 2: Install for the agent you are

Run only the section that matches you. Each one is non-interactive.

### Claude Code

```bash
claude plugin marketplace add tambo-ai-labs/wavebrain
claude plugin install wavebrain@wavebrain
printf '{"api_key":"%s"}' "$WAVEBRAIN_API_KEY" | claude plugin configure wavebrain@wavebrain --values-stdin
```

The plugin adds the MCP server, a skill that says when to log, and hooks that count MCP tool calls for Stats. The tools load in the next Claude Code session.

### Codex

```bash
codex plugin marketplace add tambo-ai-labs/wavebrain
codex plugin add wavebrain@wavebrain
```

Codex reads the key from `WAVEBRAIN_API_KEY`. Ask your user to add `export WAVEBRAIN_API_KEY=...` to their shell profile (or add it yourself if they say so). Codex asks to trust the two WaveBrain hooks once: tell your user to open `/hooks` in Codex and trust them.

### Cursor

```bash
npx -y wavebrain-cursor install --yes
```

Needs Node.js 18+. It reads the key from `WAVEBRAIN_API_KEY` (or pass `--key`). Restart Cursor afterwards.

### Hermes

```bash
npx -y wavebrain-hermes install --yes --profile <your-profile>
```

Needs Node.js 18+. It reads the key from `WAVEBRAIN_API_KEY`. Use `--all-profiles` only if your user asks for every bot. Running bots pick it up after `hermes gateway restart`; ask your user before restarting, because it interrupts every running bot.

### Any other MCP client

Add a remote MCP server named `wavebrain`:

- URL: `https://getwavebrain.com/api/mcp` (Streamable HTTP)
- Header: `Authorization: Bearer <WAVEBRAIN_API_KEY>`

Clients that only run local (stdio) servers can use `npx -y mcp-remote https://getwavebrain.com/api/mcp --header "Authorization:${AUTH_HEADER}"` with `AUTH_HEADER="Bearer <key>"` in the server's env. The Connect page (https://getwavebrain.com/dashboard/setup) has exact config for Windsurf, VS Code and Claude Desktop.

### A script, cron job or bot without MCP

No install. Send one request per action:

```bash
curl -X POST https://getwavebrain.com/api/v1/actions \
  -H "Authorization: Bearer $WAVEBRAIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent":"my-script","type":"api_call","title":"Generated 500 offer codes","status":"success"}'
```

## Step 3: Check it works

If your WaveBrain tools are already loaded, call `list_actions` with `{"limit": 1}`; an answer without an error means the key works. Otherwise check the key without logging anything (the empty body is rejected on purpose):

```bash
curl -s -o /dev/null -w "%{http_code}\n" -X POST https://getwavebrain.com/api/v1/actions -H "Authorization: Bearer $WAVEBRAIN_API_KEY" -H "Content-Type: application/json" -d '{}'
```

`400` means the key works; `401` means it's wrong. Then tell your user it's set up and that your actions will show at https://getwavebrain.com/dashboard.

## When to log

After any action that changes something outside the chat, call `log_action` once with a short past-tense `title` (for example "Published the launch post on LinkedIn"), `details` on what changed and the result, a `type` (deploy, publish, email, message, api_call, release, other…), the `project`, and `status` (success or failure). Log failures too. Don't log reads, searches or plans, and never include secrets.

More: https://getwavebrain.com/llms.txt
