You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ This folder contains the main project documentation for Agent Memory Toolkit.
6
6
7
7
| Document | Purpose |
8
8
|----------|---------|
9
-
|[concepts.md](concepts.md)| Explains the core memory model, including memory types (turn, summary, fact, user summary), threads, roles, the processing pipeline, and automatic change feed processing. |
10
-
|[local_testing.md](local_testing.md)| Covers local setup, environment configuration, RBAC, Cosmos provisioning, running the toolkit and Azure Functions locally, and testing change feed auto-processing. |
11
-
|[azure_testing.md](azure_testing.md)| Covers Azure deployment, cloud configuration, required services, change feed settings, and validation steps for running the toolkit in Azure. |
9
+
|[concepts.md](concepts.md)| Explains the core memory model, including memory types (turn, summary, fact, user summary), threads, roles, the processing pipeline, automatic change feed processing, and shared Cosmos throughput configuration. |
10
+
|[local_testing.md](local_testing.md)| Covers local setup, environment configuration, RBAC, Cosmos provisioning, running the toolkit and Azure Functions locally, and testing change feed auto-processing with serverless or autoscale container provisioning. |
11
+
|[azure_testing.md](azure_testing.md)| Covers Azure deployment, cloud configuration, required services, change feed settings, throughput mode configuration, and validation steps for running the toolkit in Azure. |
12
12
|[design_patterns.md](design_patterns.md)| Shows when and how to call CRUD operations, summarization, fact extraction, and memory retrieval in chat and multi-agent applications, including automatic processing via the change feed. |
`COSMOS_DB_THROUGHPUT_MODE=serverless` is the default and creates the `memories`, `counter`, and `leases` containers without specifying RU/s. Set `COSMOS_DB_THROUGHPUT_MODE=autoscale` to apply the shared `COSMOS_DB_AUTOSCALE_MAX_RU` cap to all required containers.
118
+
114
119
### Change feed settings (optional)
115
120
116
121
To enable automatic processing via the change feed trigger, add these settings:
@@ -122,14 +127,17 @@ az functionapp config appsettings set \
Set any threshold to `"0"` to disable that processing type.
131
139
132
-
The `leases` container is created automatically by the Azure Functions runtime.
140
+
The `leases` container is provisioned by `create_memory_store()` alongside the `memories` and `counter` containers, so the Function App should be configured to use that existing lease container.
133
141
134
142
If you use function-key auth for the HTTP trigger, keep the key for the client as `ADF_KEY`.
135
143
@@ -161,6 +169,9 @@ Update `.env` to point at Azure instead of localhost:
This provisions the hierarchical partition key (`user_id`, `thread_id`), vector index, full-text index, and autoscale throughput.
257
+
This provisions the `memories`, `counter`, and `leases` containers. `serverless` is the default throughput mode; if you set `COSMOS_DB_THROUGHPUT_MODE=autoscale`, the shared `COSMOS_DB_AUTOSCALE_MAX_RU` value is applied to all three containers.
|`leases`|`/id`| Auto-created by the trigger for change feed checkpointing |
157
+
|`leases`|`/id`| Change feed checkpointing container created by `create_memory_store()`|
158
+
159
+
### Throughput configuration
160
+
161
+
The toolkit provisions all required Cosmos containers under one shared throughput mode:
162
+
163
+
-`serverless` is the default. The toolkit creates the `memories`, `counter`, and `leases` containers without specifying RU/s.
164
+
-`autoscale` applies the shared `COSMOS_DB_AUTOSCALE_MAX_RU` cap to all three containers.
165
+
166
+
This keeps the change feed dependencies aligned with the main memory store instead of letting the Functions trigger create the lease container independently.
The Functions runtime uses `azure_functions/local.settings.json`, not `.env`, so mirror the same values there.
87
90
91
+
`COSMOS_DB_THROUGHPUT_MODE=serverless` is the default and creates the required Cosmos containers without specifying RU/s. If you set `COSMOS_DB_THROUGHPUT_MODE=autoscale`, the toolkit provisions the memories, counter, and lease containers with the shared max RU/s value from `COSMOS_DB_AUTOSCALE_MAX_RU`.
92
+
88
93
### Change feed settings (optional)
89
94
90
95
In `azure_functions/local.settings.json`, add these to enable automatic processing:
`create_memory_store()` creates the database/container and configures the hierarchical partition key (`user_id`, `thread_id`), vector index, full-text index, and autoscale throughput.
236
+
`create_memory_store()` creates the database and required containers, configures the hierarchical partition key (`user_id`, `thread_id`) for memories and counters, uses `/id` for the lease container, and applies either serverless or autoscale throughput based on `COSMOS_DB_THROUGHPUT_MODE`.
|**Azure OpenAI /AI Foundry**| Embedding model + chat model for summarization / fact extraction |
188
194
|**Azure Functions**| Durable Functions orchestrator and activity functions |
189
195
190
-
Automatic change feed processing stores lightweight counter documents in a dedicated `counter` container and also uses a `leases` container (auto-created). See [concepts.md](Docs/concepts.md#automatic-processing-change-feed) for details.
196
+
Automatic change feed processing stores lightweight counter documents in a dedicated `counter` container and also uses a `leases` container that is provisioned by `create_memory_store()`. Throughput defaults to `serverless`; set`COSMOS_DB_THROUGHPUT_MODE=autoscale` to apply the shared `COSMOS_DB_AUTOSCALE_MAX_RU` cap to the memories, counter, and lease containers. See [concepts.md](Docs/concepts.md#automatic-processing-change-feed) for details.
191
197
192
198
All services use **Entra ID** auth via `DefaultAzureCredential`.
0 commit comments