Skip to content

feat(eval): add agent memory settings to eval sets and CLI override#1801

Open
mjnovice wants to merge 3 commits into
mainfrom
feat/eval-agent-memory-settings
Open

feat(eval): add agent memory settings to eval sets and CLI override#1801
mjnovice wants to merge 3 commits into
mainfrom
feat/eval-agent-memory-settings

Conversation

@mjnovice

@mjnovice mjnovice commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Ports eval-run agent memory support from the old world (UiPath/Agents #3560 eval-set schema + #3603 backend override) to the eval-set models and uipath eval CLI.

Schema (eval/models/evaluation_set.py):

  • New EvaluationSetAgentMemorySettings model — id, resultCount, searchMode, threshold as strings, with "same-as-agent" defaults preserving the agent's own memory configuration.
  • agentMemoryEnabled (default false) and agentMemorySettings (default []) on both EvaluationSet and LegacyEvaluationSet; the legacy→v1.0 migration in eval/helpers.py carries them through. Defaults keep existing eval sets fully backwards compatible.

CLI (_cli/cli_eval.py):

  • New --agent-memory-settings-id option (default "default" picks the first configured setting).
  • _resolve_agent_memory_settings_override resolves the eval set's memory config into an override dict passed to runtime_factory.new_runtime(..., agent_memory_settings=...), alongside the existing settings (model override) kwarg.

Semantics match the old-world backend: eval runs never consume agent memory unless the eval set explicitly enables it — agentMemoryEnabled: false (the default) sends {"enabled": false}, which the agents runtime factory uses to strip memorySpace features for the run. Factories that don't understand the kwarg ignore it (same contract as the existing model-settings override), so coded agents are unaffected.

Companion PRs: UiPath/uipath-agents-python#605 (applies the override; bumps its uipath dependency to this release) and UiPath/Agents#5758 (backend forwards the selected settings id to serverless eval jobs). Merge sequence: this PR first (releases 2.13.7) → #605 → Agents#5758.

Testing

  • New tests in packages/uipath/tests/cli/eval/test_agent_memory_settings.py: schema parsing, backwards-compatible defaults, camelCase serialization, legacy migration passthrough, and all resolver branches (disabled, default id, explicit id, unknown id fallback, enabled-without-settings).
  • Full tests/cli/eval + tests/evaluators suites: 931 passed.
  • ruff format, ruff check, mypy clean on changed files.

🤖 Generated with Claude Code

Port of the old-world eval memory support (UiPath/Agents #3560/#3603) to
the eval-set schema and CLI:

- EvaluationSetAgentMemorySettings model plus agentMemoryEnabled /
  agentMemorySettings fields on EvaluationSet and LegacyEvaluationSet,
  carried through the legacy eval-set migration.
- New --agent-memory-settings-id option on `uipath eval`; the resolved
  override is passed to the runtime factory via the agent_memory_settings
  kwarg. Eval runs disable agent memory unless the eval set explicitly
  enables it, matching the Agents backend behavior for eval runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 7, 2026 20:17
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jul 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds evaluation-set support for agent memory configuration and wires it through the uipath eval CLI so eval runs can explicitly disable/enable agent memory and optionally select a specific memory settings profile.

Changes:

  • Extend eval-set schema models with agentMemoryEnabled and agentMemorySettings (plus a dedicated EvaluationSetAgentMemorySettings model).
  • Preserve these fields during legacy eval-set migration.
  • Add --agent-memory-settings-id to uipath eval and pass a resolved agent_memory_settings override into runtime_factory.new_runtime(...), with new unit tests covering parsing/migration/override resolution.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/uipath/src/uipath/eval/models/evaluation_set.py Adds agent-memory settings models/fields to EvaluationSet + LegacyEvaluationSet.
packages/uipath/src/uipath/eval/helpers.py Carries agent-memory fields through legacy→v1.0 eval-set migration.
packages/uipath/src/uipath/_cli/cli_eval.py Adds CLI option and resolves/passes agent-memory override into runtime creation.
packages/uipath/tests/cli/eval/test_agent_memory_settings.py New tests for schema defaults/serialization, migration passthrough, and override resolver behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +159 to +168
logger.info(
f"Applying agent memory settings override: searchMode={target.search_mode}, "
f"resultCount={target.result_count}, threshold={target.threshold}"
)
return {
"enabled": True,
"resultCount": target.result_count,
"searchMode": target.search_mode,
"threshold": target.threshold,
}
mjnovice and others added 2 commits July 7, 2026 15:27
The eval-set editor persists a "default" entry (all same-as-agent)
alongside user-defined settings, so resolve it by id like any other
before falling back to the first configured entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

settings_override = _resolve_model_settings_override(
model_settings_id, eval_context.evaluation_set
)
agent_memory_settings_override = (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as in other PRs

@smflorentino smflorentino self-requested a review July 7, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants