October 08, 2026 · Žiga

Introduction to Select AI Agent meets OPAF Series

autonomous database Hero MCP OPAF Oracle Private Agent Factory Select AI Series
Introduction to Select AI Agent meets OPAF Series
Select AI Agent meets OPAF blog series

This is the overview of my Select AI Agent meets OPAF series. It answers one question: how do Select AI Agent in Autonomous Database 26ai and Oracle Private Agent Factory (OPAF) fit together? I take one sales analyst over my OA Bootcamp sales schema (OABOOTCAMP) and build it six ways in OPAF — plain Select AI, the in-database agent team called natively, the same team built visually without PL/SQL, two flows through the Autonomous Database built-in MCP server, and a native routing flow. Every flow returns the same numbers, because the business definitions live in the database, not in the agent.

What the series covers

  • Preparing the data: validating joins, collecting exact literals, business rules and table and column comments as the semantic layer.
  • Connecting to the LLM: IAM, resource principal and the Select AI profile on OCI Generative AI.
  • Select AI Agent: tool, agent, task and team in PL/SQL, verified against hand-written SQL.
  • Native OPAF nodes: the Select AI and In-Database Team nodes, and the same team built on the canvas with no PL/SQL.
  • MCP: the Autonomous Database built-in MCP server and two OPAF flows on top of it.
  • Routing: one OPAF agent choosing between fast NL2SQL and the in-database team with Select AI Bridge.

Architecture: one database, six front ends

In all six flows, natural language is turned into SQL inside the database by Select AI. OPAF is always the front end. What changes from flow to flow is how OPAF reaches the database and who plans the analysis.

Flow OPAF building blocks How OPAF reaches the database Who plans the analysis
C1 Select AI node Database connection (wallet) Nobody — one question, one SQL statement
C2 In-Database Team node, existing team Database connection (wallet) Select AI Agent in ADB
C3 In-Database Tool, Task, Agent and Team nodes, created on the canvas Database connection (wallet) Select AI Agent in ADB
A Agent node + MCP server node (SALES_NL2SQL) ADB built-in MCP server OPAF agent
B Agent node + MCP server node (ASK_SALES_ANALYST) ADB built-in MCP server Select AI Agent in ADB
D Agent node + two Select AI Bridges (Run SQL, Team) Database connection (wallet) OPAF agent routes; the in-database team plans analytical questions

My environment:

  • Autonomous AI Database (ADW) 26ai, version 23.26.4.1.0, public endpoint ("Allow secure access from everywhere") with mTLS required for SQL*Net connections
  • OCI Generative AI in Germany Central (Frankfurt), model openai.gpt-oss-120b — used both by the Select AI profile in the database and by the Agent nodes in OPAF
  • OPAF 26.7 on OCI, in a private subnet

Posts in the series

  1. Part 1: Making a star schema Select AI-ready — join validation, exact literals, business rules and comments as the semantic layer.
  2. Part 2: Connecting Autonomous Database to OCI Generative AI — dynamic group, policy, resource principal, the Select AI profile and smoke tests.
  3. Part 3: Building a Select AI Agent team in PL/SQL — tool, agent, task and team, checked against ground truth.
  4. Part 4: Select AI and the in-database team as native OPAF nodes — flows C1 and C2.
  5. Part 5: The same team built on the OPAF canvas, no PL/SQL — flow C3.
  6. Part 6: The Autonomous Database built-in MCP server — enabling it with a tag, testing with curl, wrapping the team as a tool.
  7. Part 7: OPAF over MCP — database orchestrates vs OPAF orchestrates — flows B and A.
  8. Part 8: Native routing with Select AI Bridge — flow D.

All six flows compared

C1 C2 C3 A B D
Connection DB connection DB connection DB connection MCP MCP DB connection
LLM in OPAF none none none plans and calls tools routes only routes between bridges
Planning none (one SQL) Select AI Agent in ADB Select AI Agent in ADB OPAF agent Select AI Agent in ADB team for analytical questions
Multi-step comparison partial (winner only) full full full full full
Exact numbers rounded (Narrate) yes yes yes yes yes (team answer rounded to whole dollars)
Can show SQL yes (Show SQL action) no no yes (showsql) no no (declines explicitly)
Off-topic guardrail enforce_object_list (raw ORA message) agent role in ADB agent role in ADB explicit scope rule in OPAF OPAF scope rule OPAF scope rule
Typical time 4–9 s 9–19 s 11–18 s 12–20 s 23–25 s 7–19 s

All flows that answer return the same numbers: the business definitions live in the database, so every path — native node, MCP or routing — gets the same semantics.

Key takeaways

  • Most of the effort is in the data: a schema with no constraints and no comments gives Select AI nothing to work with.
  • Rules in comments and role text are guidance, not enforcement. Stating them positively, temperature 0 and one grouped query made the agent repeatable; I check agent answers against hand-written SQL before every demo.
  • The native Select AI nodes are the fastest way to run a database agent from OPAF; MCP opens the same agent to any MCP client.
  • In OPAF agent instructions, the scope rule goes first.
  • An OPAF agent that cannot get SQL from a tool may invent a plausible query, so I give it an explicit rule to decline instead.