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
{{ message }}
Repository navigation
[Bug][multi-agent-memory]: GET /memories returns superseded memories and turns Statewave errors into an empty list #495
# server.py:326-334@app.get("/memories", ...)asyncdefget_memories():
"""Return current active memories for the subject."""asyncwith_sw() assw:
try:
memories=awaitsw.search_memories(SUBJECT_ID)
return {"memories": memories}
exceptStatewaveError:
return {"memories": []}
Not "active" only.search_memories() (agents/base.py) returns timeline.memories, which includes superseded memories. The docstring says active, and the demo is all about stale facts being superseded, so returning them unmarked to API callers is misleading.
Errors look like "no data". A Statewave 401/500/outage returns 200 {"memories": []}, which is indistinguishable from an empty subject.
Expected Behavior
/memories returns only status == "active" memories, and a Statewave failure returns 502 with the error.
(Or, if superseded ones are wanted, keep them and fix the docstring, but the error handling should change either way.) Add a test in tests/ with a stubbed client.
Steps to Reproduce
Run the demo (Bloomberg's 3.5% Stripe fact gets superseded by TechCrunch's 2.9%), then curl localhost:8000/memories → both the 3.5% and 2.9% facts are listed.
Activity
Imad2702 commentedon Oct 14, 2026
Hi, I am working on this.