Important ChangeThe
async_mode
parameter defaults to true
for all memory additions, changing the default API behavior to asynchronous processing.Overview
The Memory Addition API processes all memory additions asynchronously by default. This change improves performance and scalability by queuing memory operations in the background, allowing your application to continue without waiting for memory processing to complete.What’s Changing
The parameterasync_mode
will default to true
instead of false
.
This means memory additions will be processed asynchronously by default - queued for background execution instead of waiting for processing to complete.
Behavior Comparison
Old Default Behavior (async_mode = false)
Whenasync_mode
was set to false
, the API returned fully processed memory objects immediately:
New Default Behavior (async_mode = true)
Withasync_mode
defaulting to true
, memory processing is queued in the background and the API returns immediately:
Migration Guide
If You Need Synchronous Processing
If your integration relies on receiving the processed memory object immediately, you can explicitly setasync_mode
to false
in your requests:
If You Want to Adopt Asynchronous Processing
If you want to benefit from the improved performance of asynchronous processing:- Remove any explicit
async_mode=False
parameters from your code - Use webhooks to receive notifications when memory processing completes
Learn more about Webhooks for real-time notifications about memory events.
Benefits of Asynchronous Processing
Switching to asynchronous processing provides several advantages:- Faster API Response Times: Your application doesn’t wait for memory processing
- Better Scalability: Handle more memory additions concurrently
- Improved User Experience: Reduced latency in your application
- Resource Efficiency: Background processing optimizes server resources
Important Notes
- The default behavior is now
async_mode=true
for asynchronous processing - Explicitly set
async_mode=false
if you need synchronous behavior - Use webhooks to receive notifications when memories are processed
Monitoring Memory Processing
When using asynchronous mode, use webhooks to receive notifications about memory events:Configure Webhooks
Learn how to set up webhooks for memory processing events