Authors Johannes Dumitru Kiran Tailor Matt Cornillon
The promise of Agentic AI is dazzling: autonomous agents that plan, reason, and execute complex workflows. But as we move from “chatbots” to “agents,” we hit a hard wall. As highlighted in recent industry analysis, Agentic AI is useless without your Systems of Record and Operational Datastores.
Your LLM might know how to write a poem about a database, but does it know why your production Oracle DB instance just spiked to 99% CPU? Does it know the real-time inventory levels stored in your core Enterprise System of records ERP, EPM, HCM and Industry Solutions?
Until now, connecting these worlds meant brittle APIs, complex ETL pipelines, or context-heavy manual context switching. Enter the Google Gemini CLI combined with the Google Model Context Protocol (MCP) Toolbox for Databases.
Today, we are exploring a game-changer for the enterprise: The Oracle Database Extension for Gemini CLI. This isn’t just about writing SQL faster; it is about giving your AI agents direct, secure, and intelligent access to the heartbeat of your business enterprise applications.
The Missing Link: Model Context Protocol (MCP)
For years, we treated databases and AI as separate silos. The Model Context Protocol (MCP) changes the paradigm. It provides a standard interface for LLMs to talk to external systems.
Google’s implementation—the MCP Toolbox for Databases —allows the Gemini CLI to mount “tools” that interface with your Data Cloud. With the new Oracle extension, your terminal becomes a cockpit where natural language commands translate instantly into deep diagnostic and operational SQL actions.
The Oracle DB Gemini CLI Extension: Capabilities at a Glance
Based on the latest release of the Oracle Gemini CLI extension, we can now bypass context switching between SQL*Plus, SQL Developer, and our IDEs. The extension exposes critical “tools” that the Agent uses to interact with the database:
-
Operational Health: list_active_sessions and list_top_sql_by_resource allow you to ask, “What is slowing down the database?” and get immediate analysis of high-CPU queries.
-
Schema Intelligence: list_tables and list_invalid_objects let the agent explore the data structure dynamically.
-
Performance Tuning: get_query_plan allows the agent to generate execution plans for specific SQL IDs without running them.
-
Action: execute_sql allows for the execution of standard DML or queries once the agent has formulated the correct approach.
Real-World Use Case: The “3 AM” Incident
Imagine you are an SRE on call. You receive an alert. Instead of scrambling to find connection strings and TNS aliases, you simply open your terminal.
User: “Gemini, the connection pool is filling up. Check the top 5 active sessions on the Oracle Production DB and tell me what SQL they are running.”
Gemini (Agent):
-
Thinking… Identifies tool list_active_sessions.
-
Executes tool against the configured ORACLE_CONNECTION_STRING.
-
Analyzes the return payload.
Gemini Response:
“I found 5 active sessions consuming significant resources. The top session (SID 452) is running a complex join on SALES_HISTORY that is performing a full table scan. Here is the SQL Text…”
User: “Generate an execution plan for that query and suggest an index.”
Gemini (Agent):
-
Executes get_query_plan.
-
Analyzes the plan cost.
-
Proposes CREATE INDEX… DML.
This seamless workflow reduces Mean Time To Resolution (MTTR) from hours to minutes.
In a modern multi-agent enterprise AI scenario, the Oracle DB extension serves as a specialized “Systems of Record” specialist within a broader Agentic Mesh. This architecture allows multiple autonomous agents to collaborate, each leveraging its own domain-specific data service to solve complex business problems.
The Multi-Agent Orchestration Framework
Rather than a single monolithic chatbot, enterprises now deploy a team of specialized agents coordinated by an Orchestrator Agent.
-
Orchestrator Agent: Receives natural language queries, decomposes them into sub-tasks, and delegates them to specialized sub-agents.
-
Oracle Agent: Acts as the expert for mission-critical transactional data, utilizing the Gemini CLI extension to query inventory, financial records, or ERP data.
-
BigQuery Agent: Handles high-volume analytical workloads, performing trend analysis or demand forecasting over historical datasets.
-
Firestore Agent: Manages real-time application state and user profiles, providing fast access to document-based session data.
Enterprise Scenario: Real-time Supply Chain Optimization
Imagine a scenario where a sudden regulatory change affects plastic usage in manufacturing. A multi-agent system would react as follows:
| Agent | Task | Data Service |
|---|---|---|
| Research Agent | Monitors government feeds for new regulations and summarizes impact. | Web Search / External API |
| Oracle Agent | Identifies which existing product lines in the ERP use prohibited materials. | Oracle Database |
| BigQuery Agent | Predicts the financial impact of phasing out those products based on sales history. | BigQuery |
| Operations Agent | Updates real-time shipment status for affected orders to notify customers. | Firestore / Spanner |
Integration through Gemini CLI Extensions
The Gemini CLI Extensions provide a standardized way to equip these agents with the tools they need. By installing multiple extensions, you enable a single terminal environment to orchestrate across your entire cloud stack.
-
Unified Control: A developer can provision a database in Oracle DB@GCP , Cloud SQL, query it, and then analyze the results in BigQuery using sequential natural language prompts.
-
Model Context Protocol (MCP): Each extension acts as an MCP server, exposing named tools that agents can call autonomously to perform actions like execute_sql or list_instances.
-
Cross-Cloud Synergy: Operational data from Oracle DB or using Oracle Autonomous DB Delta Share can be continuously replicated to BigQuery using Datastream, allowing agents to bridge the gap between real-time transactions and long-term intelligence.
Security & Governance
In these scenarios, each agent operates under the principle of least privilege. For example, the Oracle Agent is granted the CREATE SESSION and SELECT roles on specific views, while the BigQuery Agent uses IAM roles like BigQuery Data Viewer.
Integrating the Oracle DB extension into a modern multi-agent enterprise AI scenario involves orchestrating it alongside other specialized data services to handle complex, cross-domain workflows. In this architecture, the Gemini CLI acts as an Orchestrator Agent, leveraging multiple Model Context Protocol (MCP) servers to perform a Reason and Act (ReAct) loop across your entire cloud stack.
The Multi-Agent Data Orchestration Prompt
To generate a consolidated report across Oracle and BigQuery, you can use a unified prompt that triggers sequential sub-tasks.
Example Prompt:
“Compare the high-value customer orders from our Oracle production DB for the last 24 hours against the BigQuery historical trends for this quarter. Identify any anomalies in order volume and summarize the potential impact on our current inventory levels.”
Multi-Agent Workflow Breakdown
| Stage | Agent/Extension Role | Tools Triggered |
|---|---|---|
| 1. Data Extraction | Oracle Agent: Retrieves real-time transactional data from systems of record. | execute_sql, list_active_sessions |
| 2. Trend Analysis | BigQuery Agent: Analyzes historical datasets to identify patterns and baseline metrics. | execute_sql, analyze_contribution |
| 3. Correlation | Orchestrator: Cross-references real-time Oracle results with BigQuery baselines. | Gemini CLI reasoning loop |
| 4. Reporting | Report Agent: Consolidates findings into a natural language executive summary. | GEMINI.md context grounding |
Getting Started
Testing the CLI Environment from the VM
Once you have all the tools and the correct Node.js version in place- you can test the startup of Gemini CLI. You will need to authenticate with a Key or your
Google Account : gemini
Press enter or click to view image in full size
To implement this, you need the Gemini CLI (v0.6.0+) and the Oracle extension.
1. Installation: Bash
gemini extensions install ``https://github.com/gemini-cli-extensions/oracledb
2. Configuration:
Set your environment variables. The extension supports both OCI (Oracle Cloud Infrastructure) drivers and standard Instant Client connections.
Bash
export ORACLE_USER=system
export ORACLE_PASSWORD=SecretPassword!
export ORACLE_CONNECTION_STRING=localhost:1521/XEPDB1
3. Run: Simply type gemini and start chatting with your database.
Setting Up the Multi-Extension Environment
You can combine extensions in a single project to build a personalized toolchain.
-
Install the Extensions: Bash
gemini extensions install https://github.com/gemini-cli-extensions/oracledb gemini extensions install -
Configure Environment Variables: Ensure both ORACLE_CONNECTION_STRING and GOOGLE_CLOUD_PROJECT (for BigQuery) are set in your shell.
-
Verify the Agents: Run /mcp to confirm both the Oracle and BigQuery MCP servers are “Ready”.
-
Establish Guardrails: Use GEMINI.md context files to define rules for how agents should handle sensitive data when joining Oracle PII with public BigQuery datasets.
Enterprise Governance: Least Privilege
In multi-agent scenarios, security is paramount.
-
Oracle Side: Use an account limited to specific reporting views rather than full DBA access to prevent agents from inadvertently altering schemas.
-
BigQuery Side: Grant the BigQuery User role to the agent’s service account to restrict access to authorized datasets only.
Beyond Ops: Oracle as a Vector Store and Knowledge Graph for RAG
The most exciting aspect of this extension is not just maintenance—it’s modernization. The extension supports the google_ml_integration and Oracle 23ai, 26ai capabilities, allowing you to turn your legacy Oracle DB into a vector and graph database for Retrieval Augmented Generation (RAG).
The extension documentation highlights utilizing DBMS_VECTOR to generate embeddings directly within the database.
The Workflow:
-
Ingest: You can create intent_exemplar tables with VECTOR data types directly via the CLI.
-
Embed: Use the CLI to call SELECT TO_VECTOR(VECTOR_EMBEDDING(…)) to turn text into vectors using connected models.
-
Search: Perform cosine similarity searches to find relevant business records based on semantic meaning, not just keyword matching.
This allows you to build “Chat with your Data” applications or Data Driven Agents where the “Enterprise Data” is your secure, reliable Oracle based System of Record.
The Strategic View
Integrating Gemini CLI with Oracle is a microcosm of the future of Enterprise AI. It respects the architecture patterns of data gravity—bringing the compute (AI) to the Enterprise data (Oracle)—rather than trying to export the data to the AI.
By leveraging the MCP Toolbox for databases , we standardize how agents interact across entire Data Platform architecture with SQL, NoSQL (Firestore), and Warehouses (BigQuery), Analytics ,Looker. This creates a unified “Data Cloud” fabric where an agent can join data from an Oracle Business and Industry Applications Data like ERP, EPM, HCM, and many others with logs in BigQuery to solve complex business problems.
Don’t let your System of Record become a System of the Past. Connect it.



