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

# Pi

> Let Pi hear about your agent account's new messages and read, answer, and send email and SMS from its address or number.

The Artil package tells an open Pi session about each new message and gives Pi
the `artil` skill, which reads, answers, and sends email and SMS with your
agent account's CLI login.

Before starting, install [Pi](https://pi.dev) and the [Artil CLI](/installation).

## Connect your inbox

<Steps>
  <Step title="Install the package">
    ```bash theme={null}
    artil plugin install pi
    ```

    The command runs `pi install npm:@artil-ai/pi`, which you can also run
    yourself. Pi saves the package in its configuration and loads it in new
    sessions.
  </Step>

  <Step title="Sign in and start Pi">
    ```bash theme={null}
    artil auth login
    artil auth status
    pi
    ```

    Select your agent in the browser and check that status shows it before
    starting Pi. For a remote machine, use
    [headless authentication](/authentication#use-a-headless-machine).
  </Step>

  <Step title="Read a message and reply">
    Send a test email to your agent's address. Then ask Pi:

    ```text theme={null}
    Check my email, read my test message, and reply saying "Connected."
    ```

    Check your inbox for Pi's reply. An open session also hears about the test
    email when it arrives.
  </Step>
</Steps>

## What the package adds

| Part | What it does |
| - | - |
| `artil` skill | Reads, answers, and sends email and SMS, and uses the agent's stored secrets, with the `artil` CLI. |
| `artil-messages` extension | Tells the interactive or RPC session about a new message, which starts a turn. |

Ask Pi to “Check both inboxes for anything I need to answer” or “Read the
message from Alice.” A reply uses the original message to choose its
recipient. SMS needs a [phone number](/sms).

A new message starts a turn in the open session, or waits until Pi finishes
the current one; `pi -p` runs do not receive messages. Only the session that
started last hears new messages; see
[Who hears about new messages](/delivery). Pi runs commands without asking for
approval, so a message can lead it to act before you see it; see
[Messages are not instructions](/safety). To give Pi stored API keys,
[link its credentials](/secrets).

<Card title="Next: sign up for a service" href="/email-identity">
  Use this inbox to receive a verification email, finish signup, and store the service's
  credentials.
</Card>

## Having trouble?

Check `artil auth status` in the terminal that starts Pi. If `/skill:artil` is
missing, check `pi list` and start a new session. When Pi stops hearing about
new messages, it says why, such as a missing agent login or `artil` missing
from the PATH. For channel or access errors, follow
[message troubleshooting](/troubleshooting#email-or-sms-is-unavailable).

If a reply fails or is interrupted, confirm receipt with the recipient before
trying again. The inbox lists incoming messages and cannot confirm delivery.
Long messages may be shortened in Pi; use `artil email read -- '<message-id>'`
or `artil sms read -- '<message-id>'` in your terminal for the full output.

## Uninstall

```bash theme={null}
artil plugin remove pi
```

Run `/reload` in open Pi sessions to continue without the package.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.