Advanced / Branch simulator
Resilient Fallbacks
A 200 response does not guarantee content. Empty results and skipped writes are valid outcomes, and treating them as failures is a common integration bug.
Simulator
Walk through each response
HTTP200
{ "memories": [], "latency_ms": 120 }A valid answer meaning “nothing relevant for this scope”. Answer without memory instead of showing an error.
Rules
Rules for handling them
- Never assume a 200 response contains memories — check the list length first.
- Keep “no results” and “request failed” as separate states in your product and your metrics.
- Retry only throttling and transient server errors, with a strict attempt cap.
- Make the memory-free answer good enough to ship on its own.
Copy and run
Copy a working example
result = ms.query("What are the user's formatting preferences?", k=5)if not result.memories:prompt = base_prompt # answer without memoryelse:prompt = base_prompt + render(result.memories)
Was this page helpful?