Blog · Guide · 16 November 2026

Agent Identity: One Key, One Agent, One Person

Agent identity answers three questions about anything an agent does: which agent was it, on whose behalf, and can we stop it. With one agent on one laptop these are trivial. With thirty agents across five people, sharing one token in an environment variable, none of them can be answered. This guide sets out a simple model that works for coding agents (one key, one agent, one person), explains the rules that make it trustworthy, and shows how Forkit applies it.

Why agent identity matters

Without identity you cannot do any of the following:

  • Route a question. A permission request should go to the person responsible for the agent. If you do not know who that is, it goes to everyone or no one.
  • Scope a rule. "Ben's agents may run migrations on the dev database" needs a notion of Ben's agents.
  • Audit. "Who allowed this command, and which agent ran it" is the first question after an incident.
  • Revoke. If one agent misbehaves or one key leaks, you want to cut off that one, not all thirty.
  • Trust a message. An agent receiving "from the planner" needs that to be true.

Security writing on agents makes related points. LangChain's explainer on authentication and authorization covers agents acting for users. Vercel writes about agents requesting short-lived, scoped tokens at runtime instead of holding stored credentials. Those are about what an agent can reach in other systems. This article is about the narrower question of who the agent is inside your coordination system.

The model: one key, one agent, one person

An API key per agent. Each agent has its own key. The key's name is the agent's name: db-agent, api-agent, claude-code.

Each key belongs to a person. The agent is acting for a person, and every action by the agent is also attributable to that person.

The workspace is the boundary. Keys are valid in one workspace. Data never crosses workspaces.

That is the whole model. It needs no new protocol. It is the discipline of not sharing keys, plus a server that takes identity seriously.

Rule 1: Identity comes from the key, never from arguments

This rule does most of the work. If a tool accepts an author or agent_id argument and believes it, any agent can claim to be any other. A model can be mistaken about its own name, and text it has read can tell it to lie.

Forkit's documentation states the rule for its own code: never read identity for thread writes from tool arguments or request bodies. The server builds an actor from the API key on every request and passes that through to whatever runs. When an agent posts to a thread, requests a review or sends a message, the sender is the key's agent, whatever the arguments say.

Check this in any system you evaluate. Call a write operation with someone else's name in the arguments and see whose name is recorded.

Rule 2: Store only a hash of the key

A key is a password. Forkit hashes each key with SHA-256 and stores only the hash; the raw key is shown once, when it is created. A database leak does not reveal usable keys.

Practical consequences for you:

  • Save the key when it is shown. It cannot be shown again.
  • Put it in the agent's environment, not in the repository.
  • If you lose it, create a new one and revoke the old.

Rule 3: An agent is not its person

The key ties an agent to a person for accountability. It must not give the agent the person's powers.

In Forkit, only a person can resolve a thread or decide a review. A person's actions come through a signed-in session in the inbox, the terminal client or the personal API. An agent's key cannot perform them. Messages between agents are stored separately from people's events and cannot answer a permission request.

So "acting for a person" means the person is answerable for the agent. It does not mean the agent can approve things in the person's name.

Rule 4: Make key revocation immediate and narrow

You should be able to cut off one agent in seconds.

  • Revoke a key and that agent stops. Others continue.
  • Remove a member from a workspace, and Forkit revokes that person's keys there as part of the same action.
  • Members see only their own keys. A member can revoke their own; they cannot see or revoke a colleague's.

There is one documented trade-off to know. Forkit has an optional setting that lets a checked key be answered from memory for a configured number of seconds, to save database reads under heavy load. With it on, a revoked key can keep working for up to that long. It is off unless the operator sets it.

Rule 5: Short lives for agents nobody watches

A key for an agent on your laptop can be long-lived, because you are there. A key for one of two hundred workers in sandboxes should expire by itself.

Forkit's fan-out keys expire after one hour by default and 24 hours at most. They act under the person of the agent that started them, cannot start further fan-outs, and all stop together when the fan-out is stopped. See agent fan-out explained.

Naming agents

Names end up in inboxes, rules and messages. Choose them for the reader.

  • Name by role, not by model: db-agent, test-agent, docs-agent.
  • Keep names unique where agents will be addressed by name. Forkit lets agents message each other by name, and a name used as an address must be unique.
  • Expect collisions on defaults. Everyone's Claude Code key tends to be called claude-code. Forkit resolves a shared name to the sender's own person's agent, and a session never receives a message it sent to its own name.
  • Use a prefix for groups. Fan-out keys are named <name>-001, <name>-002, which makes them easy to recognise and to match in rules.

What an audit trail should record

For each action, record:

  1. The agent (key name and id).
  2. The person the key belongs to.
  3. What was done: the exact command or the content.
  4. When.
  5. For a decision: who decided, and by what means (a rule, the orchestrator agent, a person).

Forkit's threads are append-only sequences of events, each with the actor's kind (user, agent or system) and name. Permission requests record whether a rule, the orchestrator or a user decided, and who. Every execute_code call is logged with its code, result and duration.

Guest access, and its limits

Forkit's MCP endpoint also accepts Authorization: Guest <identifier>. The identifier is hashed and mapped to an isolated workspace, with no sign-up. The same identifier always returns the same workspace.

This is identity at its weakest: whoever knows the string is the guest. It is intended for trying the MCP tools. The team features (threads, capture, permission requests through the HTTP API) require a real API key, and the number of guest workspaces is capped.

Setting it up

npx forkit-cli init signs you in and creates one API key per agent it finds on your machine, named after the agent. On a team, each person runs it for themselves; keys are personal. Do not copy a colleague's key into your environment. It will work, and every action your agent takes will be recorded as theirs.

A checklist

  • One key per agent. No shared keys.
  • Each key belongs to a named person.
  • Identity is read from the key, never from arguments.
  • Only hashes are stored.
  • Agents cannot perform person-only actions.
  • One key can be revoked without affecting others.
  • Unattended agents have keys that expire.
  • Every decision records who made it.

Related: production access for AI agents and agent permission rules.

Where Forkit fits

Forkit gives every agent a key, ties every key to a person, and reads identity from nothing else. That is what makes its inbox routing, rules and audit meaningful. It is free to try. More at forkit-mcp.com.