Oracle Agent Engine Builder Codex Skill
This page provides a Codex skill that automatically generates Oracle AI Database Agent Engine Agent Specs from requirements.
The complete SKILL.md source is provided below for copy and paste. The supporting Markdown files are available here:
- Agent Spec patterns
- Component construction checks
- Conversations and recovery
- Database setup and execution
Copyable SKILL.md source
Copy the following block into a file named SKILL.md to install the Codex skill.
---
name: oracle-agent-engine-builder
description: Create, review, configure, execute, and verify Oracle AI Database Agent Engine Agent Specs through DBMS_AI_AGENT. Use for translating business requirements into agents or flows, running compatible Factory exports, and diagnosing database setup or execution failures. Do not use for Select AI Agent or DBMS_CLOUD_AI_AGENT, operating the Oracle AI Agent Factory UI, or standalone Python agents.
---
# Oracle Agent Engine Builder
Guide the user through a structured conversation, then produce an Oracle AI Database Agent Engine-ready Agent Spec and the database steps needed to run it. This skill covers the Agent Engine interface through `DBMS_AI_AGENT`; review and execute Factory exports when the target is DBMS_AI_AGENT. Target the documented Agent Spec 26.1.0 subset unless the user names another database release; verify that release's supported version and components in Oracle's current documentation.
## Guided workflow
Ask one focused question at a time when clarification is needed. Start with the agent's purpose and intended users if they are unknown. Use details already supplied; when the request is complete, proceed to the artifact without restarting an interview.
Gather the following as needed:
- Purpose, users, expected behavior, and relevant examples or policies.
- Caller inputs and the outputs the caller needs.
- Whether the interaction finishes in one call, waits for another user message, or must recover after failure. For multi-turn or recovery requirements, read [Conversations and recovery](references/conversations-and-recovery.html).
- Data sources and tools. For database tools, identify the existing procedure or operation, qualified name, parameter names, directions, and types. Do not invent a procedure and present it as existing.
- Whether an operation reads data or changes data, and any user confirmation or business approval the real application must enforce.
- Model provider and model preference, plus the target database release and whether provider access is already configured.
- Whether the user wants an immediate execution example, a stored definition, or both. If they have no preference, use an immediate example and explain how to store the spec for repeated execution.
Never request API keys, passwords, wallet contents, or other secrets. Use placeholders for credential names and tell the user to configure secrets in the database credential store.
### Choose the executable structure
Recommend a top-level `Agent` for iterative model reasoning and tool selection. Recommend a `Flow` when the user needs predetermined steps, explicit branching, or deterministic orchestration. Explain the choice briefly. Do not silently replace an Agent request with a Flow; ask whether the user wants the alternative when the distinction changes the deliverable.
### Build and check
1. Summarize the proposed behavior, contracts, tools, model, and assumptions. Ask a focused follow-up for any material gap; otherwise proceed.
2. Build the spec using the exact field names, component types, reference rules, and data types supported by the target Agent Engine release. Read [Agent Spec patterns](references/agent-spec-patterns.html).
3. Validate the generated artifact in layers. Parse the spec as JSON and check supported fields, component IDs and references, typed inputs and outputs, tool signatures, provider configuration, and output contract. Distinguish this static review from Oracle database validation and from a successful runtime test. Read [Database setup and execution](references/database-execution.html) before setup or verification. For generation-only requests, return artifacts. For explicit build-and-run requests, use authorized SQL*Plus, SQLcl or a database connector after confirming the target and principal. Report registration, execution and business assertions independently. If access is unavailable record which steps were not performed.
4. Provide only the setup and execution steps relevant to this use case.
### Use examples and evidence carefully
Use [Component construction checks](references/component-construction.html) when building a Flow, composing components, or mapping PL/SQL tools. Follow control edges and data edges separately; reaching a node does not populate its inputs.
Use matching released Oracle documentation as the customer-facing contract. Internal test plans can identify edge cases, but their expected results, recorded actual results, open issues, and execution status are different evidence. A test marked completed is not proof that the user's release supports it. Do not copy intentionally invalid specimens, historical failures, internal endpoints, secret values, or undocumented diagnostic hooks into customer artifacts. Use initialization or execution parameters only when documented for the target release and relevant to the requested task. Keep internal provenance in maintainer notes outside the distributable skill. If a feature or exact API signature cannot be confirmed for the target release, identify that gap and provide a design rather than invented runnable code.
## Deliverables
Match the requested scope. For a review, design discussion, or checklist-only request, provide that result without generating unrequested JSON or SQL. For a creation request with enough information, present:
1. A short design summary and any assumptions.
2. The complete Agent Spec JSON in a code block or as a `.json` file when requested.
3. The requested immediate or stored execution SQL/PLSQL, with placeholders for environment-specific names and credentials.
4. A concise setup checklist covering required privileges, database credentials, network access, and existing PL/SQL tools as applicable.
5. A validation report with separate statuses for JSON syntax, static spec review, database-side validation, runtime execution, and business-contract assertions. Record actual versus expected typed values and whether the intended tool received the complete arguments. Mark database validation and runtime testing as not performed unless there is evidence they ran.
6. Links to the relevant Oracle documentation pages.
Keep the main response usable for someone new to Agent Engine. Explain when `CREATE_AGENT` only stores a specification and execution is a separate call. Do not imply that producing a spec configures credentials, grants privileges, creates database procedures, or runs the agent.
## References
- [Agent Spec patterns](references/agent-spec-patterns.html)
- [Database setup and execution](references/database-execution.html)
- [Component construction checks](references/component-construction.html)
- [Conversations and recovery](references/conversations-and-recovery.html)