---
name: palwick-setup
description: Set up Palwick for an agent that runs in Claude Code: the agent's own mailbox, the Palwick key, the approval loop, and Palwick's tools. Follow this when an owner says "set up Palwick".
---

# Setting up Palwick

You are helping someone who has just been invited to test Palwick, and who may never have seen it before. Go one step at a time, wait for them at each step, and do not assume they know what Desk, Hold, Wire or Hive are. Their own version of these steps is at https://www.palwick.com/setup — follow along with it. Palwick is where the owner says yes or no **before** the agent sends anything. Everything is TEST ONLY while Palwick is in testing.

There is no signup endpoint. The owner makes the keys; you cannot.

## Check the computer first

The setup command does this itself, but know what it checks so you can help: Node 18 or newer, that Palwick is reachable, and that Claude Code is installed. If Claude Code is missing it offers to install it (`npm install -g @anthropic-ai/claude-code`) and carries on afterwards. If Node is missing, they install it from nodejs.org and run setup again.

Never leave them stuck on a missing piece. If something cannot be fixed from the command, say exactly what to click or type.

## What they need first

1. **A Palwick account.** Invite only while testing. If they have none, they ask Palwick for one: https://www.palwick.com
2. **A way for the agent to send email**, separate from their own mailbox. **Strongly prefer a sending service with an API key** — AgentMail, Resend, Postmark, SendGrid or Mailgun. Say why: their own email account and contacts stay out of it, there are no app passwords to hunt for (where most setups stall), it survives a password change or two-step verification, and one key can be revoked in a click. An ordinary mailbox over SMTP works too, and setup fills in the server for common providers, but only suggest it if they insist.
3. **A setup code.** https://desk.palwick.com/settings → Agents → Create key, with the address the agent will send from. Desk then shows a code like `PAL-7F2K-9QX4`. **Ask for the code, not the key**: it works once, expires in half an hour, and cannot be used to act as the agent. Setup trades it for the key over HTTPS, on their computer. (If their agent is elsewhere, Desk also offers "Show the key instead".)

Ask for these one at a time, and wait. **Never ask for the key itself, and never let one be pasted into the chat.** The setup code is what belongs in a conversation; the key is made on their machine and stays there. If they have lost a key, tell them to make another and revoke the old one; keys cost nothing.

Say plainly, before they start, that Palwick is in testing, that nothing here should be used for real work yet, and that they can revoke the key at any time.

## Run setup

```
curl -fsSL https://www.palwick.com/setup.mjs -o palwick-setup.mjs
node palwick-setup.mjs
```

Show the owner the file first if they want to read it. It asks three questions, checks both keys against the real services, and then:

- trades the setup code for the key, and writes `~/.palwick/agent.env`, readable only by them
- writes `~/.palwick/wake.mjs`, and offers to run it every couple of minutes so the agent finishes approved work on its own
- makes a small project folder with a `CLAUDE.md` naming the agent
- writes `~/.palwick/send.mjs`, which asks Desk whether the request is approved before it sends anything
- installs a `palwick` skill at `~/.claude/skills/palwick/SKILL.md`
- registers Palwick's tools with Claude Code (`claude mcp add ... -s user`)

It sends no mail and prints no keys. **Claude Code must be restarted** afterwards to load the tools.

## Check it worked

- `claude mcp list` shows `palwick` as connected.
- `node ~/.palwick/inbox.mjs` lists the agent's mail.
- The tools `request_approval`, `check_request`, `report_sent`, `find_times`, `book_meeting`, `post_briefing`, `list_rooms` are available after a restart.

## Then the loop, every time email goes out

1. `request_approval` (kind `send_email`) with `plain` and `presentation` (`to`, `subject`, `body`).
2. Wait for the owner. Never send while a request is pending, and never poll in a loop: the reply's `check_at` says when to look again.
3. When `check_request` says `approved`:
   `node ~/.palwick/send.mjs --to <address> --subject "<subject>" --body-file <file> --desk-request <id>`
   It asks Desk again before sending, and refuses anything not approved.
4. `report_sent` with the message id it printed.
5. If denied: do not send, and do not find another way.

## Telling them what happened

After setup, say in one or two sentences what now exists: their agent has its own inbox, it must ask before sending, and they decide at desk.palwick.com. Then offer the first test: an email to their own address. Do not send anything until they have approved it in Desk.

## If something is wrong

| What you see | What it means |
|---|---|
| `401` | The key is wrong or revoked. The owner makes a new one in Desk settings |
| `402` | The owner's plan is full. Stop and tell them |
| `403 key_paused` | Palwick or the owner stopped this key. Tell them; they turn it back on in settings |
| `429` | More than 60 calls a minute. Wait, then check back less often |
| A setup code is refused | Codes work once and last 30 minutes. Ask them to press "New setup code" in Desk settings |
| The setup command cannot find `claude` | Print the `claude mcp add` line it shows and let them run it in their terminal |
| `command not found: node` | Node comes with Claude Code. Otherwise they install it from nodejs.org |
| The tools are missing after setup | Claude Code loads tools when it starts. Tell them to restart it |
| They are stuck or something reads wrong | Tell them to email dantes@agentmail.to. Confusing wording counts as a bug worth reporting |

Full guide for everything Palwick does: https://desk.palwick.com/skill.md
