Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0cf48c1
Add agent-framework-azure-cosmos-memory context provider (draft)
TheovanKraay Jun 24, 2026
0b71728
ci: exclude azure-cosmos-memory from uv workspace resolution
TheovanKraay Jun 25, 2026
364dcb6
ci: fix code-quality failures for azure-cosmos-memory
TheovanKraay Jun 25, 2026
b1bfe60
Exclude azure-cosmos-memory README from markdown-code-lint task
TheovanKraay Jun 25, 2026
112a5c1
Address PR review comments on cosmos-memory context provider
TheovanKraay Jun 29, 2026
c9f2a0d
Include azure-cosmos-memory in the uv workspace
TheovanKraay Jul 1, 2026
470da52
Address review feedback on cosmos-memory provider
TheovanKraay Jul 1, 2026
7adeb37
Add emulator-backed vector search integration test
TheovanKraay Jul 2, 2026
193659c
Fix CI typing and package checks for azure-cosmos-memory
TheovanKraay Jul 2, 2026
cd46dae
Apply pyupgrade: single-arg AsyncGenerator in test_integration
TheovanKraay Jul 2, 2026
342c79a
Make Cosmos memory extraction drain transparently on provider exit
TheovanKraay Jul 2, 2026
4c2acb7
Add custom extraction-prompt seam and sample to cosmos-memory provider
TheovanKraay Jul 3, 2026
ab7ea3e
docs: document prompts_dir custom-extraction seam in cosmos-memory RE…
TheovanKraay Jul 3, 2026
babcda0
Address review: rename _new_session, drop defensive toolkit import guard
TheovanKraay Jul 7, 2026
d70e42d
Pass cadence via cadence_thresholds instead of mutating os.environ
TheovanKraay Jul 9, 2026
cb70fcc
Mark package alpha and drop private naming in samples
TheovanKraay Jul 9, 2026
1463a84
Require Python 3.11 and inject user summary as untrusted context
Jul 15, 2026
ec8de62
Merge remote-tracking branch 'upstream/main' into feature/cosmos-memo…
Jul 15, 2026
3cd8b91
CI: exclude azure-cosmos-memory from uv sync on Python 3.10
Jul 15, 2026
c7674b2
Merge remote-tracking branch 'upstream/main' into feature/cosmos-memo…
Jul 16, 2026
4430a5a
Merge remote-tracking branch 'upstream/main' into feature/cosmos-memo…
Jul 16, 2026
090289b
Re-trigger CI (flaky external link check)
Jul 16, 2026
ea12cde
Require chat/embedding models instead of silent defaults
Jul 17, 2026
2294e25
Fix pyright: narrow resolved chat/embedding models to str
Jul 17, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/python-lab-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
os: ${{ runner.os }}
exclude-packages: ${{ matrix.python-version == '3.10' && 'agent-framework-github-copilot' || '' }}
exclude-packages: ${{ matrix.python-version == '3.10' && 'agent-framework-github-copilot agent-framework-azure-cosmos-memory' || '' }}
env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
os: ${{ runner.os }}
exclude-packages: ${{ matrix.python-version == '3.10' && 'agent-framework-github-copilot' || '' }}
exclude-packages: ${{ matrix.python-version == '3.10' && 'agent-framework-github-copilot agent-framework-azure-cosmos-memory' || '' }}
env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache
Expand Down
40 changes: 40 additions & 0 deletions python/packages/azure-cosmos-memory/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Azure Cosmos DB Memory Package (agent-framework-azure-cosmos-memory)

Long-term semantic memory for agents, backed by Azure Cosmos DB via the
[Azure Cosmos DB Agent Memory Toolkit](https://github.com/AzureCosmosDB/AgentMemoryToolkit).

## Main Classes

- **`CosmosMemoryContextProvider`** - Context provider that integrates Cosmos DB-backed
semantic memory (facts, procedural/episodic memories, and user/thread summaries) into agents.

## Usage

```python
from azure.identity.aio import DefaultAzureCredential
from agent_framework_azure_cosmos_memory import CosmosMemoryContextProvider

provider = CosmosMemoryContextProvider(
cosmos_endpoint="https://<account>.documents.azure.com:443/",
cosmos_database="ai_memory",
foundry_endpoint="https://<project>.services.ai.azure.com",
credential=DefaultAzureCredential(),
)
```

## Import Path

```python
from agent_framework_azure_cosmos_memory import CosmosMemoryContextProvider
```

## Notes

- Requires the `azure-cosmos-agent-memory` toolkit and an AI Foundry endpoint (used for both
embeddings and fact extraction).
- Set a stable `user_id` in `state["user_id"]` or `session.state["user_id"]` for long-term,
cross-session memory. Without it, memory scopes to the ephemeral session id and the provider
logs a one-time warning.
- Background fact extraction runs out-of-band after each turn. Call `provider.flush()` before
shutdown so in-flight extraction completes before the client closes.
- See `README.md` for full configuration, authentication, and processor-tuning options.
21 changes: 21 additions & 0 deletions python/packages/azure-cosmos-memory/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Loading
Loading