AI Agents in Oracle APEX ; Part 3: What’s New in 26.2
Provider APIs, reasoning effort, agent navigation, and a database that says no.
In Part 2 I built an HR agent that looks up employees, changes salaries and deletes rows. Then APEX 26.2 landed on October 6, and the AI Agents section of the release notes made me want to go back and rebuild parts of it. This post covers what changed and what I’d change in my demo because of it.
1Provider API: you pick how APEX talks to the model
Until now, APEX talked to each provider through one fixed API. 26.2 adds a Provider API setting under Advanced on the Generative AI Service. This is not a new REST API from Oracle ; it just lets you choose which of the provider’s own APIs APEX uses.
| Provider | Choices | Default |
|---|---|---|
| OpenAI, Generic OpenAI Compatible, Ollama | Responses, Chat Completions (deprecated) | Responses |
| Google Gemini | Interactions, Generate Text (deprecated) | Interactions |
| OCI Generative AI | Generic, Responses | Generic |
| Anthropic Claude, Mistral, Cohere | No change | n/a |
Three things to know:
- Your tools don’t change. Selecting Responses changes how APEX talks to the provider, and the agent’s tool execution flow stays the same.
- Upgrades migrate automatically, with a catch. OpenAI and Gemini services move to Responses and Interactions on upgrade or import only if they have no custom Additional Attributes or HTTP Headers. If you customized either, APEX leaves the legacy API selected, so review those services by hand.
- Check your endpoint. For Generic OpenAI Compatible and Ollama, confirm the endpoint supports Responses before switching.
OCI changes: Model, Compartment ID, Serving Mode (On-Demand or Dedicated) and Endpoint ID are now dedicated fields instead of values inside the Additional Attributes JSON. If you pick Responses, you also need a Project ID. APEX appends the request path itself, so don’t add /responses to the Base URL.
2Reasoning Effort: how hard should the agent think?
This is the setting I was most curious about. Reasoning Effort (some providers call it a thinking level) controls how much a model reasons before it answers or decides which tool to call. Less effort is faster and cheaper, and more effort can give better results on complex tasks but costs time and tokens.
The eight values, from least to most thinking:
Default means APEX sends no value and the provider decides. Everything except Low, Medium and High is provider-specific, and APEX shows the full list regardless of your model, so it’s on you to pick a value your model supports. (The bars show the order of the levels, not measured results.)
You can set it in three places:
On the agent
Declaratively under Advanced. Agents sharing one AI Service can use different effort levels.
In PL/SQL
New p_reasoning_effort parameter on APEX_AI.GENERATE and APEX_AI.CHAT.
At runtime
Through the AI Request Handler, by setting p_result.request.reasoning_effort.
declare
l_response clob;
begin
l_response := apex_ai.generate(
p_prompt => 'Compare average salary across departments',
p_service_static_id => 'my-ai-service',
p_reasoning_effort => apex_ai.c_reasoning_effort_low );
end;
/
For OpenAI services, set Provider API to Responses first, because that’s what APEX’s reasoning integration uses. Native Cohere isn’t supported by this setting.
What I’d do in the demo:
- Simple lookup requests like “show me everyone in department 20” don’t need deep thinking, so Low.
- A multi-step request like “transfer Jones to dept 30, then give them a raise and summarize the department” is where High might pay off.
One thing to keep in mind: effort is set per agent or per request, not per tool. The model reasons once for each request and decides which tools to call as part of that same pass, so there is no separate effort level for an individual tool. If you want different levels for different kinds of work, split them into separate agents.
3AI-generated navigation: answers that take you somewhere
Agents can now answer with a link. Instead of “the employee is in the SALES department,” the reply can send the user straight to the right report or form page.
You define the destinations and the parameters each one accepts, and trusted application code builds the final APEX URL and checksum. The session-specific parts of the URL never go into the model’s messages, and the model can only point at pages you’ve allowed.
This is a high-code feature, and it only works with all three of these together:
It doesn’t use AI Tools and adds no extra round trip to the provider. Other invocation paths ignore the navigation definitions. I haven’t built this yet, so I’ll cover it once I have, and the exact setup is in Oracle’s docs (linked below).
4Deep Data Security: the database enforces the rules
I think this is the most important change for anyone building agents with write access. In Part 2, my delete tools were protected by a confirmation dialog and a check inside the PL/SQL. Both are application-layer protection.
26.2 integrates with Oracle Deep Data Security in Oracle AI Database. APEX passes the authenticated user’s identity to the database, and Data Roles and Data Grants are enforced there, at row, column and value level.
For agents, SQL run by supported agent tools executes under the requesting user’s security context. Asking the agent for more data doesn’t grant more access, because the Data Grant still decides what comes back. This complements APEX authorization and doesn’t replace it: APEX decides what a user can do in the app, and Deep Data Security decides what data the SQL may read or change.
For my demo, a salary summary that a manager shouldn’t see would be blocked at the database no matter how the prompt is phrased. The new APEX_APPLICATION_ADMIN procedures SET_DEEP_SEC and DEEP_SEC_IS_ENABLED control it per application.
5Smaller changes that touch agents
OCI Resource Principal
Web Credentials can reference DBMS_CLOUD credentials, so OCI Generative AI can be called without storing an API private key in APEX.
Interactive Reports
Commands like filter status by Completed run locally with no AI call. Natural-language computed columns, such as “Profit equals Revenue minus Cost,” are new too.
Network access control
WEBSERVICE_USE_SCHEMA_ACL lets admins control which external endpoints each workspace can reach, which matters if an agent calls AI providers.
See it running
Open the demo app, pick a reasoning effort, open the chat panel and ask the agent to look up, add, update or remove an employee record.
Where I landed
Part 1 was about what agents are, and Part 2 was about building one. 26.2 is about running one responsibly: choosing the provider API, tuning how hard the model thinks, and letting the database enforce access so the agent isn’t the last line of defense.
Comments
Post a Comment