oracle-ai-developer-hub

LangChain Ecosystem

LangChain Oracle AI Database

A collection of notebooks that build AI applications and agents with the LangChain ecosystem — LangChain, LangGraph, Deep Agents, and Oracle’s first-party integrations (langchain-oracledb, langgraph-oracledb, langchain-oci) — using Oracle AI Database as the single backend for vectors, agent memory, checkpoints, the LLM cache, and chat history.

The theme of the folder is convergence: instead of stitching a vector database, a key-value store, a checkpoint file, and a chat log into one agent, every notebook here keeps all of that state in one converged database.

The stack

Every notebook follows the same shape:

Layer Typical component Role
Python the notebook runtime the glue
LLM provider ChatAnthropic (Claude) or an OpenAI chat model the reasoning engine that plans, calls tools, and synthesizes answers
LangChain / LangGraph langchain, langgraph, deepagents, langchain-oracledb, langgraph-oracledb, langchain-oci the orchestration fabric and the Oracle-backed persistence primitives
Oracle Oracle AI Database 23ai / 26ai one converged store for vectors, long-term memory, checkpoints, the LLM cache, and chat history

Embeddings are a pluggable vectorizerOpenAI text-embedding-3-small or a local HuggingFace model, depending on the notebook. Each notebook names its own model choices.

The Oracle × LangChain primitives these notebooks use

Primitive Package What it does
OracleVS langchain-oracledb LangChain vector store backed by Oracle AI Vector Search
OracleEmbeddings langchain-oracledb generate embeddings inside the database from an ONNX model
create_text_index langchain-oracledb Oracle Text keyword index for hybrid (vector + lexical) search
OracleSemanticCache langchain-oracledb reuse an LLM answer when a new prompt is semantically equivalent
OracleChatMessageHistory langchain-oracledb durable, session_id-scoped chat transcripts
OracleStore / AsyncOracleStore langgraph-oracledb long-term, cross-thread agent memory
OracleSaver / AsyncOracleSaver langgraph-oracledb per-thread short-term checkpoints (resume a conversation)
create_deepagents_agent langchain-oci Deep Agents factory that auto-wires Oracle datastores into agent tools

Notebooks

# Name Description Stack Open Notebook Open in Colab
01 RAG with Oracle & LangChain The starter: build a minimal RAG application on Oracle AI Vector Search with OracleVS and LangChain — ingest documents, embed them, and answer questions grounded in the retrieved chunks. Oracle AI Database · langchain-oracledb · HuggingFace Open Notebook Open In Colab
02 Semantic Cache + Chat History Two langchain-oracledb primitives for cheaper, coherent apps: OracleSemanticCache reuses an answer when a new question means the same as a past one, and OracleChatMessageHistory persists durable, session-scoped transcripts. Includes calibrating the cache’s distance threshold to the embedding model. langchain-oracledb · OpenAI (embeddings) · Anthropic Open Notebook Open In Colab
03 Research Agent with Deep Agents A durable research agent built with the released langchain_oci.create_deepagents_agent factory. Oracle backs the hybrid-search corpus (ADB), per-thread checkpoints (OracleSaver), long-term notes (OracleStore), and the agent’s virtual filesystem (StoreBackend) — while Claude reasons and plans. langchain-oci (deepagents) · Anthropic · HuggingFace · langgraph-oracledb · Oracle AI Database Open Notebook Open In Colab
04 AI On-Call Triage Assistant The capstone: a LangGraph supervisor orchestrates two specialists (issue_analyst, policy_agent) to triage incoming issues. Vector knowledge (OracleVS), long-term memory (AsyncOracleStore), checkpoints (AsyncOracleSaver), a semantic LLM cache (OracleSemanticCache), and chat history all share one Oracle AI Database. Runs on Claude Opus 4.8 with adaptive thinking. langchain · langgraph · langgraph-supervisor · langchain-oracledb · langgraph-oracledb · Anthropic (Claude Opus 4.8) · OpenAI Open Notebook Open In Colab

The notebooks build on each other from a starter app to a full multi-agent system:

  1. RAG with Oracle & LangChain (01) — learn the base pattern: OracleVS, embeddings, retrieval.
  2. Semantic Cache + Chat History (02) — add the two primitives that make an app cheap to run and coherent over time.
  3. Research Agent with Deep Agents (03) — graduate to an autonomous, planning agent whose memory lives in Oracle.
  4. AI On-Call Triage Assistant (04) — put it all together: a multi-agent supervisor over five kinds of Oracle-backed state.

Prerequisites