Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Credentials for agents

Which credential to give an AI agent and how to keep it - a dedicated account, a scoped personal API key or an expservices token with a short lifetime, OAuth2 for applications, AI provider keys in settings/override only…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/ai-agents/agentic-workflows/credentials-for-agents.md

On this page

Credentials for agents

This page is for developers and administrators who hand a credential to an AI agent. An agent can be wrong, can be misled by text it reads, and leaves transcripts behind. So it should hold the narrowest credential that does the job, for the shortest time, and never see the credential in its own context.

Contents

  1. One account per agent
  2. Which credential
  3. Where credentials live
  4. Rotation and revocation
  5. What never goes into a prompt

One account per agent

Give each agent its own account, in its own user group, with a role made for it. Then:

  • its permissions are exactly what you granted, not what a person happens to have;
  • every action it takes is recorded under its own name in the audit trail;
  • disabling the account stops it at once, everywhere.

Never give an agent the administrator account or a person's account. Details: Roles and least privilege.

Which credential

InterfaceCredentialNarrowingRead
REST APIPersonal API key expk_...Scopes (read, publish, edit, remove), a lifetime, never beyond the owner's policiesA read-only API key, step by step
REST API for many usersOAuth2 tokenThe user's own policies, oauth/authorizeOAuth and API keys
expservicesPersonal token expt_...The token's user's policies, a lifetimeAgents and expservices
Exponential IntelligenceThe provider keyLives on the server; editors never see itConfiguring a provider

Where credentials live

  • AI provider keys: in settings/override only (mode 0640), never in a committed file. Setup > EI: Models warns about a provider key anywhere else.
  • Keys and tokens an external agent uses: in the agent platform's secret store or an environment variable, never in source code, a URL, a prompt or a shared configuration file.

General rules for secrets in Exponential: Environment, settings and secrets.

Rotation and revocation

CredentialRevokeRotate
Personal API keyMy account > API access, or an administrator in Setup > oAuth admin > API keysMake the new key before the old one ends, switch, revoke the old
expservices tokenexpsession::tokenRevokeCreate a new token, switch, revoke
OAuth2Setup > oAuth adminTokens expire after TokenTTL; refresh tokens renew them
Any of themDisabling the owner's account ends every key and token at once

Making, revoking, first use and refusals of API keys are in the audit trail as access.apikey.*; expservices tokens as access.expservices.token.* (The audit trail for AI).

What never goes into a prompt

  • A key, token, password or session cookie, even "just for testing".
  • The contents of settings/override.
  • Personal data the task does not need.

If a credential reached a model's context or a transcript, treat it as disclosed: revoke it and make a new one (Incident response for AI).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x