/login and refreshes tokens dynamically for long-running sessions.
Sign in
OAuthCredentials. Files land in ~/.prime/agent/auth.json (mode 0600).
Not every provider supports OAuth — for those you’ll be asked for an API key instead. See Providers and models for the mix.
Token refresh
Providers rotate OAuth tokens. Fleet Prime Agent resolves credentials dynamically withgetApiKey on every provider call so long-running sessions keep working even when a token expires mid-run. Callers never see a stale token.
Storage caveats
packages/ai used to persist OAuth credentials itself. Storage was removed from the AI layer; each caller is responsible for persisting credentials themselves. In practice you use auth.json through the standard FileAuthStorageBackend. If you build a custom integration on top of packages/ai directly, wire storage up yourself.
Related
- Configuration —
auth.jsonlayout, permissions, env var overrides. - Security — trust model and credential handling.