Independent AI intelligence Two editions daily · ET
Fervor AI

Analysis · November 20, 2026 · concept

LangSmith Tool GatewayMicrosoft Foundryagent-identitymcpagent-securityclaude-code

LangSmith Tool Gateway Makes Every AI Tool Call Pick an Identity: You or the Agent

Each tool your agent touches runs on somebody's keys. Here is a plain way to decide whose, tool by tool, with a Claude Code setup you can try today.

Ask most teams whose permissions their AI agent used to create yesterday's Jira ticket and you get a pause. Then a guess. Usually the honest answer is "whatever token was in the environment when someone set it up."

That guess is turning into a setting. On November 19, LangChain launched LangSmith Tool Gateway in public beta, and its central idea is a single question asked on every tool call: is this agent acting as the user, or acting as itself? Microsoft published the same split for its Foundry agents the same day, from a different angle.

The result is a decision most builders have been skipping. Once a tool call has to declare an identity, you can reason about it, limit it, and audit it. Until then, every agent is borrowing someone's keys without asking.

Here is what the two identities mean, how to choose between them for each tool, and how to try it in Claude Code without touching production.

What a tool gateway is, in plain terms

An agent's tools usually come from MCP servers. MCP (the Model Context Protocol) is the standard plug that lets an AI client like Claude Code or Cursor call outside services: list your Linear issues, search Notion, write to a database. Each server needs credentials, and today those credentials often live in a config file or an environment variable on whoever's laptop runs the agent.

A tool gateway sits in front of those servers like a front desk. LangChain calls it "a managed tool layer" that handles "credentials, identity, and access for every agent tool call." You add MCP servers to LangSmith, pick the tools you want into a tool kit (a curated set published at one URL), and point your agent at that single URL. The agent sees only the tools in its kit, and the gateway decides which credentials each call uses.

That last part is the interesting one.

The two identities

According to the launch post, every call through the gateway runs one of two ways.

Acting as the user. The call uses the person's own account on that service. Your identity provider (the post names Okta and Entra ID) identifies who is asking, and each person connects their own account once. If they have not connected yet, the post says "the call returns a sign-in link, waits for them to authenticate, then continues automatically." The agent can see exactly what that person can see in Linear or Google, and nothing more.

Acting as the agent. The call uses credentials that belong to the agent rather than to any one person, either "agent auth" configured in LangSmith or a profile: a shared credential a workspace admin connects once, which background agents can reuse.

Think of a hotel. Acting as the user is the guest's own room key, which opens one room and stops working at checkout. Acting as the agent is the housekeeping master key, which opens every room on the floor so the work gets done while guests are out. Both keys are legitimate. You would never hand the master key to a guest, and you would not make housekeeping wait for every guest to show up and open the door.

Microsoft drew the same line in its Foundry autopilot docs, with a third option. An "assistive" agent acts on behalf of a signed-in user, within that user's permissions. A "background service" agent acts as itself with app-only permissions. An autopilot gets its own Entra user account with a mailbox and Teams presence, and the November 19 post puts it bluntly: "They work for you, not as you."

Two vendors, one week, the same fork in the road. That is the shift. Identity used to be an accident of setup. Now it is a choice you make per tool.

Why the default is the dangerous option

Most agent setups today run everything on one key. Someone generates a token, drops it in an .env file, and every tool the agent calls inherits it.

That single key causes three problems at once.

It is usually too strong. The person who set it up was an admin, so the agent can do admin things.

It is shared. When five people use the same agent, the service's own logs show one actor doing everything, so "who did this" has no answer.

And it never asks. A read and a delete look identical to a static key.

The gateway does not fix any of this by itself. What it does is force the question into the open, one tool at a time, where you can answer it on purpose.

How to choose, tool by tool

Here is a rule of thumb that holds up for most stacks. Write your tools down first, then walk each one through these four questions.

1. Is a person present and asking? If someone typed the request and the tool touches their own data (their inbox, their tickets, their documents), act as the user. The agent then cannot reach anything that person could not reach by hand, and the service's audit trail names the actual human.

2. Does it run with nobody around? Nightly triage, scheduled reports, a webhook that fires at 3 a.m.: no one is there to click a sign-in link. These act as the agent. Give each job its own narrow profile instead of one profile shared by every background agent, so a mistake in one job cannot spend another job's permissions.

3. Does it write, send, or delete? Put an approval policy on it either way. LangChain's post describes approval policies that "ask the user to confirm a sensitive tool call in their MCP client before it runs," with writing to a data warehouse as the example. Reads can flow. Writes get a human tap.

4. Should anyone ever call it from this agent? If not, do not put it in the kit. A tool the agent cannot see is safer than a tool it is told not to use. For tools that must exist in the workspace but stay off-limits for some people or keys, deny policies block them per user, per service key, or a combination.

