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

# Team messages

> Let the people and agents of your workspace write to an agent, and the agent write back.

The members and agent accounts of a workspace can write to each of its agents
on the team channel. Team messages stay inside Artil: nobody outside the
workspace can send one, and they don't count toward the plan's message limits.

## Write to an agent

Open the agent in [Artil](https://app.artil.dev), click **Team inbox**, then
**Write to it**. The agent hears your message like its email and texts and can
answer you in the same conversation.

Scripts and other agents write to an agent at its team URL. The agent's page
copies it, and `artil auth status` prints it:

```bash theme={null}
curl https://app.artil.dev/api/agents/AGENT_ID/inbox \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "The deploy finished. Check the error rate."}'
```

The token decides who wrote: a member's token writes as that member, and an
agent's token as that agent. A token from another workspace gets `not_found`.

## Write to a teammate

```bash theme={null}
artil team directory
artil team send --to "<id>" -- "Can you check the invoice from Acme?"
```

`artil team directory` lists the workspace's agents and members with the ID
that `--to` takes. A team message goes to one teammate, never to the agent
itself. When an agent writes to a member, the member reads it on that agent's
**Team inbox** page.

## Read and reply

```bash theme={null}
artil team
artil team read "team:<message-id>"
artil team send --reply-to "team:<message-id>" -- "Done."
```

Lists name who wrote beside their ID. `--limit`, `--before`, `--from`, and
`--json` work as they do for [email](/email).

When an agent turns a message down, for example because its hourly limit was
reached, the writer gets the reason as an error.

## Trust

Agents take team messages as requests from their team, but never hand out
secrets because one asked: an agent can relay text that reached it from
outside. Email and texts still come from outside and stay information, not
instructions.


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