* feat: select tools at runtime
* pass tools to ToolInvoker too for consistency
* refactoring
* add reno
* apply feedback and add tools to run_async
* add tests
* fix mypy
* chore: enable tool selection when running from snapshot as well
* fix pylint
* apply feedback
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update releasenotes/notes/add-tools-to-agent-run-params-3aa9c75ee548c38d.yaml
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* add raises
* add more tests
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* chore(lint): enforce and apply PEP 585 type hinting
* Run fmt fixes
* Fix all typing imports using some regex
* Fix all typing written in string in tests
* undo changes in the e2e tests
* make e2e test use list instead of List
* type fixes
* remove type:ignore
* pylint
* Remove typing from Usage example comments
* Remove typing from most of comments
* try to fix e2e tests on comm PRs
* fix
* Add tests typing.List in to adjust test compatiplity
- test/components/agents/test_state_class.py
- test/components/converters/test_output_adapter.py
- test/components/joiners/test_list_joiner.py
* simplify pyproject
* improve relnote
---------
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
* wip: fixing tests
* wip: fixing tests
* wip: fixing tests
* wip: fixing tests
* fixing circular imports
* decoupling resume and initial run() for agent
* adding release notes
* re-raising BreakPointException from pipeline.run()
* fixing imports
* refactor: Refactor suggestions for Pipeline breakpoints (#9614)
* Refactoring
* Start adding debug_path into Breakpoint class
* Fully move debug_path into Breakpoint dataclass
* Simplifications in pipeline run logic
* More simplification
* lint
* More simplification
* Updates
* Rename resume_state to pipeline_snapshot
* PR comments
* Missed renaming of state in a few more places
* feat: Add dataclasses to represent a `PipelineSnapshot` and refactored to use it (#9619)
* Refactor to use dataclasses for PipelineSnapshot and AgentSnapshot
* Fix integration tests
* Mypy
* Fix mypy
* Fix lint
* Refactor AgentSnapshot to only contain needed info
* Fix mypy
* More refactoring
* removing unused import
---------
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* feat: saving include_outputs_from intermediate results to `PipelineState` object (#9629)
* saving intermediate components results in include_outputs_from into the PipelineSnaptshot
* cleaning up
* fixing tests
* fixing tests
* extending tests
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* linting
* moving intermediate results to pipeline state and adding pipeline outputs to state
* moving ordered_component_names and include_outputs_from to PipelineSnapshot
* moving original_input_data to PipelineSnapshot
* simplifying saving the intermediate results
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* linting
* cleaning up
* avoiding creating PipelineSnapshot for every component run
* removing unecessary code
* Update checks in Agent to not unecessarily create AgentSnapshot when not needed.
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* cleaning up tests
* linting
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
* Fix types in test_run.py
* Get test_run.py to pass fmt-check
* Add test_run to mypy checks
* Update test folder to pass ruff linting
* Fix merge
* Fix HF tests
* Fix hf test
* Try to fix tests
* Another attempt
* minor fix
* fix SentenceTransformersDiversityRanker
* skip integrations tests due to model unavailable on HF inference
---------
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
* Add serialization to State
* Add release notes
* Deprecate State in dataclasses
* Fix tests
* Remove state_utils test
* Fix linting
* Fix formating
* Update tests and remove old state utils
* Update agents test
* Update deserilaization per review
* Linting
* Add tests for edge case (custom class types)
* Fix type serialization
* PR comments
* Move State to agents
* Fix tests
* Update utils init
* Improve seriliaztion/deser
* Update the release notes
* Minor fix in docstrings
* PR comments
* Add deprecation warnign for state utils
* Recreate the serialization methods to use schema
* Update key names
* Make serialization methods private
* fix: use coerce_tag_value in LoggingTracer to serialize tag values
* add rn
* fix tests
---------
Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
* Agent tracing
* Small changes
* Some changes and refactoring
* Refactoring to reuse code
* Fix
* Add reno
* Fix tests
* Fix tests
* Fix linting
* Refactor and add tracing support to run_async of Agent
* Reduce duplicate code
* Remove finalize_run
* Use break instead of copying code three times
* Adding a test
* Add tracing unit tests
* Make async tracing test actually run async
* Increase test coverage
* Unit test for traces in pipeline
* Add cleanup
* Fix proper indentation
* PR comments
* PR comments and new test
* Update warning message
* Update warning message
---------
Co-authored-by: Vladimir Blagojevic <dovlex@gmail.com>
* Update agent to properly check all llm messages instead of just first one
* reno
* fix release note
* PR comments
* Fix unit test
* PR comments
* Updated warning message
* Update messages to be stored in State so users can control how they are stored through a handler in the schema
* Fix test
* Add test
* Add reno
* Fix docstring