Microsoft's docs add one line worth taping to a monitor: "Holding a tool isn't the same as holding access to the data behind it." A SharePoint tool grants no site by itself. Access lives with the identity, so the identity choice is the access decision.

Put this into practice

You can try the whole flow in about half an hour with the Tool Gateway quickstart. Check the prerequisites first, because they will stop some readers at the door. The key ones:

  • A LangSmith Plus or Enterprise plan.
  • A personal access token, which is tied to you. The quickstart warns that "a service key does not work for these steps" (a service key belongs to the workspace rather than a person).
  • Workspace Admin rights if you want workspace-wide servers and kits; editors can add only personal ones.
  • Your LangSmith workspace ID, which API requests send in an X-Tenant-Id header.
  • An MCP client that speaks Streamable HTTP and lets you set a custom header. Claude Code and Cursor both qualify.

The quickstart's default endpoint, https://api.smith.langchain.com, is the US one; other regions use a different base URL. If you follow its API commands instead of the UI, you will also want jq.

The steps below follow the quickstart's order, with one safety habit added at the front.

First: use a sandbox account. The quickstart's example connects Linear and Notion, and its prerequisites recommend a test Linear workspace, because the kit includes save_issue, which creates real issues. Take that advice. Your first tool-gateway experiment should not be able to file tickets in your team's backlog.

Steps 1 and 2: Add the servers, then connect your accounts. In LangSmith, go to Tools, then MCP servers, then Add MCP server, and enter the server URL (Linear's is https://mcp.linear.app/mcp). Click Connect on each row and approve access in the browser. The gateway stores those tokens, so they stop living on your laptop.

Step 3: Build a kit with only what you need. Under Tools, then Tool kits, create a kit and pick tools one by one. The gateway prefixes each with its server name (for example linear_list_issues), which makes logs easier to read later.

Step 4: Point Claude Code at the kit. The quickstart gives the command:

claude mcp add --transport http quickstart-kit \
  "$LANGSMITH_ENDPOINT/v1/managed-tools/kits/$KIT_ID/mcp" \
  --header "X-Api-Key: $LANGSMITH_API_KEY"

Run claude mcp list and the kit should show as connected. Remove it later with claude mcp remove quickstart-kit.

What to expect. Because the key in that header is your personal token, the quickstart says calls "act as you." Ask Claude Code to list your Linear issues and you should see your own issues, filed under your name in the service's history. That is acting-as-the-user, working.

Then: write your identity table before the second kit. Before you add anything else, take ten minutes with a plain list: each tool, U or A (user or agent), and "approve" next to every write. For a support agent it might read like this:

  • linear_list_issues: U (the person asking sees their own issues)
  • linear_save_issue: U, approve (a human taps before a ticket is filed)
  • notion_notion-search: U
  • nightly stale_ticket_report: A, its own profile, read-only

That list is the real deliverable. The gateway is one place to enforce it. The habit carries over to any stack, including one with no gateway at all.

Honest limitations

It is a beta on a paid plan. The quickstart says plainly that "Tool Gateway is in beta," and setup needs Plus or Enterprise. Expect behavior to change.

Some of the best controls are gated. The post says the audit log, which records "which tool ran and as whom," is for Enterprise plans, and tells readers to "talk to our team to get access to deny policies and audit log." Approval policies and kits are what most teams can reach on day one.

A profile is still a shared key. Acting as the agent through a profile is cleaner than a token in an .env file, because an admin owns it and the gateway logs its use. It is still one credential many runs share. Scope it like you would scope a service account, and do not let one profile serve every job.

Every tool call gains a dependency. Routing tools through a hosted gateway means the gateway's uptime is now your agent's uptime. For a nightly batch job that may be fine. For something customer-facing, decide what happens when it is down.

Copies fail together. Microsoft's own post carries the warning that applies to any central control point: "a thousand copies of one autopilot share the same blind spots and fail together." One gateway, one kit, one profile, used by every agent, means one misconfiguration reaches all of them at once.

The gateway only governs what goes through it. An agent that also has a raw API key in its environment can skip the front desk entirely. Check for stray tokens before you call the setup done.

The decision that was always there

None of this is new as a problem. Every agent that ever called a tool used someone's credentials. What changed this week is that two large vendors turned that hidden choice into a named setting, and named settings get reviewed.

So start with the list. Write down every tool your agent can call, mark who it acts as, and put a human tap in front of every write. Whether you then enforce it with LangSmith, with Foundry identities, or with a careful config file is your call. The list is what makes any of them work.

Sources: LangSmith Tool Gateway launch post (November 19, 2026); Tool Gateway quickstart; Microsoft Foundry, "Build trusted autonomous agents for your team" (November 19, 2026); Autopilot overview, Microsoft Learn.