How agent registration associates an identity with each agent, backed by TrueFoundry or your identity provider, and how to pass and govern it in your code.
When an agent calls an MCP server or another agent, the receiving side needs to know which agent is calling — not just that some credential was presented. Without that, an agent either borrows the user’s token, and vanishes from the record, or shares a service account with every other workload, and takes their permissions along with it.An agent identity is how a registered agent proves who it is. Every agent you register in TrueFoundry has exactly one, created as part of registering the agent itself, and presents it on every call it makes.
Where an identity comes from
Agent identity is not a separate object you create and then attach. It is a step in registering the agent, so the identity and the agent are one-to-one — registering the agent brings its identity into being, and deleting the agent takes it away.
The Agent Identity step of the Integrate a Remote Agent flow
The Agent Identity step asks how does this agent prove who it is? You pick where the credential comes from:
TrueFoundry-backed
Identity provider-backed
Who issues and signs the credential
TrueFoundry
Your identity provider — Okta, Microsoft Entra, and similar
Agent registered in an external identity provider
Not required
Required
Best for
Agents you build and run yourself, and getting started
Organizations where the identity provider stays the source of truth for every principal
The identity means the same thing either way — only its issuer differs. For the rest of the registration flow, see registering an agent.An agent has an identity whether or not the Gateway proxies calls to it. An embedded agent — hosted elsewhere, with no callable URL for the Gateway to front — still presents its identity on the calls it makes, so its outbound traffic is governed even though inbound traffic to it is not.
How it differs from a user or a virtual account
TrueFoundry already has two kinds of principal, and an agent identity is a third — it is not a rename of either.
User
Virtual account
Agent identity
Represents
A person
A service or application
A registered agent
Acts as
Itself
Itself
Itself, or on behalf of a user or service
Created by
Inviting a person to the tenant
Creating the virtual account
Registering the agent
Delegation is the difference that matters. A virtual account can only ever act as itself: point one at an MCP server and every call looks identical, whoever prompted it. An agent identity can act on behalf of someone else — a user, or a service — so a single registered agent serving many callers makes calls that stay attributable to whoever each one is for, while remaining identifiable as the agent.
Who the agent can act for
Delegation is bounded by the agent’s collaborators, on the Access Control step of the agent’s registration. The same list that decides who may invoke the agent also decides who the agent may act for.
Collaborators on an agent: Agent Manager can edit it, Agent Access can invoke it and be acted for by it
Role
Grants
Agent Manager
Edit the agent and its configuration
Agent Access
Invoke the agent, and be acted for by it
Each collaborator can be a user, a team, or a virtual account:
Collaborator
The agent acts for
User
That person
Team
Anyone on the team
Virtual account
That service
A virtual account collaborator is how delegation works when there is no human involved. A pipeline or scheduled job authenticates as itself, the agent acts on its behalf, and the call stays attributable to both — the same delegation, with a non-human identity in the subject’s place.Reading the two roles together: anyone with Agent Access can both drive the agent and have the agent act in their name. In the screenshot above, everyone has Agent Access, so the agent can act on behalf of anyone in the tenant — but never on behalf of someone with no Agent Access grant, even if that person could reach the same MCP server directly.
Scope Agent Access to the teams that actually use the agent when you want
delegation held to a smaller set. Granting it to everyone is convenient for
getting started, and wider than most agents need.
Passing the identity in your code
A delegated call carries two bearer tokens: the user in the standard Authorization header, and the agent alongside it in x-tfy-agent-authorization.
Header
Carries
Required
Authorization
The user’s token
Yes
x-tfy-agent-authorization
The agent’s identity token
No
The same header pair is sent on every surface an agent talks to, so an agent that calls a model, a tool, and another agent presents its identity the same way in all three.
Because the user token sits where it always has, adding an agent identity to an existing integration is additive — you attach one more header and the call keeps working exactly as before, now attributed to the agent as well.
The agent identity token authenticates the agent itself. Keep it out of source
control and out of anything the model can read back — an agent that can be
prompted into disclosing its own token can be impersonated.
Granting the agent access to a target
An agent reaches an MCP server the same way anyone else does — by being a collaborator on it. On the server’s Collaborators, the picker offers Users, Teams, and Agents; pick the agent and give it a role, exactly as you would a person.
Adding a registered agent as a collaborator on an MCP server
There is no separate agent-specific permission model to learn. An agent takes the same roles as any other collaborator — MCP Server User to call the server’s tools, MCP Server Manager to administer it — and granting that access is all the agent needs to reach the target.
In the YAML manifest, an agent collaborator is written with an agent: prefix
on the subject — agent:my-remote-agent — alongside the user:, team:, and
virtualaccount: prefixes.
Access to the target and permission to delegate are two different grants.
Being a collaborator on the MCP server lets the agent reach it; Agent Access
on the agent decides whom it may act for once
there.
What changes at the Gateway
Adding an agent identity changes inbound authentication only — how the Gateway identifies and authorizes the caller. Everything downstream is unaffected.
With an agent identity
Inbound
The Gateway resolves both the user and the agent, and authorizes the pair
Outbound
Unchanged — the target is called exactly as it was before
Because outbound authentication is untouched, whatever a target is already configured to use — OAuth2, a shared API key, token passthrough — keeps working as-is. Introducing agent identity to an existing setup does not require reconfiguring a single MCP server’s upstream auth.
End-to-end flow
Put together, here is a full chain: user → agent → agent → MCP server. Jane asks a planner agent to summarize her open tickets; the planner delegates to a research agent, which calls a Zendesk MCP server. Two things hold at every hop: the user stays the same, and the agent header changes to whichever agent is currently calling.Hop by hop:
Hop
Authorization
x-tfy-agent-authorization
What the Gateway checks
Jane → planner-agent
Jane
—
Jane may call planner-agent
planner-agent → research-agent
Jane
planner-agent
planner-agent may call research-agent, and may act for Jane
research-agent → Zendesk MCP
Jane
research-agent
research-agent is a collaborator on the server, and may act for Jane
Two properties come out of this, and together they are the point of the design:
The user is never lost. Zendesk is reached on Jane’s behalf, so it returns Jane’s tickets and enforces Jane’s permissions — three hops from where she started.
Every hop is checked against the agent actually calling.research-agent needs its own access to Zendesk and its own permission to act for Jane. It inherits neither from planner-agent, so a chain cannot accumulate reach that no single agent was granted.
Each agent replaces the agent header with its own identity while passing the
user’s token through unchanged. An agent is authorized on what it was
granted, not on what its caller holds.
FAQ
What happens if the agent header isn't passed?
The call is an ordinary user call. Authorization is the only required header, so a request carrying just the user’s token is authorized on the user’s permissions alone, with no agent attribution and no delegation checks.This is what makes adoption incremental: existing integrations keep working untouched, and an agent starts being attributed the moment it begins sending x-tfy-agent-authorization — with no change needed at the target.
What does a denied call look like?
A denied call returns 403, the same as any other permission denial, so
nothing about your client’s error handling needs to change. Only the message
differs, carrying the real reason — which principal was refused, and why. An
agent that lacks access to a target is therefore distinguishable from a user
who lacks it, without inspecting anything but the message.
Can an agent act for someone who isn't a collaborator on it?
No. If the user has no Agent Access grant on the agent, the delegated call
is rejected — even when that user could reach the same MCP server directly.
Access to a target and permission to delegate are separate grants, and both
must hold.
Does an agent identity replace a virtual account?
No. A virtual account still fits any service that acts only as itself. An
agent identity is for an agent that acts on behalf of users or services,
where you need the call attributable to both the agent and whoever it was for.
See How it differs from a user or a virtual
account.
Do I need an identity provider to use agent identity?
Only if you choose an identity provider-backed identity. With a TrueFoundry-backed identity, TrueFoundry issues and signs the agent’s token and there is nothing external to configure.Pick identity provider-backed when your own provider — Okta, Microsoft Entra, or similar — should remain the source of truth for every principal. Each agent chooses independently, so both kinds can coexist in the same tenant.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TrueFoundry Docs","description":"TrueFoundry documentation — enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","colors":{"primary":"#4f46e5","light":"#4f46e5","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20","dark":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/dark.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=c1cb26554a546d84500b40f7057bece8"},"favicon":"https://mintcdn.com/truefoundry/6bbtTt95c1iCcyph/favicon.svg?fit=max\u0026auto=format\u0026n=6bbtTt95c1iCcyph\u0026q=85\u0026s=f55bde34214b38034126d05b08ea16c7","appearance":{"default":"light"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://www.truefoundry.com/book-demo","label":"Book Demo"},{"href":"https://www.truefoundry.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Sign Up","href":"https://www.truefoundry.com/register"}},"footer":{"socials":{"x":"https://twitter.com/truefoundry","linkedin":"https://in.linkedin.com/company/truefoundry"}},"seo":{"metatags":{"og:type":"website","og:site_name":"TrueFoundry Docs","og:image":"https://assets.production.truefoundry.com/logo.svg","og:description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane."}},"icons":{"library":"fontawesome"},"styling":{"codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"truefoundry","hasAudioNarration":false,"actualSubdomain":"truefoundry","customDomains":["www.truefoundry.com"],"gitSource":{"type":"github","owner":"truefoundry","repo":"docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afc67850955db4b8f1c496d","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"AI Gateway","count":251},{"language":"default","tag":"API Reference","count":202},{"language":"default","tag":"Platform","count":196},{"language":"default","tag":"Integrations","count":132},{"language":"default","tag":"LLM Gateway","count":117},{"language":"default","tag":"AI Deployment","count":109},{"language":"default","tag":"Integrate Models","count":50},{"language":"default","tag":"Guardrails and Security","count":47},{"language":"default","tag":"Observability","count":47},{"language":"default","tag":"MCP Servers","count":44}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@truefoundry.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".line-highlight{background:rgb(var(--primary-light)/.7)!important}.tfy-cat-anchor{scroll-margin-top:6rem;margin-block:1.75rem}.line-highlight:before{background:rgb(var(--primary-light)/.7)!important}.line-highlight:after{background:rgb(var(--primary-light)/.7)!important}"}],"page":{"pagePath":"docs/ai-gateway/agents/agent-identity","slug":"/docs/ai-gateway/agents/agent-identity","pageMetadata":{"title":"Agent and its Identity with TrueFoundry","sidebarTitle":"Agent Identity","description":"How agent registration associates an identity with each agent, backed by TrueFoundry or your identity provider, and how to pass and govern it in your code.","href":"/docs/ai-gateway/agents/agent-identity"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How agent registration associates an identity with each agent, backed by TrueFoundry or your identity provider, and how to pass and govern it in your code.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,Frame,Heading,Mermaid,Note,OptimizedImage,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`When an agent calls an MCP server or another agent, the receiving side needs to know `,_jsx(_components.strong,{children:`which agent`}),` is calling — not just that some credential was presented. Without that, an agent either borrows the user’s token, and vanishes from the record, or shares a service account with every other workload, and takes their permissions along with it.`]}),`\n`,_jsxs(_components.p,{children:[`An `,_jsx(_components.strong,{children:`agent identity`}),` is how a registered agent proves who it is. Every agent you register in TrueFoundry has exactly one, created as part of registering the agent itself, and presents it on every call it makes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`where-an-identity-comes-from`,children:`Where an identity comes from`}),`\n`,_jsx(_components.p,{children:`Agent identity is not a separate object you create and then attach. It is a step in registering the agent, so the identity and the agent are one-to-one — registering the agent brings its identity into being, and deleting the agent takes it away.`}),`\n`,_jsx(Frame,{caption:`The Agent Identity step of the Integrate a Remote Agent flow`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-registration-agent-identity.png?fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=93c8a46d8deaa39de1582f2a0d02e7d3`,alt:`Agent Identity step of the Integrate a Remote Agent flow with TrueFoundry-backed selected and Identity provider-backed available`,\"data-og-width\":`2000`,width:`2000`,\"data-og-height\":`1139`,height:`1139`,\"data-path\":`images/docs/ai-gateway/agents/agent-registration-agent-identity.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-registration-agent-identity.png?w=280\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=29956196d198fa1cd91c62d49d35cac5 280w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-registration-agent-identity.png?w=560\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=2f9143b31c0c6920e31b2652391a9b71 560w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-registration-agent-identity.png?w=840\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=a1ce3c8480521a44b7cce760f53d60f2 840w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-registration-agent-identity.png?w=1100\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=12ae8d6d6b3295911ae2cb461f76f58b 1100w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-registration-agent-identity.png?w=1650\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=4f0f248b66f9d8cf5e5594d58dc48188 1650w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-registration-agent-identity.png?w=2500\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=3f9042773e1e2a74bfe16c69b11e04b8 2500w`})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Agent Identity`}),` step asks `,_jsx(_components.em,{children:`how does this agent prove who it is?`}),` You pick where the credential comes from:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`TrueFoundry-backed`})}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`Identity provider-backed`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Who issues and signs the credential`}),_jsx(_components.td,{children:`TrueFoundry`}),_jsx(_components.td,{children:`Your identity provider — Okta, Microsoft Entra, and similar`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Agent registered in an external identity provider`}),_jsx(_components.td,{children:`Not required`}),_jsx(_components.td,{children:`Required`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Best for`}),_jsx(_components.td,{children:`Agents you build and run yourself, and getting started`}),_jsx(_components.td,{children:`Organizations where the identity provider stays the source of truth for every principal`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The identity means the same thing either way — only its issuer differs. For the rest of the registration flow, see `,_jsx(_components.a,{href:`/docs/agent-platform/agent-governance/agent-registry#registering-an-agent`,children:`registering an agent`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`An agent has an identity whether or not the Gateway proxies calls to it. An `,_jsx(_components.em,{children:`embedded`}),` agent — hosted elsewhere, with no callable URL for the Gateway to front — still presents its identity on the calls `,_jsx(_components.strong,{children:`it`}),` makes, so its outbound traffic is governed even though inbound traffic to it is not.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-differs-from-a-user-or-a-virtual-account`,children:`How it differs from a user or a virtual account`}),`\n`,_jsx(_components.p,{children:`TrueFoundry already has two kinds of principal, and an agent identity is a third — it is not a rename of either.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`User`}),_jsx(_components.th,{children:`Virtual account`}),_jsx(_components.th,{children:`Agent identity`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Represents`}),_jsx(_components.td,{children:`A person`}),_jsx(_components.td,{children:`A service or application`}),_jsx(_components.td,{children:`A registered agent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Acts as`}),_jsx(_components.td,{children:`Itself`}),_jsx(_components.td,{children:`Itself`}),_jsxs(_components.td,{children:[`Itself, `,_jsx(_components.strong,{children:`or on behalf of a user or service`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Created by`}),_jsx(_components.td,{children:`Inviting a person to the tenant`}),_jsx(_components.td,{children:`Creating the virtual account`}),_jsx(_components.td,{children:`Registering the agent`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Delegation is the difference that matters.`}),` A virtual account can only ever act as itself: point one at an MCP server and every call looks identical, whoever prompted it. An agent identity can act `,_jsx(_components.em,{children:`on behalf of`}),` someone else — a user, or a service — so a single registered agent serving many callers makes calls that stay attributable to whoever each one is for, while remaining identifiable as the agent.`]}),`\n`,_jsx(Heading,{level:`2`,id:`who-the-agent-can-act-for`,children:`Who the agent can act for`}),`\n`,_jsxs(_components.p,{children:[`Delegation is bounded by the agent’s `,_jsx(_components.strong,{children:`collaborators`}),`, on the `,_jsx(_components.strong,{children:`Access Control`}),` step of the agent’s registration. The same list that decides who may invoke the agent also decides who the agent may act for.`]}),`\n`,_jsx(Frame,{caption:`Collaborators on an agent: Agent Manager can edit it, Agent Access can invoke it and be acted for by it`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-collaborators.png?fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=e4aa03f13a55c52c9940ac8b4cd0b47b`,alt:`Access Control step showing collaborators Akash Gupta as Agent Manager and everyone as Agent Access, with Add Collaborators and View Permission Details controls`,\"data-og-width\":`1570`,width:`1570`,\"data-og-height\":`690`,height:`690`,\"data-path\":`images/docs/ai-gateway/agents/agent-collaborators.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-collaborators.png?w=280\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=99a00f63bd5303d6bd4c2cf5a6ff30eb 280w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-collaborators.png?w=560\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=391d203d24b92cc33b8b8aa856ec1f26 560w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-collaborators.png?w=840\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=8f9c0188522b17919c1e4361ef024ede 840w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-collaborators.png?w=1100\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=4363b7a885558cfe2c625e256543e19d 1100w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-collaborators.png?w=1650\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=3574556f092997023076f32268150598 1650w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/agent-collaborators.png?w=2500\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=263f5c060d2bd58eeff367104f34385b 2500w`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Role`}),_jsx(_components.th,{children:`Grants`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Agent Manager`})}),_jsx(_components.td,{children:`Edit the agent and its configuration`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Agent Access`})}),_jsxs(_components.td,{children:[`Invoke the agent, `,_jsx(_components.strong,{children:`and`}),` be acted for by it`]})]})]})]}),`\n`,_jsx(_components.p,{children:`Each collaborator can be a user, a team, or a virtual account:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Collaborator`}),_jsx(_components.th,{children:`The agent acts for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`User`}),_jsx(_components.td,{children:`That person`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Team`}),_jsx(_components.td,{children:`Anyone on the team`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Virtual account`}),_jsx(_components.td,{children:`That service`})]})]})]}),`\n`,_jsx(_components.p,{children:`A virtual account collaborator is how delegation works when there is no human involved. A pipeline or scheduled job authenticates as itself, the agent acts on its behalf, and the call stays attributable to both — the same delegation, with a non-human identity in the subject’s place.`}),`\n`,_jsxs(_components.p,{children:[`Reading the two roles together: anyone with `,_jsx(_components.strong,{children:`Agent Access`}),` can both drive the agent and have the agent act in their name. In the screenshot above, `,_jsx(_components.code,{children:`everyone`}),` has Agent Access, so the agent can act on behalf of anyone in the tenant — but never on behalf of someone with no Agent Access grant, even if that person could reach the same MCP server directly.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Scope `,_jsx(_components.strong,{children:`Agent Access`}),` to the teams that actually use the agent when you want\ndelegation held to a smaller set. Granting it to `,_jsx(_components.code,{children:`everyone`}),` is convenient for\ngetting started, and wider than most agents need.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`passing-the-identity-in-your-code`,children:`Passing the identity in your code`}),`\n`,_jsxs(_components.p,{children:[`A delegated call carries two bearer tokens: the user in the standard `,_jsx(_components.code,{children:`Authorization`}),` header, and the agent alongside it in `,_jsx(_components.code,{children:`x-tfy-agent-authorization`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Carries`}),_jsx(_components.th,{children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:`The user’s token`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`x-tfy-agent-authorization`})}),_jsx(_components.td,{children:`The agent’s identity token`}),_jsx(_components.td,{children:`No`})]})]})]}),`\n`,_jsx(_components.p,{children:`The same header pair is sent on every surface an agent talks to, so an agent that calls a model, a tool, and another agent presents its identity the same way in all three.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`LLM Gateway`,id:`llm-gateway`,children:[_jsx(_components.p,{children:`Calling a model on behalf of a user:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:\" ${\"}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`GATEWAY_BASE_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/llm/chat/completions`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:' \"Authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`USER_TOKEN`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:' \"x-tfy-agent-authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`AGENT_TOKEN`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"\u003cmodel>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [{\"role\": \"user\", \"content\": \"Summarize my open tickets\"}]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),_jsxs(Tab,{title:`MCP Gateway`,id:`mcp-gateway`,children:[_jsx(_components.p,{children:`Calling a tool on an MCP server on behalf of a user:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:\" ${\"}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`GATEWAY_BASE_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/mcp/`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`server-nam`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`e`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/server`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:' \"Authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`USER_TOKEN`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:' \"x-tfy-agent-authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`AGENT_TOKEN`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"jsonrpc\": \"2.0\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"method\": \"tools/call\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"params\": {\"name\": \"search_tickets\", \"arguments\": {\"query\": \"open\"}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Agent Gateway`,id:`agent-gateway`,children:[_jsx(_components.p,{children:`Calling another registered agent on behalf of a user:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:\" ${\"}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`GATEWAY_BASE_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/agent/`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`agent-nam`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`e`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:' \"Authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`USER_TOKEN`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:' \"x-tfy-agent-authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`AGENT_TOKEN`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"messages\": [{\"role\": \"user\", \"content\": \"Summarize my open tickets\"}]}'`})]}),`\n`]})})})]})]}),`\n`,_jsx(_components.p,{children:`Because the user token sits where it always has, adding an agent identity to an existing integration is additive — you attach one more header and the call keeps working exactly as before, now attributed to the agent as well.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The agent identity token authenticates the agent itself. Keep it out of source\ncontrol and out of anything the model can read back — an agent that can be\nprompted into disclosing its own token can be impersonated.`})}),`\n`,_jsx(Heading,{level:`2`,id:`granting-the-agent-access-to-a-target`,children:`Granting the agent access to a target`}),`\n`,_jsxs(_components.p,{children:[`An agent reaches an MCP server the same way anyone else does — by being a collaborator on it. On the server’s `,_jsx(_components.strong,{children:`Collaborators`}),`, the picker offers `,_jsx(_components.strong,{children:`Users`}),`, `,_jsx(_components.strong,{children:`Teams`}),`, and `,_jsx(_components.strong,{children:`Agents`}),`; pick the agent and give it a role, exactly as you would a person.`]}),`\n`,_jsx(Frame,{caption:`Adding a registered agent as a collaborator on an MCP server`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png?fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=c9399b64d83da979f8d16f4e926878de`,alt:`Update MCP Server dialog with collaborators developer as MCP Server Manager and my-remote-agent as MCP Server User, and the collaborator picker open on the Agents tab`,\"data-og-width\":`1552`,width:`1552`,\"data-og-height\":`920`,height:`920`,\"data-path\":`images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png?w=280\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=0b682de9d218c06b59cc0c3b0cd68b3a 280w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png?w=560\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=83794af566756ae38b66e474d5b54e65 560w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png?w=840\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=639de7d537610e5c52bdacba35831499 840w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png?w=1100\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=442989f0460427f6336033858569a9d5 1100w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png?w=1650\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=15be564ab0ae70571188c1e683040e2c 1650w, https://mintcdn.com/truefoundry/AJLid0MTtM2uUVhD/images/docs/ai-gateway/agents/mcp-server-agent-collaborator.png?w=2500\u0026fit=max\u0026auto=format\u0026n=AJLid0MTtM2uUVhD\u0026q=85\u0026s=71e975c84bdc54f54b511674e719d03b 2500w`})}),`\n`,_jsxs(_components.p,{children:[`There is no separate agent-specific permission model to learn. An agent takes the same roles as any other collaborator — `,_jsx(_components.strong,{children:`MCP Server User`}),` to call the server’s tools, `,_jsx(_components.strong,{children:`MCP Server Manager`}),` to administer it — and granting that access is all the agent needs to reach the target.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`In the YAML manifest, an agent collaborator is written with an `,_jsx(_components.code,{children:`agent:`}),` prefix\non the subject — `,_jsx(_components.code,{children:`agent:my-remote-agent`}),` — alongside the `,_jsx(_components.code,{children:`user:`}),`, `,_jsx(_components.code,{children:`team:`}),`, and\n`,_jsx(_components.code,{children:`virtualaccount:`}),` prefixes.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Access to the target and permission to delegate are two different grants.\nBeing a collaborator on the MCP server lets the agent reach it; `,_jsx(_components.a,{href:`#who-the-agent-can-act-for`,children:`Agent Access\non the agent`}),` decides whom it may act for once\nthere.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-changes-at-the-gateway`,children:`What changes at the Gateway`}),`\n`,_jsxs(_components.p,{children:[`Adding an agent identity changes `,_jsx(_components.strong,{children:`inbound`}),` authentication only — how the Gateway identifies and authorizes the caller. Everything downstream is unaffected.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`With an agent identity`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Inbound`}),_jsx(_components.td,{children:`The Gateway resolves both the user and the agent, and authorizes the pair`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Outbound`}),_jsx(_components.td,{children:`Unchanged — the target is called exactly as it was before`})]})]})]}),`\n`,_jsx(_components.p,{children:`Because outbound authentication is untouched, whatever a target is already configured to use — OAuth2, a shared API key, token passthrough — keeps working as-is. Introducing agent identity to an existing setup does not require reconfiguring a single MCP server’s upstream auth.`}),`\n`,_jsx(Heading,{level:`2`,id:`end-to-end-flow`,children:`End-to-end flow`}),`\n`,_jsxs(_components.p,{children:[`Put together, here is a full chain: `,_jsx(_components.strong,{children:`user → agent → agent → MCP server`}),`. Jane asks a planner agent to summarize her open tickets; the planner delegates to a research agent, which calls a Zendesk MCP server. Two things hold at every hop: `,_jsx(_components.strong,{children:`the user stays the same`}),`, and `,_jsx(_components.strong,{children:`the agent header changes to whichever agent is currently calling`}),`.`]}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n participant Jane as Jane (user)\n participant GW as Agent / MCP Gateway\n participant A1 as planner-agent\n participant A2 as research-agent\n participant MCP as Zendesk MCP Server\n\n Jane->>GW: Authorization: Jane\n Note over GW: Jane may call planner-agent?\n GW->>A1: Invoke planner-agent\n\n A1->>GW: Authorization: Jane\u003cbr/>x-tfy-agent-authorization: planner-agent\n Note over GW: planner-agent may call research-agent?\u003cbr/>planner-agent may act for Jane?\n GW->>A2: Invoke research-agent\n\n A2->>GW: Authorization: Jane\u003cbr/>x-tfy-agent-authorization: research-agent\n Note over GW: research-agent allowed on Zendesk MCP?\u003cbr/>research-agent may act for Jane?\n GW->>MCP: Call search_tickets\n MCP-->>GW: Jane's open tickets\n GW-->>A2: Result\n A2-->>A1: Summary\n A1-->>Jane: \"You have 4 open tickets…\"`}),`\n`,_jsx(_components.p,{children:`Hop by hop:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Hop`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`x-tfy-agent-authorization`})}),_jsx(_components.th,{children:`What the Gateway checks`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Jane → planner-agent`}),_jsx(_components.td,{children:`Jane`}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Jane may call `,_jsx(_components.code,{children:`planner-agent`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`planner-agent → research-agent`}),_jsx(_components.td,{children:`Jane`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`planner-agent`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`planner-agent`}),` may call `,_jsx(_components.code,{children:`research-agent`}),`, and may act for Jane`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`research-agent → Zendesk MCP`}),_jsx(_components.td,{children:`Jane`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`research-agent`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`research-agent`}),` is a collaborator on the server, and may act for Jane`]})]})]})]}),`\n`,_jsx(_components.p,{children:`Two properties come out of this, and together they are the point of the design:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The user is never lost.`}),` Zendesk is reached on Jane’s behalf, so it returns Jane’s tickets and enforces Jane’s permissions — three hops from where she started.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Every hop is checked against the agent actually calling.`}),` `,_jsx(_components.code,{children:`research-agent`}),` needs its own access to Zendesk and its own permission to act for Jane. It inherits neither from `,_jsx(_components.code,{children:`planner-agent`}),`, so a chain cannot accumulate reach that no single agent was granted.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Each agent replaces the agent header with its own identity while passing the\nuser’s token through unchanged. An agent is authorized on what `,_jsx(_components.strong,{children:`it`}),` was\ngranted, not on what its caller holds.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`faq`,children:`FAQ`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`What happens if the agent header isn't passed?`,id:`what-happens-if-the-agent-header-isnt-passed`,children:[_jsxs(_components.p,{children:[`The call is an ordinary user call. `,_jsx(_components.code,{children:`Authorization`}),` is the only required header, so a request carrying just the user’s token is authorized on the user’s permissions alone, with no agent attribution and no delegation checks.`]}),_jsxs(_components.p,{children:[`This is what makes adoption incremental: existing integrations keep working untouched, and an agent starts being attributed the moment it begins sending `,_jsx(_components.code,{children:`x-tfy-agent-authorization`}),` — with no change needed at the target.`]})]}),_jsx(Accordion,{title:`What does a denied call look like?`,id:`what-does-a-denied-call-look-like`,children:_jsxs(_components.p,{children:[`A denied call returns `,_jsx(_components.code,{children:`403`}),`, the same as any other permission denial, so\nnothing about your client’s error handling needs to change. Only the message\ndiffers, carrying the real reason — which principal was refused, and why. An\nagent that lacks access to a target is therefore distinguishable from a user\nwho lacks it, without inspecting anything but the message.`]})}),_jsx(Accordion,{title:`Can an agent act for someone who isn't a collaborator on it?`,id:`can-an-agent-act-for-someone-who-isnt-a-collaborator-on-it`,children:_jsxs(_components.p,{children:[`No. If the user has no `,_jsx(_components.strong,{children:`Agent Access`}),` grant on the agent, the delegated call\nis rejected — even when that user could reach the same MCP server directly.\nAccess to a target and permission to delegate are separate grants, and both\nmust hold.`]})}),_jsx(Accordion,{title:`Does an agent identity replace a virtual account?`,id:`does-an-agent-identity-replace-a-virtual-account`,children:_jsxs(_components.p,{children:[`No. A virtual account still fits any service that acts only as itself. An\nagent identity is for an agent that acts `,_jsx(_components.em,{children:`on behalf of`}),` users or services,\nwhere you need the call attributable to both the agent and whoever it was for.\nSee `,_jsx(_components.a,{href:`#how-it-differs-from-a-user-or-a-virtual-account`,children:`How it differs from a user or a virtual\naccount`}),`.`]})}),_jsxs(Accordion,{title:`Do I need an identity provider to use agent identity?`,id:`do-i-need-an-identity-provider-to-use-agent-identity`,children:[_jsx(_components.p,{children:`Only if you choose an identity provider-backed identity. With a TrueFoundry-backed identity, TrueFoundry issues and signs the agent’s token and there is nothing external to configure.`}),_jsx(_components.p,{children:`Pick identity provider-backed when your own provider — Okta, Microsoft Entra, or similar — should remain the source of truth for every principal. Each agent chooses independently, so both kinds can coexist in the same tenant.`})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Agent and its Identity with TrueFoundry","sidebarTitle":"Agent Identity","description":"How agent registration associates an identity with each agent, backed by TrueFoundry or your identity provider, and how to pass and govern it in your code.","href":"/docs/ai-gateway/agents/agent-identity"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Where an identity comes from","slug":"where-an-identity-comes-from","depth":2,"children":[]},{"title":"How it differs from a user or a virtual account","slug":"how-it-differs-from-a-user-or-a-virtual-account","depth":2,"children":[]},{"title":"Who the agent can act for","slug":"who-the-agent-can-act-for","depth":2,"children":[]},{"title":"Passing the identity in your code","slug":"passing-the-identity-in-your-code","depth":2,"children":[]},{"title":"Granting the agent access to a target","slug":"granting-the-agent-access-to-a-target","depth":2,"children":[]},{"title":"What changes at the Gateway","slug":"what-changes-at-the-gateway","depth":2,"children":[]},{"title":"End-to-end flow","slug":"end-to-end-flow","depth":2,"children":[]},{"title":"FAQ","slug":"faq","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/truefoundry/9e0085f7ed271180/scripts.js"],"subdomain":"truefoundry","siteName":"TrueFoundry Docs","title":"Agent and its Identity with TrueFoundry - TrueFoundry Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T01:58:03.589Z","originalFileLocation":"docs/ai-gateway/agents/agent-identity.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How agent registration associates an identity with each agent, backed by TrueFoundry or your identity provider, and how to pass and govern it in your code.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Agent and its Identity with TrueFoundry - TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Agent and its Identity with TrueFoundry - TrueFoundry Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ai-gateway/agents/agent-identity.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.truefoundry.com/#organization\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.truefoundry.com#website\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity#webpage\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity\",\"name\":\"Agent and its Identity with TrueFoundry\",\"description\":\"How agent registration associates an identity with each agent, backed by TrueFoundry or your identity provider, and how to pass and govern it in your code.\",\"dateModified\":\"2026-11-13T01:58:03.589Z\",\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agent Governance\",\"item\":\"https://www.truefoundry.com/docs/agent-platform/agent-governance/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Implementing on TrueFoundry\",\"item\":\"https://www.truefoundry.com/docs/agent-platform/agent-governance/truefoundry-implementation\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Agent and its Identity with TrueFoundry\",\"item\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity#article\",\"headline\":\"Agent and its Identity with TrueFoundry\",\"name\":\"Agent and its Identity with TrueFoundry\",\"description\":\"How agent registration associates an identity with each agent, backed by TrueFoundry or your identity provider, and how to pass and govern it in your code.\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity\",\"mainEntityOfPage\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/agents/agent-identity#webpage\"},\"image\":\"https://assets.production.truefoundry.com/logo.svg\",\"dateModified\":\"2026-11-13T01:58:03.589Z\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TrueFoundry Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TrueFoundry Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/ai-gateway/agents/agent-identity.md","siteName":"TrueFoundry Docs","nav":{"global":null,"tabs":[{"tab":"AI Gateway","pages":[{"title":"AI Gateway","href":"/docs/ai-gateway/intro-to-llm-gateway"}]},{"tab":"Agent Platform","groups":[{"group":"Agent Harness","pages":[{"title":"Agent Harness","sidebarTitle":"Overview","href":"/docs/agent-platform/agent-harness/overview"},{"title":"What TrueFoundry Adds on Top of TrueForge","sidebarTitle":"What TrueFoundry Adds","href":"/docs/agent-platform/agent-harness/what-truefoundry-adds"},{"title":"Observability","sidebarTitle":"Observability","href":"/docs/agent-platform/agent-harness/observability"}]},{"group":"Agent Governance","pages":[{"title":"Why Agent Governance","sidebarTitle":"Why Agent Governance","href":"/docs/agent-platform/agent-governance/overview"},{"title":"Agent Governance Key Concepts","sidebarTitle":"Key Concepts","href":"/docs/agent-platform/agent-governance/key-concepts"},{"title":"The Agent Governance Blueprint","sidebarTitle":"Governance Blueprint","href":"/docs/agent-platform/agent-governance/governance-blueprint"},{"group":"Implementing on TrueFoundry","pages":[{"title":"Implementing Agent Governance with TrueFoundry","sidebarTitle":"Implementation Overview","href":"/docs/agent-platform/agent-governance/truefoundry-implementation"},{"title":"Agent Registry Overview","sidebarTitle":"Agent Registry","description":"The system of record for every agent in your organization — what a registry entry carries, and the full walkthrough for registering an agent.","href":"/docs/agent-platform/agent-governance/agent-registry"},{"title":"Agent and its Identity with TrueFoundry","sidebarTitle":"Agent Identity","href":"/docs/ai-gateway/agents/agent-identity"},{"title":"Guardrails for Agents","sidebarTitle":"Guardrails for Agents","description":"Apply guardrails to agent traffic on TrueFoundry to catch prompt injection, PII, secrets, and unsafe tool calls at every agent hop.","href":"/docs/agent-platform/agent-governance/agent-guardrails"},{"title":"Agent Observability","sidebarTitle":"Agent Observability","href":"/docs/agent-platform/agent-governance/agent-observability"},{"group":"Microsoft Agent Platforms","pages":[{"title":"Govern Microsoft Foundry agents calling MCP servers","sidebarTitle":"Microsoft Foundry Agents","href":"/docs/agent-platform/agent-governance/truefoundry-implementation/microsoft-foundry-agents"},{"title":"Govern Microsoft Copilot Studio agents calling MCP servers","sidebarTitle":"Copilot Studio Agents","href":"/docs/agent-platform/agent-governance/truefoundry-implementation/copilot-studio-agents"}]},{"group":"AWS Agent Platforms","pages":[{"title":"Govern AgentCore Agents calling MCP servers","sidebarTitle":"AgentCore Agents","href":"/docs/agent-platform/agent-governance/truefoundry-implementation/agentcore-agents"}]},{"group":"Databricks Agent Platforms","pages":[]},{"group":"Snowflake Agent Platforms","pages":[{"title":"Govern Snowflake Cortex agents calling MCP servers","sidebarTitle":"Snowflake Cortex Agents","href":"/docs/agent-platform/agent-governance/truefoundry-implementation/snowflake-cortex-agents"}]}]},{"group":"Identity Provider Scenarios","pages":[{"title":"TrueFoundry as the Identity Broker","sidebarTitle":"TrueFoundry as Identity Broker","href":"/docs/agent-platform/agent-governance/scenarios/truefoundry-identity-broker"},{"title":"Agent Governance with Okta","sidebarTitle":"Okta and Okta for AI Agents","href":"/docs/agent-platform/agent-governance/scenarios/okta"},{"title":"Agent Governance with Microsoft Entra","sidebarTitle":"Microsoft Entra (Azure AD)","href":"/docs/agent-platform/agent-governance/scenarios/microsoft-entra"},{"title":"Agent Governance with SPIFFE and SPIRE","sidebarTitle":"SPIFFE / SPIRE","href":"/docs/agent-platform/agent-governance/scenarios/spiffe"}]}]}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/docs/platform/overview"}]},{"tab":"AI Deployment","pages":[{"title":"AI Deployment","href":"/docs/ai-deployment-overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/docs/truefoundry_sdk"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/docs/ai-gateway/ecosystem"}]},{"tab":"Changelog","groups":[{"group":" ","pages":[{"title":"Changelog","href":"/docs/changelog"},{"group":"Announcements","pages":[{"title":"Deprecation of Rate Limiting V1 — 2nd November, 2026","href":"/docs/change-announcements/deprecation-of-rate-limiting-v1"},{"title":"Move to Named Guardrail Policies — v0.179","href":"/docs/change-announcements/named-guardrails-config-v0.179"},{"title":"Perplexity Models Move to the Agent API","href":"/docs/change-announcements/perplexity-agent-api-migration"},{"title":"Plan-Based Feature Gating — v0.174.0","href":"/docs/change-announcements/plan-based-feature-gating-v0.174.0"},{"title":"Agent Builder Moving to Trueforge \u0026 Agent APIs Deprecated — v0.172","href":"/docs/change-announcements/agents-moving-to-trueforge"},{"title":"Removing Collaborators from Resources — v0.172.0","href":"/docs/change-announcements/removing-collaborators-from-resources"},{"title":"Deprecation of MCP tool_settings — 26th October, 2026","href":"/docs/change-announcements/deprecation-of-mcp-tool-settings"},{"title":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages","sidebarTitle":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages - 19th August 2026","href":"/docs/change-announcements/deprecation-of-truefoundry-below-0.17-and-api-ml"},{"title":"Minimum Python Version Raised to 3.10 — truefoundry v0.17.0","href":"/docs/change-announcements/python-3.10-minimum-truefoundry-cli-v0.17.0"},{"title":"Budget Limiting V2 — v0.158.0","href":"/docs/change-announcements/budget-limiting-v2-v0.158.0"},{"title":"Deprecation of MCP Servers APIs — 30th September, 2026","href":"/docs/change-announcements/deprecation-of-mcp-servers-v1-apis"},{"title":"Deprecation of Images and Plots in Job Runs — v0.156.0","href":"/docs/change-announcements/deprecation-of-images-and-plots-in-job-runs-v0.156.0"},{"title":"Moving to External Secrets Operator for Secrets Management — v0.151.5","href":"/docs/change-announcements/moving-to-eso-for-secret-management-v0.151.5"},{"title":"MCP DCR client_id \u0026 Redirect URL Validation — v0.148","href":"/docs/change-announcements/mcp-dcr-client-id-validation-v0.148"},{"title":"Deprecation of Routing Config","href":"/docs/change-announcements/deprecation-of-routing-config"},{"title":"Identity and Access Revamp — v0.143","href":"/docs/change-announcements/identity-and-access-revamp-v0.143"},{"title":"AI Gateway Metrics Rename — v0.136","href":"/docs/change-announcements/refactoring-of-ai-gateway-metrics"},{"title":"Deprecation of MCP Servers in Prompts","href":"/docs/change-announcements/deprecation-of-mcp-servers-in-prompts"},{"title":"Deprecation of Common Tools in Playground and Settings — v0.135","href":"/docs/change-announcements/deprecation-of-common-tools-v0-135-0"},{"title":"x-tfy-routing-config Header Removal — v0.133","href":"/docs/change-announcements/routing-config-header-removal-v0.133"},{"title":"Simplified GitOps CI/CD with tfy apply — v0.132","href":"/docs/change-announcements/simplified-gitops-cicd-v0.132"},{"title":"Legacy MCP OAuth Routes Removal — v0.134","href":"/docs/change-announcements/legacy-mcp-oauth-routes-removal"},{"title":"MCP Gateway URL and Transport Changes — v0.130","href":"/docs/change-announcements/mcp-gateway-url-transport-v0.130"},{"title":"Gemini CLI Model Registration Requirement — v0.118","href":"/docs/change-announcements/gemini-cli-model-registration-v0.118"},{"title":"Guardrails YAML Schema Change — v0.116","href":"/docs/change-announcements/guardrails-yaml-schema-change-v0.116"},{"title":"MCP Server Groups Removal — v0.112","href":"/docs/change-announcements/mcp-server-groups-removal-v0.112"}]}]}]}]},"basePath":"","title":"Agent and its Identity with TrueFoundry - TrueFoundry Docs","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DevImLcx.js","DynamicMarkdown-BGHukeRM.js","zoom-image-lightbox-DQG3o8Eu.js","lightbox-handle-r17bVUz3.js"]}