PlanetScale speeds Rails API with Insights Agent
PlanetScale dogfooded its Insights Agent on its production Rails API, letting the AI analyze Query Insights telemetry and automatically open pull requests with database fixes. The internal rollout cut over 20 million daily queries and dropped latencies from seconds to milliseconds while uncovering crucial query-plan edge cases for agent evaluation.
Closing the loop between production telemetry and automated pull requests is the most compelling path forward for AI agents in developer infrastructure.
- –Automated triage at scale: Pointing agents directly at database telemetry eliminates the manual slog of query profiling, allowing small optimizations like reordering feature flags to save hours of daily CPU time.
- –Naive indexing traps: An agent-suggested composite index actually degraded p99 latency by 72% because the agent lacked context on normalized IN-lists and zero-row result sets.
- –Smarter eval harnesses: The team expanded agent evals to weigh row-read ratios and payload sizes, recognizing that leaving queries untouched is often better than blindly adding indexes.
- –Extensibility via MCP: Beyond native scheduling, PlanetScale exposes Insights through an MCP server and CLI, allowing developers to plug their own custom harnesses like Cursor or Claude Code into database telemetry.
DISCOVERED
2h ago
2026-11-19
PUBLISHED
4h ago
2026-11-19
RELEVANCE
AUTHOR
PlanetScale