Add oracle-agent-memory demo: three-layer agent memory with Oracle AI Database 26ai#230
Open
allenheltondev wants to merge 1 commit into
Open
Add oracle-agent-memory demo: three-layer agent memory with Oracle AI Database 26ai#230allenheltondev wants to merge 1 commit into
allenheltondev wants to merge 1 commit into
Conversation
Signed-off-by: Allen Helton <allenheltondev@gmail.com>
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What: Introduces a new demo app that trains an AI agent to mimic a user's social media voice using episodic, semantic, and reflection memory stored in Oracle AI Database 26ai.
Why: Demonstrates an end-to-end pattern (vectors + JSON + relational) for persistent agent memory and showcases Oracle AI Database 26ai + OCI Generative AI integration.
Key Features
Three-layer memory: Episodic (vectorized posts), Semantic (style profile JSON), Reflection (periodic profile diffs).
End-to-end demo: Server (Node.js/TypeScript + oracledb), client (React + Vite), and DB schema + seed data included.
Cloud-ready provisioning: Optional Terraform to provision an Always Free Autonomous AI Database and emit a populated .env.
Setup & Quick Test
Terraform (Path A):
cd apps/oracle-agent-memory/terraform
cp terraform.tfvars.example terraform.tfvars
terraform init && terraform apply
terraform output -raw env_file > ../.env
cd .. && npm install && npm run schema && npm run seed && npm run dev
Existing DB (Path B):
cp .env.example .env → edit with Oracle + OCI credentials
npm install && npm run schema && npm run seed && npm run dev
Verify: Open http://localhost:5173, generate a draft, save a post, and confirm reflection triggers after 5 saves.
Notes & Considerations
Privacy: All queries filter on user_id. DELETE is soft by default.
Idempotence: npm run seed is idempotent (clears and reloads demo data).
Models: Defaults use OCI Generative AI model IDs (override with OCI_CHAT_MODEL_ID / OCI_EMBED_MODEL_ID).
PowerShell tip: Use UTF-8 write when capturing Terraform output on Windows (see README).
Testing / Review Checklist
Manual: Generate drafts, save posts, confirm style profile updates and reflections.
DB: Confirm schema.sql creates tables and HNSW index and that seed populates posts and style_profile.
Terraform: Optionally run the terraform flow to validate provisioning and generated .env.