feat: add escalation memory cache and ingest#805
Open
mjnovice wants to merge 14 commits into
Open
Conversation
Contributor
Author
|
Transferring review comments from @andreitava-uip on #793 that apply to escalation memory (now in this PR):
|
Contributor
Author
|
Another comment from @andreitava-uip on #793:
|
Contributor
Author
|
Another comment from @andreitava-uip on #793:
|
8c8b6b1 to
4817a5e
Compare
gcuip
reviewed
Apr 24, 2026
4938bc0 to
7bd14ea
Compare
gcuip
reviewed
Apr 27, 2026
swathiJayav
reviewed
Apr 27, 2026
swathiJayav
reviewed
Apr 27, 2026
swathiJayav
reviewed
Apr 27, 2026
Adds memory integration to the escalation tool: - Before creating HITL task: escalation_search_async() checks for cached answer - Cache hit returns cached result immediately, skipping human escalation - After human resolution: escalation_ingest_async() persists outcome - Gated by isAgentMemoryEnabled + memorySpaceId on the escalation resource - Search settings (threshold, searchMode, fieldSettings) read from resource config - Span attributes (fromMemory, savedToMemory) for trace observability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When no fieldSettings are configured in the agent definition, field_weights should be None (search all fields with default weights) rather than raising a validation error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit f6751d3.
e923f4e to
8fb6534
Compare
RunnanJia
approved these changes
May 13, 2026
Escalation memory ingest relies on traceId/spanId to reconstruct the escalation tool input and output from LLMOps. Reading the current span after HITL resume can point at the resumed run context instead of the original escalation child span, which lets ingest return 200 while creating blank memory rows. Consume the span context supplied through tool metadata, fall back to the current span only when metadata is missing, and normalize fallback trace ids through UIPATH_TRACE_ID so the ingest payload uses the same exported LLMOps trace id as span upserts. Treat an unsearchable escalation memory retrieval request as a cache miss rather than raising ValueError. This covers empty input/configured-field mismatches and keeps escalation memory as an optimization instead of blocking task creation.
|
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.


Depends on #793
Summary
_check_escalation_memory_cache) before HITL task creation — cache hit skips human escalation_ingest_escalation_memory) after human resolution to persist for future recallisAgentMemoryEnabled+memorySpaceIdon the escalation resource configfromMemory,savedToMemory) for trace observabilitycompleted_by_useremail for memory ingestuserIdTest plan
tests/agent/tools/test_escalation_memory.py— 7 tests for cache check, ingest, and space ID resolutiontests/agent/tools/test_escalation_tool.py— all 37 tests passtests/agent/tools/test_ixp_escalation_tool.py— all 16 tests pass🤖 Generated with Claude Code