feat(askai): add Agent Studio memory support#2888
Merged
Merged
Conversation
❌ Deploy Preview for docsearch-demo failed.
|
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 1 high |
🟢 Metrics 104 complexity · 7 duplication
Metric Results Complexity 104 Duplication 7
TIP This summary will be updated as you push new changes.
1 task
pipeline1987
approved these changes
May 29, 2026
NatanTechofNY
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Agent Studio can now persist and recall user-specific context across conversations through its memory feature. Without support in DocSearch, these memory operations were invisible to users, the agent would silently store and retrieve memories with no feedback, and there was no way to scope memory to an authenticated user.
This PR makes the memory feature first-class in the Ask AI experience so that:
algolia_ponder,algolia_memorize,algolia_memory_search) now surface clear messaging ("Saved to memory" / "Used memory to enhance results") instead of being dropped as unrecognized tool calls. This is opt-in viamemory.enabledto avoid changing behavior for integrations that don't use it.memory.userToken(JWT) is forwarded as thex-algolia-secure-user-tokenheader so the agent reads/writes the correct user's memory, enabling per-user personalization without leaking memory across users.Notes
ToolStateprimitive was extracted so the newMemoryTooland existingSearchToolrender consistently.Testing
memory.enabled = truememory.userToken = JWTScreenshots