This folder contains the datastore-backed Deepagents samples for
langchain-oci.
Included files:
adb_multi_store_huggingface_tutorial.mdadb_multi_store_huggingface_example.pyopensearch_multi_index_huggingface_tutorial.mdopensearch_multi_index_huggingface_example.pypersistence_oracle_example.pylocal_docker_oracle_deepagents.ipynb
These samples show the full workflow:
- download a small dataset slice from Hugging Face
- convert the rows into LangChain
Documentobjects - ingest those documents into two vector-backed stores
- run
create_deepagents_agent(...)across both stores - write a final markdown memo
Follow this order:
- Install the
libs/ocidependencies. - Export OCI credentials and model settings.
- Export backend-specific settings for either ADB or OpenSearch.
- Run one of the sample scripts from the repository root with
PYTHONPATH=libs/oci. - Check the generated markdown report.
cd libs/oci
poetry install --with lint,typing,test,test_integration
poetry run pip install datasets deepagentsFor ADB also install:
poetry run pip install oracledb langchain-oracledbFor OpenSearch also install:
poetry run pip install opensearch-pyexport OCI_COMPARTMENT_ID="ocid1.compartment..."
export OCI_REGION="us-ashburn-1"
export OCI_AUTH_TYPE="API_KEY"
export OCI_AUTH_PROFILE="API_KEY_AUTH"
export OCI_EMBEDDING_MODEL="cohere.embed-v4.0"
export OCI_DEEPAGENTS_MODEL="google.gemini-2.5-flash"Optional for a larger output budget:
export OCI_DEEPAGENTS_MAX_TOKENS="65536"For ADB export:
export ADB_DSN="deepresearch_low"
export ADB_USER="ADMIN"
export ADB_PASSWORD="..."
export ADB_WALLET_LOCATION="$HOME/.oci/wallets/deepresearch"
export ADB_WALLET_PASSWORD="..."For OpenSearch export:
export OPENSEARCH_ENDPOINT="https://opensearch.example.com:9200"
export OPENSEARCH_USERNAME="admin"
export OPENSEARCH_PASSWORD="..."
export OPENSEARCH_VECTOR_FIELD="vector_field"
export OPENSEARCH_SEARCH_FIELDS="title,content"
export OPENSEARCH_USE_SSL="true"
export OPENSEARCH_VERIFY_CERTS="false"If you already have the Eolas local config, you can take the OpenSearch values
from ~/Projects/observai/eolas/config/config.local.yaml.
ADB:
PYTHONPATH=libs/oci python samples/11-deepagents/adb_multi_store_huggingface_example.py \
--limit 10 \
--run-id tutorial01 \
--output samples/11-deepagents/adb_multi_store_huggingface_output.mdOpenSearch:
PYTHONPATH=libs/oci python samples/11-deepagents/opensearch_multi_index_huggingface_example.py \
--limit 10 \
--run-id tutorial01 \
--output samples/11-deepagents/opensearch_multi_index_huggingface_output.mdIf you only want to verify ingestion first, add:
--skip-researchUse these for the detailed explanation of each path:
samples/11-deepagents/adb_multi_store_huggingface_tutorial.mdsamples/11-deepagents/opensearch_multi_index_huggingface_tutorial.md
persistence_oracle_example.py shows Oracle-backed thread persistence with
OracleSaver from langgraph-oracledb (installed by the [deepagents]
extra): two invokes on the same thread_id resume the conversation, then the
stored checkpoints are listed. It needs either ORACLE_CONN_STRING or the
ADB_* variables from step 3, plus the OCI settings from step 2:
PYTHONPATH=libs/oci python samples/11-deepagents/persistence_oracle_example.py \
--thread-id persistence-demo-01Full persistence documentation (checkpoints, OracleStore, StoreBackend):
libs/oci/docs/deepagents/persistence.md.