Skip to content

UC AI - Agentic AI for Oracle

Call LLMs from the database and create PL/SQL based agents

This PL/SQL framework lets you integrate AI agents and automations directly into your Oracle database; no need for Python or other external tools. With UC AI, you can work with LLMs from providers like OpenAI GPT, Anthropic Claude, Google Gemini, and Ollama, including features like function calling, step-by-step reasoning, and file analysis, all via a simple unified PL/SQL API. Keep everything close to your data.

Multi-Provider Support

Support for OpenAI GPT, Anthropic Claude, and Google Gemini models with unified API interface.

Tools/Function Calling

AI models can execute PL/SQL functions with type-safe parameter passing and JSON schema validation.

Unified API

Consistent interface for text generation and tool calls for all providers.

Runs on older DBs

No need for 26ai. This is just PL/SQL! Oracle Database 12.2+ are supported!

Agentic AI

Create agents that work directly with data in your Oracle databases.

Local LLMs

Integrate offline LLMs like GPT OSS or Qwen via Ollama

This framework is specifically designed for Oracle Database developers who want to:

  • Integrate AI: Add AI capabilities directly to database applications and procedures
  • Automate Tasks: Let AI models execute database functions based on natural language prompts
  • Build Smart Apps: Create applications that can reason about data and take actions
  • Extend Functionality: Give AI models access to custom business logic and database operations
  • Maintain Control: Keep AI interactions secure with validated parameters and controlled execution
  • OpenAI: GPT-4, GPT-4 Turbo, GPT-4o, GPT-4o Mini, GPT-3.5 Turbo, o1 series…
  • Anthropic: Claude 4 Sonnet, Claude 3.5 Haiku, Claude 4 Opus…
  • Google: Gemini 2.5 Flash, Gemini 2.5 Pro, …
DECLARE
l_result JSON_OBJECT_T;
BEGIN
-- Let AI calculate something using a custom tool
l_result := uc_ai.generate_text(
p_user_prompt => 'How many open tickets do I have?',
p_system_prompt => 'You are a helpful assistant to an ticketing system.
Use the provided tools to access the database.
You are currently talking to the user "John Doe"',
p_provider => uc_ai.c_provider_openai,
p_model => uc_ai_openai.c_model_gpt_4o_mini
);
-- Get the AI's response
DBMS_OUTPUT.PUT_LINE('AI Response: ' || l_result.get_string('final_message'));
-- You have 5 open tickets.
END;
/
FeatureOpenAI GPTAnthropic ClaudeGoogle GeminiOllamaOCI
Text generationYes (i)YesYes (i)YesYes(i)
Tools/Function callingYes (i)Yes (i)Yes (i)Yes (i)Yes
PDF analysisYes (i)Yes (i)Yes (i)Not supportedNo
Image analysisYes (i)Yes (i)Yes (i)Yes (i)No
Reasoning/ThinkingYes (i)Yes (i)Yes (i)Yes (i)No
Structured OutputYes (i)No (i)Yes (i)Yes (i)No
Embedding generationNoNoNoYesNo

* The (i) links to the provider documentation for the feature.

** Some features only work with specific models. Research the documentation of the provider about this.