This release is a pre-release and may not be stable for production use.
Oracle AI Database native vector stores for Microsoft Agent Framework.
pip install agent-framework-oracle==1.0.0a261106 Copy PIP instructions
An alpha connector for storing and searching native VECTOR columns in Oracle AI Database 26ai. OracleCollection implements async batch CRUD and vector search; OracleStore shares a client across collections; OracleSettings describes the connection and pool settings resolved through Agent Framework.
For username/password authentication, set ORACLE_DSN (for example localhost:1521/FREEPDB1), ORACLE_USER, and ORACLE_PASSWORD, or pass dsn, user, and password to either constructor. Typed driver settings can also be supplied with the pool_parameters mapping. Settings are resolved in order: named dsn/user/password argument > pool_parameters > selected .env file > process environment > connector pool defaults. A .env file is read only when env_file_path is specified; the selected file must exist, and env_file_encoding overrides UTF-8. password accepts str or Agent Framework SecretString and is unwrapped only when opening a connection.
Named connection values must be nonempty when supplied, but their presence is not required by the connector. Authentication and connection-descriptor completeness are validated by python-oracledb, allowing alternatives such as access_token, externalauth, or host with service_name/sid.
Explicit pool_parameters keys are forwarded when they are accepted by the installed python-oracledb version, including newly added driver options not yet declared by the open OracleSettings typed dictionary. This preserves editor discovery for known options while allowing forward-compatible keys. Unsupported names and typos raise an error; unrecognized ORACLE_ environment variables remain ignored.
Recognized scalar oracledb.create_pool_async() options can also be supplied as ORACLE_ settings. The prefix is removed, the remainder is converted to the driver's lowercase keyword name, and boolean, integer, and floating-point values are converted before the pool is created. Password-like values remain masked until they are passed to the driver. For example:
Alternatively, pass a configured oracledb.AsyncConnection or oracledb.AsyncConnectionPool as client for advanced authentication. A supplied client takes precedence over connection settings and remains caller-owned. A connector-created pool opens on first use and closes on close() or async context exit. A collection obtained from a store borrows its client; closing that collection does not close the store. The store must remain open while its collections are used.
Writes on pooled connections (both connector-owned and caller-supplied pools) are committed on success and rolled back on failure. Writes to a supplied AsyncConnection are left in the caller's transaction; the caller must commit or roll back. Oracle DDL commits independently of the surrounding transaction. Batch upserts on a borrowed connection may leave partial pending work on failure, so roll it back before reuse.
ensure_collection_exists() leaves an existing table unchanged and does not validate its schema; use a matching definition or create a new table. It never migrates data or changes existing indexes.
import asyncio from dataclasses import dataclass from typing import Annotated from agent_framework import Filter, VectorStoreField, vectorstoremodel from agent_framework_oracle import OracleStore @vectorstoremodel(collection_name="articles") @dataclass class Article: id: Annotated[str, VectorStoreField("key")] text: Annotated[str, VectorStoreField("data")] embedding: Annotated[list[float] | None, VectorStoreField("vector", dimensions=3)] = None async def main() -> None: async with OracleStore() as store: collection = store.get_collection(Article) await collection.ensure_collection_exists() await collection.upsert([Article("one", "Oracle vector search", [1, 0, 0])], generate_vectors=False) results = await collection.search( vector=[1, 0, 0], filter=Filter("text", "contains_text", "Oracle"), top=3 ) async for result in results: print(result["record"].text, result["score"]) asyncio.run(main()) Pass generate_vectors=False for precomputed vectors, or configure an embedding_generator for local generation. get() excludes vector columns by default; pass include_vectors=True to restore them. get(keys) preserves requested key order and duplicates, omitting missing keys; filtered retrieval supports top, skip, and order_by. Both get() and search() execute portable filters and paging in Oracle. The runnable sample creates and deletes a unique test table.
The unit tests require no Oracle server. To run the live integration test, provide all three ORACLE_TEST_DSN, ORACLE_TEST_USER, and ORACLE_TEST_PASSWORD for an explicitly designated disposable Oracle AI Database 26ai schema where the user can create and drop tables:
cd python uv run --package agent-framework-oracle pytest packages/oracle/tests \ -m integration Without those variables, the integration test skips; it never falls back to ordinary application credentials. The fixture creates a unique table and deletes only that table.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




