Agent Wranglers

AID-25Required

Keep production credentials away from agents

Never give a coding agent production keys, database passwords or customer data.

How to do it

Give agents a development or staging environment with its own keys and made-up data. Keep .env files with values out of the project folder the agent can read. Never connect an agent's database or cloud tool, such as an MCP server, to production. Deploy through a pipeline that holds the keys, not through the agent. Give agents test copies built as Keep personal data out of test copies says, with keys scoped by Give each key the least power.

How to check

Search the agent's environment variables and readable files for production key prefixes, such as sk_live_, and production host names. None are found.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials/no-production-credentials">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.