---
title: "Comment by OneLifeVibe on \"Where Should I Store API Keys for My AI Agents?\" | Hashnode"
description: "The rule that the config should hold the name and never the value is the clearest version of this advice I have seen. One git add is all it takes for a pasted k"
url: "https://hashnode.com/posts/where-should-i-store-api-keys-for-my-ai-agents/6af613413d1122908ba9c7bb/comment/6af62b05d09de952c7c09c17"
---

[Discussion](https://hashnode.com/posts/where-should-i-store-api-keys-for-my-ai-agents/6af613413d1122908ba9c7bb)

Comment [Where Should I Store API Keys for My AI Agents?](https://hashnode.com/posts/where-should-i-store-api-keys-for-my-ai-agents/6af613413d1122908ba9c7bb)

[OneLifeVibe](https://hashnode.com/@onelifevibe)

[5d ago](https://hashnode.com/posts/where-should-i-store-api-keys-for-my-ai-agents/6af613413d1122908ba9c7bb/comment/6af62b05d09de952c7c09c17)

The rule that the config should hold the name and never the value is the clearest version of this advice I have seen. One git add is all it takes for a pasted key to travel everywhere the repo goes, and a gitignore entry only hides that problem instead of fixing it. The scope guidance is practical too: if a deployed agent needs the key, put it in the team scope, since a team deployment never reads the user scope. I also liked that rotation is just editing the variable and restarting, with no redeploy. The honest note that scoping does not isolate a key from the run that uses it is important. A key a run can resolve is a key the run can leak.
