# Register and manage agents

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.

The **Agents** page lists every agent Amiril has seen in an environment, with its owners, its tools and how it is running. An agent shows up there as soon as its first trace arrives, as an **unregistered** agent under the name its traces carry. Registering it gives it a display name you choose. Only a registered agent can have owners, tool grants and gateway tokens.

## Register an agent [#register-an-agent]

Registering or assigning an agent in the app needs the admin role. Open **Agents** and select **Register** on an unregistered agent. The dialog offers two choices:

- **Register as a new agent.** Give it a display name, and optionally a description, owners and a repository.
- **Assign to an existing agent.** Its name moves under a registered agent, and its runs count toward that agent.

To register an agent before it sends any traces, select **Register agent** above the list. That way you can grant its tools and create its gateway token before it goes live. When its traces arrive, their name shows up as an unregistered agent. Assign it to the agent you registered, or let the SDK do it as shown below.

The [Amiril SDK](/sdk) can register an agent too. Pass `init()` a `names` map. Each key is a name your framework gives the agent, and each value is a display name. The TypeScript SDK takes the same option. In Python:

```py title="agent.py"
# The framework calls this agent "payments_v2". File that name under the
# registered agent "Payments", or register it as "Payments" if none exists.
amiril.init(names={"payments_v2": "Payments"})
```

The SDK sends this map when it connects to your workspace. It uses the API key you create on the **Data** page, not a gateway token. With the map above, Amiril puts the name `payments_v2` under the agent Payments in that key's environment, and creates Payments if no agent has that display name. [Connect to your workspace](/sdk/no-framework#connect-to-your-workspace) shows how to set the key.

## When a release sends a new name [#when-a-release-sends-a-new-name]

Your payments agent sends traces under the name `payments_v2`. Amiril has never seen that name, so it adds an **unregistered** agent called `payments_v2` under **Unregistered** on the **Agents** page. Its runs, issues and topics already show there.

You register it with the display name Payments and make yourself its owner. Payments is now a **registered** agent.

A month later a new release sends traces as `payments_v3`. That name arrives as another unregistered agent. You assign it to Payments. All its runs now count toward Payments, including those sent before you assigned it.

A registered agent can have several **names**, such as `payments_v2` and `payments_v3`, but one name belongs to one agent. Its **Settings** tab lists them in the **Names** table, with where each was seen and how many runs it has.

## Where agent names come from [#where-agent-names-come-from]

Amiril reads each run's agent name from its trace. In Langfuse that is the trace's name. In OpenTelemetry it is the `gen_ai.agent.name` attribute, as [send traces with OpenTelemetry](/traces/opentelemetry) shows.

To read it from somewhere else, select **Change** on the **Where agent names come from** card at the foot of the Agents page. It offers three sources:

- **The trace name.** The default, described above.
- **A trace metadata field.** For traces that carry the agent's name in their metadata. Enter that field's key in **Metadata field**, such as `agent_name`.
- **Nowhere. Treat all runs as one agent.** For an environment that runs a single agent.

Changing the source needs the admin role. Amiril then reads the environment's stored traces again, which usually takes a few minutes. Registered agents keep their display names, owners, grants and tokens. For each name the new source finds, Amiril looks at the runs that carry it. The name joins the agent that most of those runs belonged to before the change. If none of them belonged to an agent, the name shows up as a new unregistered agent. Runs that carry no name at all pool into **Unattributed**, a row below the agents.

## Agent owners [#agent-owners]

Owners are the people to contact about an agent. When a tool server the agent uses needs to be reconnected, Amiril emails its owners. You pick them from the workspace's members when you register the agent, or later under **Owners and repository** on its **Settings** tab.

## Agents in each environment [#agents-in-each-environment]

An agent belongs to one environment, such as Development or Production. [Set up environments and API keys](/traces/environments-and-keys) shows where environments come from and how to switch between them. The same name in Development and Production is two agents that share nothing, so you register each one in its own environment. Grants and tokens belong to the agent's environment too.

## Columns and filters on the Agents page [#columns-and-filters-on-the-agents-page]

Registered agents come first, sorted by the column you pick. Unregistered agents follow under their own heading, most active first.

| Column | What it shows |
| --- | --- |
| Agent | The display name over the name it was first seen under |
| Status | **Live** for a run in the last 5 minutes. **Active** for one in the last 24 hours. Otherwise **Idle** |
| Owners | The agent's owners |
| Runs | Runs in the window you picked |
| Issues | Open issues in that window |
| Tools | How many tools it is granted through the gateway |
| Needs review | Granted tools it has not called in 30 days, and destructive tools it can call |

Wide screens also show **Version** and **Last deploy**. The version comes from the agent's traces or its SDK, and **Last deploy** is when Amiril first saw that version.

Two dropdowns narrow the list. **Registration** shows registered or unregistered agents. **Access** finds agents that need review, agents that can call destructive tools and agents that reach external tools. An external tool is on a tool server whose **Type** was set to **External** when someone added it.

## An agent's page [#an-agents-page]

Select an agent to open its page. It has these tabs:

- **Overview**, **Issues** and **Topics** show what the agent did in its traces.
- **Tools** lists the tools its traces show it calling, whether or not they go through the gateway.
- **Access** lists the tools it may call through the gateway, with a switch to grant or revoke each one.
- **Calls** lists its tool calls through the gateway.
- **Connect** has the gateway URL and its tokens.
- **Settings** has its details, owners and names. It also has **Archive this agent** and **Merge into another agent**. Use a merge when two registered agents are the same agent. It moves the names, owners, grants and tokens to the other one.

An unregistered agent's page shows a banner, and its Access, Calls and Connect tabs stay empty until you register it.

## Next steps

- [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.
- [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.
- [Audit agent access](https://docs.amiril.ai/agents/access-log.md): The access log lists every grant and revoke, every tool call the gateway refused and each change to tool servers, gateway tokens and agents.
- [Control tool access with the Amiril gateway](https://docs.amiril.ai/access.md): Put your agents' tools behind the Amiril gateway in four steps. Each agent then sees only the tools you granted it and never has a tool server's key.

## More detail

- [Trace attributes Amiril reads](https://docs.amiril.ai/assistant/traces/attributes.md): Every span attribute and Langfuse field Amiril reads, per dialect: what makes a run, tool call or generation, how agent and session are found, the OTLP receiver, and what is ignored.
- [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: agents](https://docs.amiril.ai/assistant/api/agents.md): The agents routes of Amiril's HTTP API: 41 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.
- [Errors outside rule text](https://docs.amiril.ai/assistant/errors.md): Error shapes, status codes and exact messages of the HTTP API, sign-in and permissions, plans and billing, trace ingest, file imports, the MCP server and rate limits, with causes and fixes.
- [Troubleshooting](https://docs.amiril.ai/assistant/troubleshooting.md): Symptom, cause, how to confirm and fix for common Amiril problems: missing runs, plan limits, wrong agent or environment, rules that never fire or never block, SDK, key, import and MCP failures.
