# Audit agent access

The access log lists every grant and revoke, every tool call the gateway refused and each change to tool servers, gateway tokens and agents.

Open the access log when you need to know who gave an agent a tool and when, or why the gateway turned a call away.

## Open the log [#open-the-log]

Open **Access log** in the sidebar, under **Control**. The log shows the current environment, newest first, over the last 30 days by default. Reading it takes the `access:read` permission, which both built-in roles have.

Here is part of a log for the payments agent:

| When | Who | Action | Target | Agent | Detail |
| --- | --- | --- | --- | --- | --- |
| 2 minutes ago | Payments | Denied | `payments.refund_payment` | Payments | Not granted |
| 1 hour ago | Ana Silva | Granted | `payments.issue_payment` | Payments | |
| 1 hour ago | Ana Silva | Token created | Production deployment | Payments | Token amiril_live_Ab3dE9xQ… |
| Yesterday | Ana Silva | Server added | Payments | | 2 tools |

The **Who** column names the person who made the change. It reads Amiril for Amiril's own work, such as a scheduled sync, and names the agent for a refused call.

## Find an entry [#find-an-entry]

Narrow the log with the controls above it:

- **Agent** shows one registered agent's entries.
- **Action** shows one kind of entry.
- The search box matches who, the action, the target and the agent.
- The time range sets how far back to look.

The kinds in **Action** are:

| Kind | What it shows |
| --- | --- |
| Granted | Tools granted |
| Revoked | Tools revoked, by a person, by a suggestion or because a server was removed |
| Server changes | Servers added, edited, synced or removed. Tools that appeared, changed or left. A tool's Read, Write or Destructive level changed by hand. Logins the vendor refused |
| Tokens | Gateway tokens created and revoked |
| Agent changes | Agents registered, edited or archived, and owners added or removed |
| Denied calls | Tool calls the gateway refused |

## Read an entry [#read-an-entry]

The **Detail** column adds what the action alone does not say. A revoke from a suggestion reads **Revoked from a suggestion. The agent hadn't used it in 30 days.** A refused call gives one of three reasons:

- **Not granted.** The tool exists but this agent was not granted it. Grant it on the agent's **Access** tab if the agent should have it.
- **Unknown tool.** No tool in the environment has the name the agent called. Check the name in the agent's code, or select **Sync now** on the server if the tool is new.
- **Server unavailable.** The tool's server was removed or cannot sign in. If the server still shows under **Tools**, open it and check whether its status reads **Reconnect needed**.

Allowed calls are not in the log. They are on the agent's **Calls** tab. See [the agent's gateway calls](/agents/access#see-the-agents-gateway-calls).

## Next steps

- [Grant tools to an agent](https://docs.amiril.ai/agents/access.md): Turn on the tools an agent may call, give it a gateway token and point its MCP client at the Amiril gateway. Then revoke the tools it stops using.
- [Register and manage agents](https://docs.amiril.ai/agents.md): Amiril lists every agent it finds in your traces. Register one with a display name so it can have owners, tool grants and a gateway token.
- [Add a tool server](https://docs.amiril.ai/tool-servers.md): Register the MCP server where your agents' tools live and choose how Amiril signs in to it. Then grant its tools to agents on their Access tab.
- [Data storage and retention](https://docs.amiril.ai/workspace/data.md): What Amiril keeps from your traces, rule decisions and tool calls. Set how long each environment keeps data before it is deleted, or stop storing message text.

## More detail

- [Tool servers, the gateway and agent access](https://docs.amiril.ai/assistant/tool-servers.md): Everything about registering MCP tool servers, the four sign-in methods, the Amiril gateway, tool grants, gateway tokens, sync, the access log, access suggestions and their errors.
- [HTTP API: access](https://docs.amiril.ai/assistant/api/access.md): The access routes of Amiril's HTTP API: 16 operations, each with its parameters, request body, responses and token access.
- [Limits and defaults](https://docs.amiril.ai/assistant/limits.md): Every limit and default a customer can hit in Amiril, with its number: plan amounts, ingest sizes and rates, imports, rules, backtests, API and MCP rates, page sizes, retention, name lengths.
