Changelog
Improvements:
- Update workflows arun to return AsyncIterator: The ****
.arun
method of Workflow now returns an async iterator, similar to Agent and Team. Examplein our docs. - New Events on Agent/Team:
PostHookStarted
,PostHookCompleted
for bothAgent
andTeam
eventsSessionSummaryCreationStarted
,SessionSummaryCreationCompleted
for bothAgent
andTeam
eventsRunContentCompleted
for bothAgent
andTeam
→ This signals that the content stream has ended, which is useful for building UIs using the events
- Concurrent Memory Creation: Automatic memory creation is now started on a thread/task at the start of an Agent/Team run, which significantly improves runtime performance where memory generation is enabled.
- Get Run Output on Members: Improved
get_run_output
andget_last_run_output
onAgent
/Team
to allow retrieval of runs from members. Therefore after a team has executed you can get the last run straight from the member agent. - Team Delegation Updates:
- Made various updates to the prompts and tool instructions for team delegation, to improve accuracy of member delegation.
- Removed
expected_output
as a default parameter on thedelegate_task_to_member
tool call forTeam
. This is done to increase flexibility with teams and to avoid incorrect behaviour on the team leader.
- Team History Updates:
- Adds
add_team_history_to_members
to share team-level request/response history with team members. - Improved how
share_member_interactions
work to make sharing interactions during a run more accurate. - Here are the related docs
- Adds
stream_events
flag: Add astream_events
flag to Agent, Team, Workflow and all run methods to emit all events whens streaming a response.- Session State Updating: Added
update_session_state
andaupdate_session_state
functions onAgent
andTeam
to allow direct updating of the session state that is persisted in the DB. - AgentOS Session Endpoints: Added new endpoints:
Bug Fixes:
None
values in Ollama metrics: Fix a problem calculating metrics with Ollama when certain values wereNone
instead of0
.- Only-media inputs: The Memory and Summary features now work with inputs containing only media
- Input media with Teams: Fix a problem with input media being ignored when streaming a Team’s response.
Breaking Changes and Deprecations
Workflow.arun(..., stream=True)
now return anAsyncIterator
, i.e. which meansawait
is not required, but insteadasync for event in workflow.arun(...)
is the correct syntax.- All events besides
RunContent
events (the actual model content chunks) are now behind thestream_events
flag and will only be yielded wherestream_events=True
. Previously tool-call events were yielded regardless. stream_intermediate_steps
has been deprecated in favour ofstream_events
What's Changed
- fix: Use run_input media in Team._arun_stream by @praveen-livspace in #5127
- fix: Handle None values in Ollama metrics calculation by @ron-42 in #5085
- fix: accept inputs containing only media by @kausmeows in #5129
- feat: Add instantiation time to /health by @dirkbrnd in #4992
- fix: Concurrent memories, session summary events, run content completion events by @dirkbrnd in #4998
- chore: workflows arun returns asynciterator by @kausmeows in #5100
- feat: add stream_events param everywhere by @manuhortet in #5092
- fix: Various issues with team history by @dirkbrnd in #5104
- feat: New session endpoints by @dirkbrnd in #5133
- test: add unit test for pandas tool by @nhankiet in #5140
- chore: Release 2.2.0 by @dirkbrnd in #5146
New Contributors
- @praveen-livspace made their first contribution in #5127
- @ron-42 made their first contribution in #5085
- @nhankiet made their first contribution in #5140
Full Changelog: v2.1.10...v2.2.0