Skip to content

fix: type memory recall graph state (#806)#1002

Open
radu-mocanu wants to merge 1 commit into
mainfrom
fix/issue-806-type-memory-state
Open

fix: type memory recall graph state (#806)#1002
radu-mocanu wants to merge 1 commit into
mainfrom
fix/issue-806-type-memory-state

Conversation

@radu-mocanu

Copy link
Copy Markdown
Collaborator

Summary

  • type memory recall against the graph's Pydantic state
  • keep dynamically extended input schemas compatible with memory recall

Why

Fixes #806

this lets static checks catch invalid state usage while preserving dynamic input fields.

Validation

  • uv run --no-sync pytest tests/agent/react/test_memory_node.py
  • uv run --no-sync mypy --config-file pyproject.toml .
  • uv run --no-sync ruff check .
  • uv run --no-sync ruff format --check .
  • uv run --no-sync python scripts/lint_httpx_client.py

Copilot AI review requested due to automatic review settings July 22, 2026 07:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves type-safety around episodic memory recall in the ReAct agent graph by typing the memory recall node against the graph’s Pydantic state, while preserving compatibility with dynamically-extended input schemas (per #806).

Changes:

  • Type memory_recall_node’s state parameter as AgentGraphState instead of Any.
  • Update the memory node tests to construct a merged Pydantic graph state via create_state_with_input(...).
  • Bump package version to 0.14.15 (and reflect it in uv.lock).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/uipath_langchain/agent/react/memory_node.py Types the memory recall node state parameter as AgentGraphState to enable static checking.
tests/agent/react/test_memory_node.py Updates test state construction to use the combined Pydantic graph state model.
pyproject.toml Bumps project version to 0.14.15.
uv.lock Updates locked metadata to match the new project version.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type the state parameter in memory_node.py

2 participants