fix(brain): shared brain — don't filter by agent_id on recall
Was forcing agent isolation. Now all agents see all memories by default. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
5fbaf4f211
commit
85dd0555ac
1 changed files with 6 additions and 3 deletions
|
|
@ -152,9 +152,12 @@ func (s *DirectSubsystem) remember(ctx context.Context, _ *mcp.CallToolRequest,
|
|||
|
||||
func (s *DirectSubsystem) recall(ctx context.Context, _ *mcp.CallToolRequest, input RecallInput) (*mcp.CallToolResult, RecallOutput, error) {
|
||||
body := map[string]any{
|
||||
"query": input.Query,
|
||||
"top_k": input.TopK,
|
||||
"agent_id": agentName(),
|
||||
"query": input.Query,
|
||||
"top_k": input.TopK,
|
||||
}
|
||||
// Only filter by agent_id if explicitly provided — shared brain by default
|
||||
if input.Filter.AgentID != "" {
|
||||
body["agent_id"] = input.Filter.AgentID
|
||||
}
|
||||
if input.Filter.Project != "" {
|
||||
body["project"] = input.Filter.Project
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue