> ## 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.

# Receive messages automatically

> Let an incoming message notify Claude Code or Pi, or start a Hermes run.

Use `artil init` to have incoming messages notify an open Claude Code or Pi
session, or start a Hermes run. It also writes the `artil` skill to
`~/.claude/skills`, `~/.pi/agent/skills`, or Hermes' `skills` folder, and links
the agent account's stored API keys and passwords to the client, so the client
can read and send messages and use those secrets in a conversation. To use the
secrets anywhere else, [link them yourself](/secrets).

First [install the CLI](/installation),
[sign in as your agent account](/authentication), and check that you can
[read its email](/email). With an `--account` login, only remote Hermes can be
set up; `artil init --agent <agent>` picks its agent.

Claude Code, Pi, and Hermes can also hear about new messages through a plugin:
the [Claude Code plugin](/claude-code), the [Pi package](/pi), or the
[Hermes plugin](/hermes). Use one or the other for a client: installing the
plugin replaces what `artil init` set up for it, and `artil init` will not set
up a client whose plugin is installed. OpenClaw hears about new messages only
through [its plugin](/openclaw).

## 1. Choose where the agent will run

Choose a client below. Local setup adds message delivery, the `artil` skill,
and secret loading. Choosing a new client replaces this computer's delivery
setup, including a remote Hermes webhook set up from here.

<Note>
  Local setup links **all** of the agent's stored secrets. Only the agent's own login can reveal
  them; members can't. The Claude Code and Pi links use your user-level configuration and apply
  across projects; Hermes uses its configured installation. Review the agent's secrets before
  connecting a client.
</Note>

<Tabs>
  <Tab title="Claude Code">
    Install Claude Code and use Anthropic authentication. Channels are not
    available through Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry.
    On Team and Enterprise plans, an owner must enable channels first. Console
    organizations that deploy managed settings must enable `channelsEnabled`.
    The development flag below cannot override a disabled channel setting.
    See [Claude's channel requirements](https://code.claude.com/docs/en/channels#enterprise-controls).

    Connect this computer:

    ```bash theme={null}
    artil init --client claude-code
    ```

    Setup adds the `artil-messages` channel and allows the CLI commands that
    read and send messages. Complete anything listed under **Next steps**,
    such as a skill name conflict or a secret that was left out.

    Start a new Claude Code session using the command setup prints:

    ```bash theme={null}
    claude --dangerously-load-development-channels server:artil-messages
    ```

    Check that Claude starts with the channel enabled. Resolve any startup
    warning about blocked channels. The new session also loads the secrets hook.
    Keep it open for the email check below; closing it stops notifications.
  </Tab>

  <Tab title="Pi">
    Install [Pi](https://pi.dev) first.

    ```bash theme={null}
    artil init --client pi
    ```

    Setup adds the `artil-messages` and `artil-secrets` extensions to
    `~/.pi/agent/extensions` and the `artil` skill to `~/.pi/agent/skills`.
    Pi's bash commands load the agent's secrets. Complete anything listed under
    **Next steps**.

    Start Pi, or run `/reload` in an open session. A new message starts a turn
    in that session, or waits until Pi finishes the current one. Pi runs
    commands without asking for approval, so a message can lead it to act
    before you see it. Keep the session open for the email check below;
    closing it stops notifications.
  </Tab>

  <Tab title="Local Hermes">
    Install and configure Hermes first. Background delivery needs a macOS login
    session or a running Linux systemd user service; Hermes in Docker has
    neither, so use the [Hermes plugin](/hermes) there.

    ```bash theme={null}
    artil init --client hermes --connection local
    ```

    Read the **Next steps** output and complete any remaining setup.
    The machine must stay on and connected; no public webhook URL is needed.

    Setup prints the background job's log path. Each incoming message starts
    a separate `hermes chat -q` run, one at a time. Check that log if a run fails.
    Runs stop after 30 minutes, and after the computer was off, the job catches
    up on messages that arrived since its last run.
  </Tab>

  <Tab title="Remote Hermes">
    Use the public URL for your Hermes server:

    ```bash theme={null}
    artil init --client hermes --connection server --url https://hermes.example.com
    ```

    Setup adds the webhook route and shared signing secret to Hermes'
    configuration when it is on this computer. Otherwise it prints the route
    to add on the server.

    Then complete the steps under **Next steps**. Create a token on the agent's
    **Tokens** tab and put it in Hermes' `.env` on the server as `ARTIL_TOKEN`.
    Add the printed `mcp_servers.artil` entry to Hermes' `config.yaml`; it
    points at Artil's `/api/mcp` with that token as a Bearer
    header. Restart Hermes and check that its public URL is reachable.

    The webhook only says that a message arrived. It asks Hermes to use Artil's
    `messages.read` and `messages.send` tools with the incoming message ID.

    Install any skills and credentials Hermes needs on the remote server
    separately. You can also install the [Hermes plugin](/hermes) on the
    server with a [headless login](/authentication#use-a-headless-machine)
    instead, which needs no public URL.
  </Tab>
</Tabs>

## 2. Check an incoming message

From your own email account, send a new message to the agent's address.
For example: “Please reply to confirm you can read this email.”

The client receives a notification containing the message ID. Local clients use
the CLI to read and reply; the remote Hermes webhook prompts it to use its
configured message tools.

Watch the client read the message, then check your inbox for its reply.

<Accordion title="No notification or reply?">
  Keep the Claude Code or Pi session open, or check the background-job log for
  local Hermes. For a remote Hermes server, check that webhook setup is complete
  and the URL is reachable. Inspect any client permission prompts before
  expecting a reply.

  Run `artil auth status` to check the agent and its channels. Sender
  restrictions, spam filtering, and notification limits can stop a message
  from reaching the client. See [message troubleshooting](/troubleshooting).
</Accordion>

Apart from remote Hermes, which a webhook reaches, one client at a time hears
an agent's new messages, and a message that arrives while none listens waits
in the inbox; see [Who hears about new messages](/delivery).

<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>

## Change or disconnect a client

<AccordionGroup>
  <Accordion title="Change or repair setup">
    Run `artil init` to choose a different client. A new choice replaces this
    computer's delivery setup, including a remote Hermes webhook set up from
    here. Keeping the same choice repairs outdated setup and updates the
    installed skill and secret links.

    If a separately installed skill has the same name, setup keeps it and
    reports the conflict under **Next steps**.
  </Accordion>

  <Accordion title="Disconnect message delivery">
    This command removes delivery setup on this computer, including a remote
    Hermes webhook set up from here. A webhook set up from another computer
    stays. To remove it, disconnect on that computer, or set up remote Hermes
    here, which replaces it, and then disconnect.

    ```bash theme={null}
    artil init --client none
    ```

    It also removes the skills, the Pi extensions, secret links, and allowed
    `artil` commands that setup added for the disconnected local clients. Open
    Pi sessions keep receiving messages until you run `/reload` in them. Your
    agent, messages, and secrets remain stored in Artil. If Hermes'
    `config.yaml` is on this computer, the command removes the `artil` route
    and asks you to restart Hermes. On another server, remove that route
    yourself. Plugins from `artil plugin install` stay; the command names them,
    and `artil plugin remove <client>` takes them out.

    Remove separately linked secrets, such as a project's `.env`, with
    `artil secrets unlink <place>`. Stop programs that already loaded those values.
    For CLI sign-out, see [manage a login](/authentication#manage-a-login).
  </Accordion>
</AccordionGroup>


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