Skip to content

dumians/Gemini_CLI_MCP_AntiG

Repository files navigation

Enterprise Data Agents Demo (ADK) - Walkthrough This document outlines the finished architecture and usage guidelines for the Multi-Domain Data Agent demo, utilizing Google Cloud databases, MCP, and the Gemini CLI. Technology Used - From Design to Code - Sticht to AI Studio , from Code to Enterprise - Antigravity , MCP toolbox for databases , Gemini CLI . ADK, A2UI, MCP toolbox for databases and Gemini CLI.

Architecture Highlights The project successfully implements a simulated environment to showcase cross-domain data orchestration:

Custom MCP Servers for GCP Databases: Instead of using standard SQL proxies, we built custom Node.js MCP servers to explicitly expose the advanced features of each database:

servers/oracle-mcp/index.js: Exposes query_oracle_sql, query_oracle_graph, and query_oracle_vector. servers/spanner-mcp/index.js: Exposes query_spanner_sql and query_spanner_graph. servers/bigquery-mcp/index.js: Exposes query_bigquery. Note: In the demo configuration, these servers return simulated JSON strings to mimic actual API behavior without requiring live database credentials or indices.

The ADK (Agent Development Kit) Orchestrator:

agent/index.js: A master Node.js script using the @google/genai SDK. It dynamically connects to the local MCP servers via stdio. It aggregates the tool schemas and injects a robust System Instruction informing Gemini 2.5 Flash on how to route queries across Oracle (ERP), Spanner (Retail/Inventory), BigQuery (EDW), and AlloyDB (CRM). Demo Guide:

demo_guide.md: Included in the repository to provide sample prompts that trigger multi-step, multi-database reasoning (e.g., combining BigQuery analytical segments with Spanner Graph traversals and Oracle AI Vector searches). Schema Definitions for GCP:

The db-schemas/ directory contains the DDL for the real environments. oracle_schema.sql: Contains ERP tracking and Oracle Graph nodes/edges mapped to Oracle Vector indexes. spanner_schema.sql: Shows Spanner Graph definition mapping Inventory to Transactions, with native ARRAY Vector indexing for similarity search. alloydb_schema.sql: Instantiates pgvector extensions for support ticket similarity search. bigquery_schema.sql: EDW marketing schemas.

The scripts/deploy_to_gcp.sh script demonstrates how to quickly stand up the BigQuery datasets and includes gcloud commands for Spanner setup. Phase 2: Professional UI, Test Data, and A2A Phase 2 has been completed, introducing a professional web client, interconnected test data, and an Agent-to-Agent (A2A) orchestration layer.

  1. Agent-to-Agent (A2A) Orchestration The single Data Agent has been refactored into a sophisticated multi-agent system:

Master Orchestrator (agent/index.js): Receives the user query and delegates specific tasks to specialized sub-agents. Financial Agent (agent/financial_agent.js): Specialist for Oracle DB@GCP. Retail Agent (agent/retail_agent.js): Specialist for Spanner Global Retail. Analytics Agent (agent/analytics_agent.js): Specialist for BigQuery and AlloyDB. This architecture demonstrates how complex cross-domain reasoning can be distributed across specialized AI models, each with its own specific toolset and system instructions.

  1. Professional Web Client (Stitch) A professional, high-end web dashboard has been designed using StitchMCP:

Main Dashboard: A dark-themed command center featuring a glassmorphism search bar and real-time task tracking for the A2A Orchestrator. Query Results Analysis: A sophisticated view showing the "Agent Chain" (timeline of sub-agent contributions) and a central Synthesis Hub for the final results. 3. Interconnected Test Data A new script, scripts/generate_test_data.js, has been created and executed. It populates a test-data/ directory with CSV files containing linked records across all four database domains (e.g., a VIP customer in BigQuery experiencing a shipment delay in Spanner due to an Oracle PO issue).

Verification & Usage The infrastructure is ready to be tested.

Ensure your Gemini API Key is available by creating a .env file in the root directory:

GEMINI_API_KEY="your-api-key" Start the interactive agent loop: npm start.

Explore UI: View the generated designs in the Stitch project projects/4702640601584353325.

Phase 5: Autonomous Data Mesh & HR Domain We have successfully transitioned the architecture into a fully Autonomous Data Mesh:

  1. Context Fusion (A2A Synergy) The Orchestrator now maintains a shared Mesh Context. As agents are called sequentially, they "see" the insights from previous agents. For example:

The Retail Agent can now adjust its inventory reasoning based on HR Agent's talent pipeline data. The Financial Agent integrates supply chain risks from the Retail Agent directly into its ERP reports. 2. Standardized Data Products Every agent in the mesh now follows a unified output schema:

{ "domain": "...", "data": "...", "metadata": { "confidence": 0.95, "source": "..." }, "insights": "..." } 3. HR Domain Integration Added the Oracle HR domain, complete with its own schema, agent, and UI dashboard card.

  1. Professional UI Updates The web dashboard now visualizes this "Fusion" in the Agent Chain component, displaying domain-specific insights and confidence scores for every step of the autonomous reasoning process.

The platform is now a state-of-the-art Agentic Data Mesh, ready for cross-domain autonomous reasoning.

Phase 6: GraphRAG Implementation (Grounding) The system now supports Grounding via GraphRAG, ensuring that AI insights are anchored in actual database relationships:

  1. Verification Logic Grounding Utility: Added grounding.js to synthesize graph paths into agent context. Domain Citations: FinancialAgent and RetailAgent now cite specific graph traversal results (e.g., Supplier -> PO or Store -> Inventory) as grounded facts.
  2. UI Visualization Grounded Facts: The Agent Chain now features a "Grounded Graph Fact" section with a Shield icon, highlighting the exact paths used to verify the AI's reasoning. The platform is now fully equipped with verifiable GraphRAG grounding across the enterprise mesh.

About

Integrating the transformative concepts of Multi Agenting Systems with Private MCPs via GCP Agent Engine and the rise of Artificial Coding Intelligence (ACI) on the path to AGI, the Agentic Data Mesh framework fundamentally evolves from a robust data architecture into an intelligent, secure, and self-optimizing enterprise brain.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors