feat: add Agent Episodic Memory support (recall node)#793
Merged
Conversation
18f228e to
44fd7e2
Compare
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
swathiJayav
reviewed
Apr 22, 2026
3729ad9 to
ce6a8ea
Compare
swathiJayav
reviewed
Apr 22, 2026
andreitava-uip
requested changes
Apr 23, 2026
AAgnihotry
reviewed
Apr 23, 2026
AAgnihotry
reviewed
Apr 23, 2026
This was referenced Apr 24, 2026
efd5466 to
2d14753
Compare
andreitava-uip
requested changes
Apr 24, 2026
2d14753 to
8c8b6b1
Compare
- Add MemoryConfig with field_weights, threshold, result_count, folder_path, memory_space_name - Add memory_recall node that queries UiPath Memory service before INIT - Emit OTel trace spans (Find previous memories, Apply dynamic few shot) - Extract OTel helpers to _utils/_otel.py for reuse across tools - Prefix key_path with field type (agent-input) matching backend - Add definition_system_prompt to memory search request - Filter empty string values in _build_search_fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8c8b6b1 to
4817a5e
Compare
andreitava-uip
approved these changes
Apr 24, 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.
Summary
MemoryConfigis passed tocreate_agent(), aMEMORY_RECALLnode is inserted beforeINITthat queries the UiPath Memory service and stores thesystemPromptInjectionin graph state. The INIT node reads it and appends to the system prompt.MemoryConfig,AgentGraphNode.MEMORY_RECALL,InnerAgentGraphState.memory_injectionuipath-platform >= 0.1.31forMemoryServicetypes (depends on feat: scaffold MemoryService for Agent Episodic Memory (URT migration) uipath-python#1467)Graph with memory enabled
Files changed
types.py—MemoryConfigdataclass,memory_injectionfield on inner state,MEMORY_RECALLnode enummemory_node.py— New: memory recall graph nodeagent.py—create_agent()accepts optionalmemoryparameterinit_node.py— Readsmemory_injectionfrom state and appends to system prompt__init__.py— ExportsMemoryConfigRelationship with UiPath/uipath-agents-python#374
This PR and UiPath/uipath-agents-python#374 together implement the full Agent Episodic Memory feature across both repos:
uipath-langchain-python)MEMORY_RECALLnode,MemoryConfig, and INIT-node injectionMemoryConfigfrom agent definition (isAgentMemoryEnabled+memorySpaceId) and passes it tocreate_agent()memory_node.py— buildsMemorySearchRequest, callssdk.memory.search_async()memory.py— containsbuild_memory_search_request()andretrieve_memory_injection()helpers (to be replaced by the graph node from this PR)MemoryConfigfor callers to pass_get_memory_config()extracts memory settings fromAgentDefinitionand constructsMemoryConfigMerge order: This PR should merge first (or concurrently with UiPath/uipath-python#1467). Then UiPath/uipath-agents-python#374 can be updated to:
_populate_memory_context()mutable-dict approachMemoryConfigtocreate_agent(memory=...)ingraph.pymemory_contextthreading through the message factoryBoth PRs depend on UiPath/uipath-python#1467 (
uipath-platform >= 0.1.31) for theMemoryServicetypes.Test plan
test_create_agent.pytests pass (graph structure unchanged whenmemory=None)E2E flow tested with https://github.com/UiPath/Agents/pull/5082/changes enabled

Ingestion

🤖 Generated with Claude Code