mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
c37f74f898
* Created cosmos history provider * add marker * Python: address Cosmos PR feedback - address provider/test/sample review feedback and cleanup typing - add cosmos integration test coverage and skip gating - add dedicated cosmos emulator jobs to python merge/integration workflows - switch cosmos workflow execution to package poe integration-tests task Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: handle empty Cosmos session id - replace default partition fallback for empty session_id - log warning and generate GUID when session_id is empty - update unit tests to validate GUID fallback behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix sample * fix cross partition query --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
21 lines
641 B
Markdown
21 lines
641 B
Markdown
# Azure Cosmos DB Package Samples
|
|
|
|
This folder contains samples for `agent-framework-azure-cosmos`.
|
|
|
|
| File | Description |
|
|
| --- | --- |
|
|
| [`cosmos_history_provider.py`](cosmos_history_provider.py) | Demonstrates an Agent using `CosmosHistoryProvider` with `AzureOpenAIResponsesClient` (project endpoint), provider-configured container name, and `session_id` partitioning. |
|
|
|
|
## Prerequisites
|
|
|
|
- `AZURE_COSMOS_ENDPOINT`
|
|
- `AZURE_COSMOS_DATABASE_NAME`
|
|
- `AZURE_COSMOS_CONTAINER_NAME`
|
|
- `AZURE_COSMOS_KEY` (or equivalent credential flow)
|
|
|
|
## Run
|
|
|
|
```bash
|
|
uv run --directory packages/azure-cosmos python samples/cosmos_history_provider.py
|
|
```
|