Skip to main content

Statsig’s Role in AI Development

Increasingly, developers are leaning on AI agents to accomplish small-to-midsized tasks. For small feature additions, this is low risk - but can still introduce bugs or low-quality user experiences. Having the agent be aware of Statsig means that it can automatically add logging for potential errors, and add feature gates to new features (or make sure they’re behind existing gates) so that you can manage rollouts safely and measure any degredation. This adds up when considering the high velocity individuals can now achieve with help from these agents, and the ability of people to develop within codebases they have less context in with AI assistance. Our recommended approach is to use an AGENTS.md (or any analagous file, such as CLAUDE.md) to provide instructions that you can tailor to your own workflow. The behaviors that are critical are:
  • Adding gates to new features or codepaths, and tuning how aggressively to do so
    • Automatically adding your user ID, and any test IDs your agent may log in as, to those gates for testing in development
  • Adding critical logs for errors and user behaviors
    • Currently adding these to tracking is manual, but we have plans to make this automatable via MCP for event count metrics.

Boilerplate Agents.md file

Fill in your Statsig ID, and follow the MCP guide to set up the MCP server. Consider updating naming conventions and logic around when to ask. We recommend using a limited-access console API key to control risk around a scenario where an agent deletes entities in Statsig.