Skip to content

feat: allow skipping serialization of certain keys in State.to_dict - #12334

Merged
anakin87 merged 2 commits into
mainfrom
state-todict-skipkeys
Aug 14, 2026
Merged

anakin87 merged 2 commits into
mainfrom
state-todict-skipkeys

Conversation

@anakin87

@anakin87 anakin87 commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

Related Issues

Proposed Changes:

  • add skip_keys parameter to State.to_dict to allow skipping serialization of keys

How did you test it?

CI, new test

Notes for the reviewer

I verified that it achieves the same effect as the _without_live_agent_resources utility function in deepset-ai/hayhooks#253

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@vercel

vercel Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Preview Aug 13, 2026 10:29am

Request Review

@github-actions github-actions Bot added topic:tests type:documentation Improvements on the docs labels Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/components/agents/state
  state.py
Project Total  

This report was generated by python-coverage-comment-action

@anakin87
anakin87 marked this pull request as ready for review August 13, 2026 10:33
@anakin87
anakin87 requested a review from a team as a code owner August 13, 2026 10:33
@anakin87
anakin87 requested review from bogdankostic and sjrl and removed request for a team and bogdankostic August 13, 2026 10:33

@sjrl sjrl 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.

Looks good to me!

@mpangrazzi could you double check that this would be useful for you in deepset-ai/hayhooks#253?

@anakin87
anakin87 requested a review from mpangrazzi August 13, 2026 13:33

@mpangrazzi mpangrazzi 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.

Looks good! Thanks!

@anakin87
anakin87 merged commit 275c21e into main Aug 14, 2026
28 checks passed
@anakin87
anakin87 deleted the state-todict-skipkeys branch August 14, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:tests type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants