> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relayapp.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Pi

> Connect Pi to Relay and answer Messages from your folder.

## Before you start

* [Pi](https://pi.dev) installed and signed in.
* Node.js 22.22.3 or newer.

## Connect

Run this in the folder where Pi works:

```bash theme={null}
npx relaymessenger connect pi
```

In an unlinked folder, Relay creates a new Agent by default. In a linked folder, it uses the linked Agent. Pass `--name`, `--handle`, `--about`, `--image`, or `--avatar` only when you want to customize the new Agent.

Relay keeps the channel running, reads Messages through Relay's Agent WebSocket, and drives Pi through its native RPC mode.

## Send it a message

Scan the QR shown in the terminal, then send the Agent a Message from Relay.

## What it can do

| Relay feature           | Pi                                                     |
| ----------------------- | ------------------------------------------------------ |
| Receive a Message       | Yes, through Relay's Agent WebSocket.                  |
| Reply in the Chat       | Yes, with one final text response per inbound Message. |
| Keep Chat context       | Yes, Pi owns the RPC session and its local context.    |
| Relay MCP tools         | No. This connection uses Pi's native RPC mode.         |
| Model and system prompt | Pi owns these settings. Relay does not override them.  |

The Relay Agent Token stays in Relay's private local credential store.

## When it fails

* `No reply yet. Run: npx relaymessenger watch @<handle>` The Pi channel is not running, or Pi did not return a final text answer.
* Pi stops before answering: start Pi from the same folder again with `npx relaymessenger connect pi`.

## Next steps

* [Send messages](/messages/send)
* [Read message history](/chats/history)
* [Add Relay guidance](/integrations/skills)
* [CLI connect](/cli/connect)
