Inspiration
Managing production databases requires writing many queries. In the AI era, I wanted a modern tool that enables fast, safe data browsing and management using natural text or voice prompts.
What it does
DB Agent lets you manage MongoDB using text or audio commands. UX was the top priority, since itβs designed for real production databases where speed and clarity matter.
How we built it
We initially let the AI agent execute MongoDB queries automatically via a runQuery tool. We later realized a human-in-the-loop was essential for production safety. The solution was to cache generated queries instead of executing them and let the user explicitly approve execution.
The system is powered by two agents:
- mongoAgent - analyzes prompts and database context to generate MongoDB queries.
- jsonTransformationAgent - updates JSON documents based on user intent.
Challenges we ran into
The mongoAgent worked reliably with claude-sonnet-4-5, but gemini-2.5-pro occasionally produced invalid MongoDB queries for the same prompts. I resolved this by refining and making the prompts more explicit for Gemini with the help of Claude Code.
Accomplishments that we're proud of
Built a fully functional product that allows managing production databases directly from a phone using voice or text commands. I actively use it today on my own production databases.
What we learned
Both gemini-2.5-pro and claude-sonnet-4-5 perform very well with data structures and query generation. I tested sending events like USER_CREATED, TOURNAMENT_STARTED, etc., with JSON payloads and let the AI decide how and where to store the data. It worked well with both existing and fresh databases. This reinforced the idea that database design and management can be increasingly automated by AI.
What's next for DB Agent
To build electron app, so all connection strings will be encrypted and stored locally.
Event Sourcing + DB Agent. The agent will consume system events and autonomously decide how to store data, design collections, and evolve schemas, moving toward fully automated database development. All incoming events will be stored, allowing them to be replayed later. When a new model is available or a new database type (e.g. a graph database) is added, the same events can be reprocessed to generate an updated database, schemas, and data structures.
Log in or sign up for Devpost to join the conversation.