18 Commits

Author SHA1 Message Date
David S. Batista
c82a3377f2
chore: cleaning up tests (#9443) 2025-05-26 15:12:19 +02:00
Amna Mubashar
720cc19d7d
feat: add serialization to State / move State to agents.state (#9345)
* 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
2025-05-23 11:04:15 +02:00
Sebastian Husch Lee
707573d967
feat: Streamline using Agent as a ComponentTool (#9388)
* Make agent as a tool more streamlined

* Add reno

* fix mypy
2025-05-16 13:11:43 +02:00
Amna Mubashar
64f384b52d
feat: enable streaming ToolCall/Result from Agent (#9290)
* Testing solutions for streaming

* Remove unused methods

* Add fixes

* Update docstrings

* add release notes and test

* PR comments

* add a new util function

* Adjust emit_tool_info

* PR comments

* Remove emit function, add streaming for tool_call


---------

Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
2025-05-05 16:23:44 +02:00
Mohammed Abdul Razak Wahab
ddd7318ae8
fix: use coerce_tag_value in LoggingTracer to serialize tag values (#9251)
* 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>
2025-04-22 16:18:24 +02:00
Sebastian Husch Lee
d5ae46bc93
feat: Add Toolset to Agent (#9284)
* Add Toolset to Agent

* Add reno
2025-04-22 14:08:34 +02:00
Sebastian Husch Lee
114b4568ba
Fix state_schema serialization for agent tracing (#9278) 2025-04-22 09:39:41 +02:00
Amna Mubashar
498637788a
feat: Allow OpenAI client config in OpenAIChatGenerator and AzureOpenAIChatGenerator (#9215)
* Allow OpenAI client config in chat generator

* Add init_http_client as a util method

* Update azure chat gen

* Fix linting
2025-04-16 18:32:13 +02:00
Sebastian Husch Lee
f46bf14851
fix: Allow Agent to run with no tools (#9230)
* Fix

* Add reno

* Add test

* Update docstring and warning message

* Update docstring
2025-04-16 07:53:21 +02:00
Sebastian Husch Lee
185e1c79c9
feat: Agent tracing (#9240)
* 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>
2025-04-15 15:58:26 +02:00
Julian Risch
13780cfcc4
feat: Add run_async to Agent (#9239)
* add run_async

* refactor with _check_exit_conditions

* add run_async tests

* reno

* fix linting issues
2025-04-14 19:01:59 +00:00
Sebastian Husch Lee
7bb9c6934b
fix: Set messages in state_schema at init time of Agent (#9195)
* Fix issue and set messages in state_schema at init time

* Add reno

* Small changes and add more tests for state

* Add comment

* PR comments
2025-04-10 06:39:17 +00:00
Sebastian Husch Lee
fce80715e0
feat: Update agent exit condition check (#9151)
* 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
2025-04-01 14:51:53 +02:00
Sebastian Husch Lee
bde2d77df0
feat: Move storing of messages into State in Agent (#9150)
* 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
2025-04-01 11:29:44 +02:00
Stefano Fiorucci
b12af1e6a9
chore: use deserialize_chatgenerator_inplace utility function in Agent (#9149) 2025-03-31 16:00:59 +00:00
Julian Risch
fc33382b48
feat: Agent checks that its chat_generator supports tools (#9144)
* check that chat_generator run accepts tools

* reno
2025-03-31 14:47:38 +02:00
Julian Risch
c8918e43ba
feat: support multiple exit conditions in Agent and rename init param (#9132)
* rename to exit_conditions and accept list of str

* reno

* Update haystack/components/agents/agent.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-03-31 09:02:25 +00:00
Julian Risch
e483ec6f56
feat: integrate Agent from haystack-experimental (#9112)
* add Agent

* add Agent

* update imports

* add state tests

* reno

* remove State, its utils, and tests

* add pydoc yml for agents

* fix module path in serialization test

* fix mypy error and use ChatGenerator protocol

* remove unused import

* address review feedback

* remove unused _load_component
2025-03-28 14:23:39 +01:00