# Give a coding agent access

A coding agent working in your repository can connect a service to Logmast, verify it and report the evidence, without a token ever entering your conversation.

## Hand it the prompt

Open **Access → Agents**, or a project's page, and copy the prompt under **Building with an agent?**. It names your workspace and project, which are not secrets. Paste it into the agent's conversation.

The prompt asks the agent to install `logmastctl` and run:

```sh
logmastctl login --workspace WORKSPACE_UUID --project PROJECT_UUID --permission manage --days 1 --scope .
```

## Approve the code it shows you

The agent relays a link and an eight-letter code. Open **Approve a device** (`/device`) in the console, type the code, and check what the request reports:

- the computer and directory the agent runs in;
- your network, shown as a range rather than an address;
- the workspace, project, permission and days it asks for.

Approve if it matches what you just started; you can lower the permission or the days. Management access asks for your authenticator code. If you did not start it, choose **Deny**.

The agent then holds its own access, listed in **Access → Agents** as `logmastctl on <computer>, for <directory>`. Its actions are recorded against that agent. It expires after the days you approved; revoke it there at any time, or the agent can run `logmastctl logout`.

## Never paste a token

Do not paste an API token, agent token or ingest credential into a chat. Conversations are kept in logs and transcripts. If an agent asks for one, point it at `logmastctl login`.

For CI, where nobody can approve a code, create agent access in **Access → Agents**, download its file and keep it in the CI's secret store. See [CLI](/docs/cli/) and [Credentials and data safety](/docs/security/).
