Guides
Cost Optimization
Reduce unnecessary memory operations without relying on generic savings claims. Optimize the data you write, the results you request, and the prompts you actually use.
Measure before changing behavior
- Track add and query volume by product workflow.
- Measure how many retrieved records are actually used in a prompt.
- Evaluate answer quality and prompt size together.
- Use the dashboard and current pricing documentation for account-specific usage.
Write less, write better
- Store durable facts and outcomes instead of every raw turn.
- Use bulk add with
client_refwhen the same event may be submitted more than once. - Avoid storing logs, boilerplate, and content your application will never retrieve.
- Forget memory that is no longer needed under your product’s retention policy.
Retrieve only what you can use
- Ask a specific semantic question rather than a broad “everything about this user” query.
- Request a small result set and increase it only when evaluation shows a benefit.
- Use project, end-user, source, tag, or time-range filters when they match the request.
- Do not place unused results in the model prompt.
Protect quality while optimizing
| Change | Verify |
|---|---|
| Fewer writes | Important preferences and outcomes remain available later. |
| Smaller result count | Expected facts still appear for representative questions. |
| Shorter retention | Required user and compliance workflows still work. |
| More filters | Valid results are not excluded by stale metadata. |
Related guidance
Was this page helpful?