Inspiration

In real-world applications, companies deal with fragmented data spread across multiple databases like MongoDB, PostgreSQL, BigQuery, etc. Existing tools often require writing complex queries or setting up dedicated pipelines for insights.
We envisioned SubMind as a natural-language-based orchestration layer that lets users "speak to their data" — no matter where it lives.

What it does

SubMind is a multi-agent AI system that allows users to query multiple databases using natural language. It intelligently routes and sequences queries across:

  • MongoDB: schema-aware, metadata-driven document store agent
  • PostgreSQL: SQL-native relational agent with filtering and joins

The Orchestrator Agent:

  • Understands user queries
  • Delegates to relevant agents
  • Coordinates results across agents
  • Returns combined, human-readable insights

It works out-of-the-box with existing databases — no migrations or refactors required.

How we built it

  • Google ADK (Agent Development Kit): To create modular and reactive agents
  • Gemini 2.5 Flash: For fast, accurate reasoning over tool outputs and schema
  • MongoDB Atlas: For document-based collections with schema descriptions
  • PostgreSQL: For structured tabular data
  • Python async orchestration: To sequence and merge agent responses
  • ToolContext state sharing: To pass order_ids and other join keys between agents
  • Docker: For running Postgres locally during development

Challenges we ran into

  • Teaching agents to reason sequentially (e.g., get payments → use order_ids to fetch orders)
  • Designing robust schema exploration and avoiding hardcoded logic
  • Handling datatype conversion issues (Decimal, date, etc.) across databases
  • Coordinating result merging and contextual query chaining
  • Managing agent memory and state across chained calls

Accomplishments that we're proud of

  • A fully working multi-agent orchestration pipeline
  • Seamless integration between two fundamentally different databases
  • Built tools that are reusable and production-ready
  • Plug-and-play: can integrate with any existing database
  • Demonstrated real-world business queries in our demo (e.g., payments + orders)

What we learned

  • How to design multi-agent workflows with Google ADK
  • Building composable tools that cooperate via context, not code
  • The importance of schema-first reasoning in agent design
  • How Gemini Flash can be tuned for logical, sequential data operations
  • How to make agents robust, resilient, and extensible

What's next for SubMind

  • Add support for BigQuery, Google Sheets, and GCS
  • Add support for sub agent discoverability using A2A protocol
  • Add caching and vector memory for common queries
  • UI: A web-based natural-language query interface
  • Fine-tune Gemini agents for summarization and aggregation
  • Enable query visualization (e.g., charts from results)
  • Make it deployable as a self-hosted service for enterprise teams

SubMind is just the beginning of a universal interface for all your data.

Share this project:

Updates