Skip to content

Commit fd63a9b

Browse files
hary73cursoragent
andauthored
feat(memory): add tenant_id to ingested message metadata (#1301)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8ef66cc commit fd63a9b

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@truefoundry/trueforge': patch
3+
---
4+
5+
Include the tenant id in the metadata of chat messages ingested into memory.

‎packages/trueforge/src/memory/zep/ZepMemoryProvider.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export class ZepMemoryProvider implements MemoryProvider {
157157
content: message.content,
158158
reference_time: message.createdAt,
159159
metadata: {
160+
tenant_id: scope.tenantId,
160161
session_id: exchange.sessionId,
161162
last_turn_id: exchange.lastTurnId,
162163
scope: scope.type,

‎packages/trueforge/tests/unit/memory/zep/ZepMemoryProvider.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ describe('ZepMemoryProvider', () => {
120120
content: message.content,
121121
reference_time: message.createdAt,
122122
metadata: {
123+
tenant_id: 'acme',
123124
session_id: 'session-1',
124125
last_turn_id: 't2',
125126
scope: 'default',

0 commit comments

Comments
 (0)