> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Whose identity does an AI agent act under in Metorial?
URL: https://metorial.com/docs/platform/guides/whose-identity-does-an-agent-act-under

An agent connected through a person’s sign-in acts as that person, and so does a token they created. A service account acts as its own profile in the portal.

---

An AI client that a person signs in to through the Magic MCP URL acts as that person, with their access groups and their own app accounts. A service account acts as its own profile. Metorial records each tool call under the identity that made it, and `metorial-admin sessions tool-calls list` filters by person, agent or actor.

**What you'll learn**

* Which identity each kind of connection uses
* Which credential the app sees
* How to find an agent's calls

**Before you start**

* [How per-user OAuth works](https://metorial.com/docs/platform/guides/per-user-oauth)
* For the CLI steps, [install `metorial-admin` and sign in](https://metorial.com/docs/build/sandboxes#install-the-tools)

## Identity by connection type

| How the agent connects                                               | Identity in Metorial                                         | Credential the app sees                                                    |
| -------------------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------- |
| A person signs in from Claude, ChatGPT, Cursor, Claude Code or Codex | The person's account                                         | The person's own connection, or the shared account for a shared connection |
| A script with a token a person created                               | That person                                                  | Same as for that person                                                    |
| A job with a Magic MCP token an admin created for one server         | No person. The call is recorded under that server's sessions | The connection configured on the server                                    |
| A job with a service account                                         | The service account's profile in the portal                  | The connection set up for that profile, or the shared account              |
| An agent built on the API                                            | The API key                                                  | The auth config on the session's provider                                  |

Metorial decides which integrations and tools the identity may use. The app then applies the permissions of the credential it receives. With a shared connection, Metorial still records the person, but the app sees one shared account.

An agent connected through a person's sign-in cannot do more than that person. It is limited by their access groups and by what they selected for the client.

## Agents and delegation

Each AI client a person connects appears as an agent under **Identity**, **Agents** in Workforce, linked to that person. You can tell which client made a call as well as which person.

When one actor needs another's credentials, identity delegation grants them for a limited scope and time. An agent's **Delegations** page lists the delegations it owns and the ones granted to it.

## Find an agent's calls

### 1. List the agents

```bash
metorial-admin identity agents list --search "claude"
```

### 2. List the calls of one agent or one person

```bash
metorial-admin sessions tool-calls list --agent-id <agent-id>
metorial-admin sessions tool-calls list --consumer-id <consumer-id>
```

`metorial-admin consumers list --email jo@example.com` prints a person's consumer ID.

### 3. Read one call

```bash
metorial-admin sessions tool-calls get <tool-call-id>
```

In the dashboard, open the agent under **Identity**, **Agents**, or the person under **Identity**, **Accounts**, and select **Operations**.

## Pick the identity for a new agent

If one person starts the agent and reviews its work, let it act as that person. If a team owns it and nobody is present when it runs, give it its own token or service account, in an access group with only the integrations the job uses. [CI and scheduled jobs](https://metorial.com/docs/platform/guides/mcp-access-for-ci-and-scheduled-jobs) has the commands.

## Next steps

* [Shared credentials or per-user OAuth](https://metorial.com/docs/platform/guides/shared-credentials-or-per-user-oauth): what the app sees in each mode
* [Inspect Workforce agents](https://metorial.com/docs/platform/workforce/inspect-agents): review an agent's tool calls and connections
* [Glossary](https://metorial.com/docs/build/glossary): actor, identity, credential and identity delegation