From ebf3002ad47d1a66057b50fc49211b882080f8d6 Mon Sep 17 00:00:00 2001 From: rrader2890 Date: Wed, 19 Aug 2026 09:46:25 -0400 Subject: [PATCH] feat(memory): brainId, subjectId, and predicate facets on admin.list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server's admin list route already accepts all three, and `list` passes params straight through as query — so they worked at runtime and were simply missing from ListMemoryParams, which meant TypeScript callers had to cast to reach them. brainId is a real server-side filter, unlike the knowledge graph, which stays workspace-wide because entities dedupe across brains. The doc comment says so, since the asymmetry is surprising. --- src/types/memory.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/types/memory.ts b/src/types/memory.ts index 637fac1..0b8310f 100644 --- a/src/types/memory.ts +++ b/src/types/memory.ts @@ -298,6 +298,17 @@ export interface ListMemoryParams { source?: string chatbotId?: string chatIdentityId?: string + /** + * Restrict to memories belonging to one brain. + * + * Unlike the knowledge graph — which is still workspace-wide because entities + * dedupe across brains — this IS a real server-side filter. + */ + brainId?: string + /** Only memories carrying a KG edge whose subject is this entity. */ + subjectId?: string + /** Only memories carrying a KG edge with this predicate. */ + predicate?: string limit?: number offset?: number }