Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@
# PRLabel: %Digital Twins
/sdk/digitaltwins/ @Aashish93-stack @johngallardo @Satya-Kolluri @sjiherzig

# AzureSdkOwners: @ahall-msft
# ServiceLabel: %Discovery
# ServiceOwners: @ahall-msft

# PRLabel: %Discovery
/sdk/discovery/ @ahall-msft

# PRLabel: %Document Intelligence
/sdk/documentintelligence/ @bojunehsu @yungshinlintw

Expand Down
6 changes: 6 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,12 @@
"oeverify"
]
},
{
"filename": "sdk/discovery/azure-ai-discovery/**",
"words": [
"deser"
]
},
{
"filename": "sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/*.py",
"words": [
Expand Down
33 changes: 33 additions & 0 deletions sdk/discovery/azure-ai-discovery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Release History

## 1.0.0 (2026-07-25)

General availability release of `azure-ai-discovery`. API version `2026-06-01` is now the default for both `WorkspaceClient` and `BookshelfClient`.

### Features Added

- **Workspace**:
- New paged list response models: `PagedConversation`, `PagedInvestigation`.
- New `StorageMountProtocol` enum for controlling storage mount protocols.
- New `tools.cancel_run_lro` long-running cancellation flow (in addition to the existing immediate `cancel_run`).
- Investigation `update` is now exposed via a documented sample.
- **Bookshelf**: knowledge-base surface is significantly redesigned around a single `KnowledgeBasesOperations` group that exposes the full lifecycle in one place:
- **Lifecycle**: `create_or_update`, `get`, `delete`, plus `get_operation_status` for polling long-running operations.
- **Indexing**: `start_indexing` and `cancel_indexing`, with results modeled via `KnowledgeBaseIndexingOperationResponse`, `IndexingOperationResult`, `IndexingMetrics`, and `LastIndexingRun`.
- **Search**: new `search` operation taking `SearchRequest` and returning `SearchResponse`, including `SearchResultItem` with `Citation` and `CitationType` for citation-aware results.
- **LRO results**: status responses now use `KnowledgeBaseOperationResponse` / `KnowledgeBaseSearchOperationResponse`; create/update returns the `KnowledgeBase` resource.
- New enum `KnowledgeBaseOperationType`.

### Breaking Changes

> Note: these are breaking changes only relative to the `1.0.0b1` preview release. As a first stable (GA) release, `1.0.0` is the new compatibility baseline going forward.

- **Bookshelf**: the `KnowledgeBaseVersionsOperations` operation group is removed. Knowledge-base versioning has been folded into the unified `KnowledgeBasesOperations` group; callers using `client.knowledge_base_versions.<method>` must migrate to the equivalent method on `client.knowledge_bases`.
- **Bookshelf**: the models `KnowledgeBaseOperationStatus` and `KnowledgeBaseVersion` are removed. Operation-status payloads are now typed as `KnowledgeBaseOperationResponse`, `KnowledgeBaseIndexingOperationResponse`, or `KnowledgeBaseSearchOperationResponse` depending on the operation; create/update returns the `KnowledgeBase` resource.
- The preview API version `2026-02-01-preview` is no longer listed as a supported value for the `api_version` kwarg. Both `WorkspaceClient` and `BookshelfClient` now default to `2026-06-01`. Pinning to the removed preview value is not supported in the GA SDK.
- **Workspace**: the investigations long-running operation status model, previously generated as `ResourceOperationStatusInvestigationInvestigationError`, has been renamed to `InvestigationOperationStatus`. The payload is unchanged; only the model name differs.

### Other Changes

- Regenerated against [Azure/azure-rest-api-specs PR #42884](https://github.com/Azure/azure-rest-api-specs/pull/42884) (commit `fbe3c49c541a2932f4a4cb348fb0798988f4aca4`).
- `Development Status` classifier flipped from `4 - Beta` to `5 - Production/Stable`.
- Emitter `@azure-tools/typespec-python` at `0.63.3`; the four hand-written client `_patch.py` overrides that expose `transport` and `api_version` as explicit keyword-only parameters remain in place pending future emitter support.

## 1.0.0b1 (2026-05-16)

Initial beta release of the Azure AI Discovery client library for Python.
Expand Down
32 changes: 22 additions & 10 deletions sdk/discovery/azure-ai-discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Azure AI Discovery client library for Python provides two clients for interacting with Azure AI Discovery services:

- **WorkspaceClient** — manage investigations, conversations, tasks, and tools in a Discovery workspace.
- **BookshelfClient** — manage knowledge bases and knowledge base versions.
- **BookshelfClient** — manage knowledge bases, including indexing and search.

[Source code][source_code] | [Package (PyPI)][pypi] | [Samples][samples]

Expand Down Expand Up @@ -59,8 +59,7 @@ The `WorkspaceClient` provides access to Discovery workspace operations, organiz

The `BookshelfClient` provides access to knowledge base management:

- **Knowledge Bases** — list available knowledge bases.
- **Knowledge Base Versions** — create, update, index, and manage versions of knowledge bases backed by storage assets.
- **Knowledge Bases** — create, update, get, list, and delete knowledge bases backed by storage assets, run indexing as a long-running operation, and execute long-running search queries.

## Examples

Expand Down Expand Up @@ -161,23 +160,22 @@ print(f"Run completed: {result.status}")

```python
from azure.ai.discovery import BookshelfClient
from azure.ai.discovery.models import KnowledgeBaseVersion, StorageAssetReference
from azure.ai.discovery.models import KnowledgeBase, SearchRequest, StorageAssetReference
from azure.identity import DefaultAzureCredential

client = BookshelfClient(
endpoint="https://<bookshelfName>.bookshelf.discovery.azure.com",
credential=DefaultAzureCredential(),
)

# List knowledge bases
# List knowledge bases (ItemPaged — transparent paging)
for kb in client.knowledge_bases.list():
print(f"Knowledge base: {kb.name}")

# Create a knowledge base version
version = client.knowledge_base_versions.create_or_update(
# Create or update a knowledge base (long-running)
poller = client.knowledge_bases.begin_create_or_update(
knowledge_base_name="my-kb",
version_name="v1",
resource=KnowledgeBaseVersion(
resource=KnowledgeBase(
description="Research data for compound analysis",
copilot_instruction="Use this to query information about compound interactions.",
storage_asset_references=[
Expand All @@ -188,7 +186,21 @@ version = client.knowledge_base_versions.create_or_update(
],
),
)
print(f"Created version: {version.name}")
kb = poller.result()
print(f"Created knowledge base: {kb.name}")

# Run indexing (long-running)
client.knowledge_bases.begin_start_indexing(
knowledge_base_name="my-kb",
node_pool_id="/subscriptions/.../nodePools/my-pool",
project_id="/subscriptions/.../projects/my-project",
).result()

# Search the knowledge base (long-running)
client.knowledge_bases.begin_search(
knowledge_base_name="my-kb",
body=SearchRequest(query="What are common drug interactions?"),
).result()
```

## Troubleshooting
Expand Down
6 changes: 6 additions & 0 deletions sdk/discovery/azure-ai-discovery/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"apiVersions": {
"Microsoft.Discovery.Bookshelf": "2026-06-01",
"Microsoft.Discovery.Workspace": "2026-06-01"
}
}
Loading
Loading