<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8" -->

---
title: Credentials API for Gemini Managed Agents | daily.dev
description: Google shipped a Credentials API for Gemini Managed Agents (antigravity-preview) that lets agents authenticate to services like GitHub, Notion, or the Gemini...
canonical: https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Credentials API for Gemini Managed Agents | daily.dev
og:description: Google shipped a Credentials API for Gemini Managed Agents (antigravity-preview) that lets agents authenticate to services like GitHub, Notion, or the Gemini...
og:url: https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8
og:image: https://api.daily.dev/og/posts/eXMQRrpB8.png
og:image:alt: Credentials API for Gemini Managed Agents
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Credentials API for Gemini Managed Agents

**[Philipp Schmid](https://daily.dev/sources/philschmid)** · 3 min read · 0 upvotes · 0 comments

## Summary

Google shipped a Credentials API for Gemini Managed Agents (antigravity-preview) that lets agents authenticate to services like GitHub, Notion, or the Gemini API without exposing raw secrets inside the Linux sandbox. Secrets are stored server-side, referenced by ID, and injected on the wire by an egress proxy, so code running in the sandbox never sees the actual token. Three credential types are supported: bearer tokens injected as HTTP headers, OAuth2 with automatic refresh, and environment-variable style credentials where the container only sees a placeholder that the proxy swaps for the real value on requests to trusted domains. A worked example shows a custom agent reviewing and smoke-testing GitHub pull requests using a read-only GitHub token and a Gemini API key bound as credentials, with requests to untrusted domains blocked with a 403. Credentials can be rotated or deleted by ID without changing the agent definition.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.philschmid.de/managed-agents-credentials>

## Questions this post answers

### How does the Credentials API keep API keys away from code running inside a Gemini Managed Agent sandbox?

Secrets are stored server-side and never enter the Linux sandbox; the agent only sees a placeholder like __GEMINI_CRED_<id>__, and the egress proxy swaps in the real value on the wire only when the request targets a domain listed in trusted_domains. Requests to untrusted domains carrying the placeholder are blocked with a 403.

_Developers securing agent workflows can track platform changes like this via daily.dev._

### What credential types does the Gemini Managed Agents Credentials API support?

There are three types: bearer tokens injected as HTTP headers (Authorization: Bearer or a custom header/prefix), OAuth2 credentials where Gemini automatically exchanges and refreshes access tokens using client_id, client_secret, refresh_token, and token_url, and environment-variable credentials for CLIs/SDKs where the container gets a placeholder swapped by the egress proxy.

_Anyone wiring authentication into AI agents can follow updates like this on daily.dev._

### Can I rotate a Gemini agent credential without changing the agent's code or definition?

Yes, updating a credential by its ID rotates the underlying secret while the agent definition, including its reference to that credential ID, stays unchanged. Credentials can also be deleted by ID once no longer needed, all through the Credentials API without redeploying the agent.

_Teams managing agent secrets and rotation policies can stay current via daily.dev._

## Similar posts on daily.dev

- [Building Managed Agents That Use GitHub Without Exposing Your Token](https://daily.dev/posts/building-managed-agents-that-use-github-without-exposing-your-token-uzj9kptux) · Philipp Schmid · 0 upvotes · 0 comments
- [The Agent Never Sees the Key: Proving Credential Brokering in DigitalOcean Action Gateway](https://daily.dev/posts/the-agent-never-sees-the-key-proving-credential-brokering-in-digitalocean-action-gateway-whpn33mhj) · DigitalOcean Community · 0 upvotes · 0 comments
- [GitHub - Infisical/agent-vault: A HTTP credential proxy and vault for AI agents](https://daily.dev/posts/github---infisical-agent-vault-a-http-credential-proxy-and-vault-for-ai-agents-uqhfhmxsr) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#ai-security](https://daily.dev/tags/ai-security), [#authentication](https://daily.dev/tags/authentication), [#google-gemini](https://daily.dev/tags/google-gemini), [#mcp](https://daily.dev/tags/mcp)

[View this post on daily.dev](https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Credentials API for Gemini Managed Agents","url":"https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8"},"datePublished":"2026-09-28T14:57:12.301Z","dateModified":"2026-11-05T02:14:47.676Z","description":"Google shipped a Credentials API for Gemini Managed Agents (antigravity-preview) that lets agents authenticate to services like GitHub, Notion, or the Gemini...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/957dd8b1e756a6348f1269900ff88fbe?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/957dd8b1e756a6348f1269900ff88fbe?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Philipp Schmid","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Philipp Schmid","logo":"https://media.daily.dev/image/upload/s---qdk89pI--/f_auto,q_auto/v1780213206/logos/philschmid?_a=BAMAMiWQ0","url":"https://daily.dev/sources/philschmid"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,ai-security,authentication,google-gemini,mcp","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Philipp Schmid","item":"https://daily.dev/sources/philschmid"},{"@type":"ListItem","position":3,"name":"Credentials API for Gemini Managed Agents"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/credentials-api-for-gemini-managed-agents-exmqrrpb8#faq","mainEntity":[{"@type":"Question","name":"How does the Credentials API keep API keys away from code running inside a Gemini Managed Agent sandbox?","acceptedAnswer":{"@type":"Answer","text":"Secrets are stored server-side and never enter the Linux sandbox; the agent only sees a placeholder like __GEMINI_CRED_\u003cid\u003e__, and the egress proxy swaps in the real value on the wire only when the request targets a domain listed in trusted_domains. Requests to untrusted domains carrying the placeholder are blocked with a 403. Developers securing agent workflows can track platform changes like this via daily.dev."}},{"@type":"Question","name":"What credential types does the Gemini Managed Agents Credentials API support?","acceptedAnswer":{"@type":"Answer","text":"There are three types: bearer tokens injected as HTTP headers (Authorization: Bearer or a custom header/prefix), OAuth2 credentials where Gemini automatically exchanges and refreshes access tokens using client_id, client_secret, refresh_token, and token_url, and environment-variable credentials for CLIs/SDKs where the container gets a placeholder swapped by the egress proxy. Anyone wiring authentication into AI agents can follow updates like this on daily.dev."}},{"@type":"Question","name":"Can I rotate a Gemini agent credential without changing the agent's code or definition?","acceptedAnswer":{"@type":"Answer","text":"Yes, updating a credential by its ID rotates the underlying secret while the agent definition, including its reference to that credential ID, stays unchanged. Credentials can also be deleted by ID once no longer needed, all through the Credentials API without redeploying the agent. Teams managing agent secrets and rotation policies can stay current via daily.dev."}}]}
```

