A full-stack demo that puts Oracle Database 26ai's Select AI features in front of a web UI. Users type natural-language questions; the Autonomous Database translates them into SQL, orchestrates agentic workflows, or retrieves answers from documents — all powered by OCI Generative AI.
The backend is a thin Spring Boot layer that forwards prompts to the database via JDBC. The database does the heavy lifting: it generates SQL, calls the LLM, manages agent reasoning, and performs vector search over indexed documents. Infrastructure is provisioned with Terraform on OCI and configured with Ansible.
- Select AI (NL2SQL) — Natural language to SQL. Ask questions in plain English, get SQL queries and results from the HR sample schema.
- Select AI Agents — Agentic AI. The database autonomously reasons and executes multi-step analytical tasks.
- Select AI RAG — Retrieval Augmented Generation. Combines database knowledge with document retrieval for richer answers.
- Three Ways Oracle Database 26ai Answers Questions You Couldn't Ask Before — What Select AI does: NL2SQL, RAG, and Agents explained with code and diagrams.
- Deploying Oracle Database 26ai Select AI on OCI — How the infrastructure gets provisioned: the Python CLI, Terraform, Ansible, and cloud-init pipeline.
graph TB
User([User])
FE[Angular Frontend]
LB[OCI Load Balancer]
BE[Spring Boot Backend]
ADB[(Autonomous Database 26ai)]
GenAI[OCI Generative AI]
ObjStore[Object Storage]
User --> FE
FE --> LB
LB --> BE
BE -- JDBC --> ADB
ADB -- LLM calls --> GenAI
ADB -- RAG documents --> ObjStore
| Tool | Minimum version | Check |
|---|---|---|
| Python | 3.11+ | python3 --version |
| OCI CLI | configured | ~/.oci/config exists |
| Terraform | 1.5+ | terraform --version |
| Java | 23+ | java --version |
| Node.js | 22+ | node --version |
| npm | 10+ | npm --version |
pip install -r requirements.txtReads your ~/.oci/config, lists subscribed regions and compartments via the OCI SDK, and saves everything to .env. Also generates an Oracle-compliant database password.
python manage.py setupCompiles the Spring Boot JAR and Angular production bundle. Checks tool versions before starting.
python manage.py buildRenders terraform.tfvars from the .env values using a Jinja2 template.
python manage.py tfcd deploy/tf/appterraform initterraform plan -out=tfplanterraform apply tfplanThis provisions the full OCI stack: VCN (3 subnets), Autonomous Database, 3 compute instances, load balancer, and Object Storage buckets with all artifacts.
Go back to the project root and get the connection details:
cd ../../..python manage.py ansibleThis prints the load balancer IP, ops instance IP, and SSH command. SSH into the ops instance and wait for cloud-init to finish:
ssh -i ~/.ssh/your_key opc@<ops_ip>sudo cloud-init status --waitWhen cloud-init shows status: done, the demo is ready. Open the load balancer IP in your browser.
Check for active resources and print destroy instructions:
python manage.py cleanIf Terraform resources are still running, destroy them first:
cd deploy/tf/appterraform destroyThen re-run python manage.py clean to remove generated files (.env, terraform.tfvars, build artifacts).
On any instance, check provisioning progress:
sudo cloud-init statussudo tail -100 /var/log/cloud-init-output.logFrom the ops instance, reach backend and web VMs:
cat /home/opc/ansible_params.json | grep -E "backend_private_ip|web_private_ip"ssh -i /home/opc/private.key opc@<backend_private_ip>systemctl status backendjournalctl -u backend -fsystemctl status nginxIf provisioning failed partway through:
ansible-playbook -i ops.ini --extra-vars "@ansible_params.json" ansible_ops/server.yaml├── manage.py # CLI: setup, build, tf, ansible, clean
├── requirements.txt # Python dependencies
├── docs/
│ ├── articles/ # Technical articles
│ ├── todos/ # TODO tracking
│ └── issues/ # Known issues
├── src/
│ ├── backend/ # Spring Boot 3.5 + Java 23 + Gradle
│ └── frontend/ # Angular v21
└── deploy/
├── tf/ # Terraform (OCI infrastructure)
│ ├── app/ # Main orchestration layer
│ └── modules/ # adbs, backend, web, ops
└── ansible/ # Ansible roles: ops, backend, web
cd src/backend./gradlew bootRun --args='--spring.profiles.active=local'Proxies /api requests to localhost:8080.
cd src/frontendnpm installnpm startOpen http://localhost:4200.
