How AI Agents Work in Oracle APEX (Without the Hype)
Features

How AI Agents Work in Oracle APEX (Without the Hype)

ASKLYZE Team
ASKLYZE TeamAuthor
5 Mins Read
Oct 14, 2026

"Agent" is one of those words that has been stretched until it barely means anything. In Oracle APEX it means something specific, and once you see the moving parts it becomes much less mysterious.

An agent is a shared component

Since APEX 26.1, AI Agents live under Shared Components > Generative AI > AI Agents. Like a list of values or an authorization scheme, you define it once and reuse it across pages.

Each agent has a few properties that define its personality and limits:

  • Service: which Generative AI Service to call. By default it uses the application's default service.
  • System Prompt: the standing instructions. "You are a helpdesk assistant for our HR app. Answer only questions about leave and payroll."
  • Welcome Message: the first thing users see in chat-style components.
  • Temperature: how creative or predictable the replies are.
  • Response Format: plain text, or a JSON object validated against a schema.
  • Static ID: the name you use when calling the agent from PL/SQL through the APEX_AI package.

Tools are what make it an agent

A model on its own can only produce text. What turns it into an agent is the list of AI Tools attached to it. Each tool exposes one specific capability that you decided the agent may use. APEX ships three built-in types:

  1. Retrieve Data: run a SQL query or a PL/SQL function and hand the result to the model.
  2. Execute Server-side Code: run PL/SQL, for example to create a ticket or update a record.
  3. Execute Client-side Code: run JavaScript in the browser, for example to refresh a region or open a dialog.

You also decide when a tool runs. Augment System Prompt tools run on every message and add context, like the current user's department. On Demand tools run only when the model asks for them.

What happens when a user asks something

Say a user types: "How many leave days do I have left, and can you book Thursday off?"

  1. APEX prepares the context: system prompt, conversation history and the output of any Augment System Prompt tools.
  2. The request goes to the model with a description of the On Demand tools it may call.
  3. The model replies that it wants to call get_leave_balance.
  4. APEX, not the model, executes that tool with the current user's session and returns the result.
  5. The model now asks to call book_leave for Thursday.
  6. If that tool is marked Requires Confirmation, the user sees a confirmation before anything is written.
  7. APEX runs the tool, gives the result back, and the model writes the final answer.

The key point is in step 4. The model never touches your database. It can only ask APEX to run tools you defined, and APEX runs them inside the normal session, with the normal security.

Where agents show up

Text agents work with the Show AI Assistant dynamic action, the Generate Text with AI dynamic action, and the APEX_AI PL/SQL APIs. Agents that return JSON objects are used through the APIs, which makes them handy for background jobs that need structured output, such as classifying incoming emails.

Practical advice

Keep agents narrow. One agent that does HR questions well is better than one agent that tries to do everything. Give tools clear names and descriptions, because the model chooses tools by reading them. And put anything that writes data behind Requires Confirmation until you have watched real users with it for a while.

APEX also keeps utilization and history reports for agents, so you can see what was asked and which tools were called. Read them. They tell you more about what users actually want than any requirements document.

Sources: What's New in Oracle APEX 26.1, Managing AI Agents and AI Tools, APEX 26.1 documentation