agno 2.2.9__py3-none-any.whl → 2.2.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agno/agent/agent.py +14 -4
- agno/os/app.py +15 -15
- agno/team/team.py +7 -2
- agno/workflow/agent.py +2 -2
- agno/workflow/condition.py +26 -4
- agno/workflow/loop.py +9 -0
- agno/workflow/parallel.py +39 -16
- agno/workflow/router.py +25 -4
- agno/workflow/step.py +162 -91
- agno/workflow/steps.py +9 -0
- agno/workflow/workflow.py +26 -22
- {agno-2.2.9.dist-info → agno-2.2.10.dist-info}/METADATA +1 -1
- {agno-2.2.9.dist-info → agno-2.2.10.dist-info}/RECORD +16 -16
- {agno-2.2.9.dist-info → agno-2.2.10.dist-info}/WHEEL +0 -0
- {agno-2.2.9.dist-info → agno-2.2.10.dist-info}/licenses/LICENSE +0 -0
- {agno-2.2.9.dist-info → agno-2.2.10.dist-info}/top_level.txt +0 -0
agno/workflow/steps.py
CHANGED
|
@@ -3,6 +3,7 @@ from typing import Any, AsyncIterator, Awaitable, Callable, Dict, Iterator, List
|
|
|
3
3
|
from uuid import uuid4
|
|
4
4
|
|
|
5
5
|
from agno.run.agent import RunOutputEvent
|
|
6
|
+
from agno.run.base import RunContext
|
|
6
7
|
from agno.run.team import TeamRunOutputEvent
|
|
7
8
|
from agno.run.workflow import (
|
|
8
9
|
StepsExecutionCompletedEvent,
|
|
@@ -118,6 +119,7 @@ class Steps:
|
|
|
118
119
|
session_id: Optional[str] = None,
|
|
119
120
|
user_id: Optional[str] = None,
|
|
120
121
|
workflow_run_response: Optional[WorkflowRunOutput] = None,
|
|
122
|
+
run_context: Optional[RunContext] = None,
|
|
121
123
|
session_state: Optional[Dict[str, Any]] = None,
|
|
122
124
|
store_executor_outputs: bool = True,
|
|
123
125
|
workflow_session: Optional[WorkflowSession] = None,
|
|
@@ -151,6 +153,7 @@ class Steps:
|
|
|
151
153
|
user_id=user_id,
|
|
152
154
|
workflow_run_response=workflow_run_response,
|
|
153
155
|
store_executor_outputs=store_executor_outputs,
|
|
156
|
+
run_context=run_context,
|
|
154
157
|
session_state=session_state,
|
|
155
158
|
workflow_session=workflow_session,
|
|
156
159
|
add_workflow_history_to_steps=add_workflow_history_to_steps,
|
|
@@ -204,6 +207,7 @@ class Steps:
|
|
|
204
207
|
self,
|
|
205
208
|
step_input: StepInput,
|
|
206
209
|
workflow_run_response: WorkflowRunOutput,
|
|
210
|
+
run_context: Optional[RunContext] = None,
|
|
207
211
|
session_state: Optional[Dict[str, Any]] = None,
|
|
208
212
|
session_id: Optional[str] = None,
|
|
209
213
|
user_id: Optional[str] = None,
|
|
@@ -269,6 +273,7 @@ class Steps:
|
|
|
269
273
|
current_step_input,
|
|
270
274
|
session_id=session_id,
|
|
271
275
|
user_id=user_id,
|
|
276
|
+
run_context=run_context,
|
|
272
277
|
session_state=session_state,
|
|
273
278
|
stream_events=stream_events,
|
|
274
279
|
stream_executor_events=stream_executor_events,
|
|
@@ -354,6 +359,7 @@ class Steps:
|
|
|
354
359
|
session_id: Optional[str] = None,
|
|
355
360
|
user_id: Optional[str] = None,
|
|
356
361
|
workflow_run_response: Optional[WorkflowRunOutput] = None,
|
|
362
|
+
run_context: Optional[RunContext] = None,
|
|
357
363
|
session_state: Optional[Dict[str, Any]] = None,
|
|
358
364
|
store_executor_outputs: bool = True,
|
|
359
365
|
workflow_session: Optional[WorkflowSession] = None,
|
|
@@ -387,6 +393,7 @@ class Steps:
|
|
|
387
393
|
user_id=user_id,
|
|
388
394
|
workflow_run_response=workflow_run_response,
|
|
389
395
|
store_executor_outputs=store_executor_outputs,
|
|
396
|
+
run_context=run_context,
|
|
390
397
|
session_state=session_state,
|
|
391
398
|
workflow_session=workflow_session,
|
|
392
399
|
add_workflow_history_to_steps=add_workflow_history_to_steps,
|
|
@@ -439,6 +446,7 @@ class Steps:
|
|
|
439
446
|
self,
|
|
440
447
|
step_input: StepInput,
|
|
441
448
|
workflow_run_response: WorkflowRunOutput,
|
|
449
|
+
run_context: Optional[RunContext] = None,
|
|
442
450
|
session_state: Optional[Dict[str, Any]] = None,
|
|
443
451
|
session_id: Optional[str] = None,
|
|
444
452
|
user_id: Optional[str] = None,
|
|
@@ -504,6 +512,7 @@ class Steps:
|
|
|
504
512
|
current_step_input,
|
|
505
513
|
session_id=session_id,
|
|
506
514
|
user_id=user_id,
|
|
515
|
+
run_context=run_context,
|
|
507
516
|
session_state=session_state,
|
|
508
517
|
stream_events=stream_events,
|
|
509
518
|
stream_executor_events=stream_executor_events,
|
agno/workflow/workflow.py
CHANGED
|
@@ -974,6 +974,7 @@ class Workflow:
|
|
|
974
974
|
websocket_handler: Optional[WebSocketHandler] = None,
|
|
975
975
|
) -> "WorkflowRunOutputEvent":
|
|
976
976
|
"""Handle workflow events for storage - similar to Team._handle_event"""
|
|
977
|
+
from agno.run.base import BaseRunOutputEvent
|
|
977
978
|
from agno.run.agent import RunOutput
|
|
978
979
|
from agno.run.team import TeamRunOutput
|
|
979
980
|
|
|
@@ -993,10 +994,10 @@ class Workflow:
|
|
|
993
994
|
return event
|
|
994
995
|
|
|
995
996
|
# Store the event
|
|
996
|
-
if
|
|
997
|
-
workflow_run_response.events
|
|
998
|
-
|
|
999
|
-
|
|
997
|
+
if isinstance(event, BaseRunOutputEvent):
|
|
998
|
+
if workflow_run_response.events is None:
|
|
999
|
+
workflow_run_response.events = []
|
|
1000
|
+
workflow_run_response.events.append(event)
|
|
1000
1001
|
|
|
1001
1002
|
# Broadcast to WebSocket if available (async context only)
|
|
1002
1003
|
self._broadcast_to_websocket(event, websocket_handler)
|
|
@@ -1283,7 +1284,7 @@ class Workflow:
|
|
|
1283
1284
|
session_id=session.session_id,
|
|
1284
1285
|
user_id=self.user_id,
|
|
1285
1286
|
workflow_run_response=workflow_run_response,
|
|
1286
|
-
|
|
1287
|
+
run_context=run_context,
|
|
1287
1288
|
store_executor_outputs=self.store_executor_outputs,
|
|
1288
1289
|
workflow_session=session,
|
|
1289
1290
|
add_workflow_history_to_steps=self.add_workflow_history_to_steps
|
|
@@ -1468,7 +1469,7 @@ class Workflow:
|
|
|
1468
1469
|
stream_events=stream_events,
|
|
1469
1470
|
stream_executor_events=self.stream_executor_events,
|
|
1470
1471
|
workflow_run_response=workflow_run_response,
|
|
1471
|
-
|
|
1472
|
+
run_context=run_context,
|
|
1472
1473
|
step_index=i,
|
|
1473
1474
|
store_executor_outputs=self.store_executor_outputs,
|
|
1474
1475
|
workflow_session=session,
|
|
@@ -1748,15 +1749,15 @@ class Workflow:
|
|
|
1748
1749
|
user_id: Optional[str],
|
|
1749
1750
|
execution_input: WorkflowExecutionInput,
|
|
1750
1751
|
workflow_run_response: WorkflowRunOutput,
|
|
1751
|
-
|
|
1752
|
+
run_context: RunContext,
|
|
1752
1753
|
**kwargs: Any,
|
|
1753
1754
|
) -> WorkflowRunOutput:
|
|
1754
1755
|
"""Execute a specific pipeline by name asynchronously"""
|
|
1755
1756
|
from inspect import isasyncgenfunction, iscoroutinefunction, isgeneratorfunction
|
|
1756
1757
|
|
|
1757
1758
|
# Read existing session from database
|
|
1758
|
-
workflow_session, session_state = await self._aload_or_create_session(
|
|
1759
|
-
session_id=session_id, user_id=user_id, session_state=session_state
|
|
1759
|
+
workflow_session, run_context.session_state = await self._aload_or_create_session(
|
|
1760
|
+
session_id=session_id, user_id=user_id, session_state=run_context.session_state
|
|
1760
1761
|
)
|
|
1761
1762
|
|
|
1762
1763
|
workflow_run_response.status = RunStatus.running
|
|
@@ -1830,7 +1831,7 @@ class Workflow:
|
|
|
1830
1831
|
session_id=session_id,
|
|
1831
1832
|
user_id=self.user_id,
|
|
1832
1833
|
workflow_run_response=workflow_run_response,
|
|
1833
|
-
|
|
1834
|
+
run_context=run_context,
|
|
1834
1835
|
store_executor_outputs=self.store_executor_outputs,
|
|
1835
1836
|
workflow_session=workflow_session,
|
|
1836
1837
|
add_workflow_history_to_steps=self.add_workflow_history_to_steps
|
|
@@ -1923,7 +1924,7 @@ class Workflow:
|
|
|
1923
1924
|
user_id: Optional[str],
|
|
1924
1925
|
execution_input: WorkflowExecutionInput,
|
|
1925
1926
|
workflow_run_response: WorkflowRunOutput,
|
|
1926
|
-
|
|
1927
|
+
run_context: RunContext,
|
|
1927
1928
|
stream_events: bool = False,
|
|
1928
1929
|
websocket_handler: Optional[WebSocketHandler] = None,
|
|
1929
1930
|
**kwargs: Any,
|
|
@@ -1932,8 +1933,8 @@ class Workflow:
|
|
|
1932
1933
|
from inspect import isasyncgenfunction, iscoroutinefunction, isgeneratorfunction
|
|
1933
1934
|
|
|
1934
1935
|
# Read existing session from database
|
|
1935
|
-
workflow_session, session_state = await self._aload_or_create_session(
|
|
1936
|
-
session_id=session_id, user_id=user_id, session_state=session_state
|
|
1936
|
+
workflow_session, run_context.session_state = await self._aload_or_create_session(
|
|
1937
|
+
session_id=session_id, user_id=user_id, session_state=run_context.session_state
|
|
1937
1938
|
)
|
|
1938
1939
|
|
|
1939
1940
|
workflow_run_response.status = RunStatus.running
|
|
@@ -2028,7 +2029,7 @@ class Workflow:
|
|
|
2028
2029
|
stream_events=stream_events,
|
|
2029
2030
|
stream_executor_events=self.stream_executor_events,
|
|
2030
2031
|
workflow_run_response=workflow_run_response,
|
|
2031
|
-
|
|
2032
|
+
run_context=run_context,
|
|
2032
2033
|
step_index=i,
|
|
2033
2034
|
store_executor_outputs=self.store_executor_outputs,
|
|
2034
2035
|
workflow_session=workflow_session,
|
|
@@ -2330,6 +2331,7 @@ class Workflow:
|
|
|
2330
2331
|
user_id=user_id,
|
|
2331
2332
|
execution_input=inputs,
|
|
2332
2333
|
workflow_run_response=workflow_run_response,
|
|
2334
|
+
run_context=run_context,
|
|
2333
2335
|
session_state=session_state,
|
|
2334
2336
|
**kwargs,
|
|
2335
2337
|
)
|
|
@@ -3382,14 +3384,6 @@ class Workflow:
|
|
|
3382
3384
|
# Update session state from DB
|
|
3383
3385
|
session_state = self._load_session_state(session=workflow_session, session_state=session_state)
|
|
3384
3386
|
|
|
3385
|
-
# Initialize run context
|
|
3386
|
-
run_context = RunContext(
|
|
3387
|
-
run_id=run_id,
|
|
3388
|
-
session_id=session_id,
|
|
3389
|
-
user_id=user_id,
|
|
3390
|
-
session_state=session_state,
|
|
3391
|
-
)
|
|
3392
|
-
|
|
3393
3387
|
log_debug(f"Workflow Run Start: {self.name}", center=True)
|
|
3394
3388
|
|
|
3395
3389
|
# Use simple defaults
|
|
@@ -3422,6 +3416,14 @@ class Workflow:
|
|
|
3422
3416
|
|
|
3423
3417
|
self.update_agents_and_teams_session_info()
|
|
3424
3418
|
|
|
3419
|
+
# Initialize run context
|
|
3420
|
+
run_context = RunContext(
|
|
3421
|
+
run_id=run_id,
|
|
3422
|
+
session_id=session_id,
|
|
3423
|
+
user_id=user_id,
|
|
3424
|
+
session_state=session_state,
|
|
3425
|
+
)
|
|
3426
|
+
|
|
3425
3427
|
# Execute workflow agent if configured
|
|
3426
3428
|
if self.agent is not None:
|
|
3427
3429
|
return self._execute_workflow_agent(
|
|
@@ -3640,6 +3642,7 @@ class Workflow:
|
|
|
3640
3642
|
websocket=websocket,
|
|
3641
3643
|
files=files,
|
|
3642
3644
|
session_state=session_state,
|
|
3645
|
+
run_context=run_context,
|
|
3643
3646
|
**kwargs,
|
|
3644
3647
|
)
|
|
3645
3648
|
else:
|
|
@@ -3651,6 +3654,7 @@ class Workflow:
|
|
|
3651
3654
|
websocket=websocket,
|
|
3652
3655
|
files=files,
|
|
3653
3656
|
session_state=session_state,
|
|
3657
|
+
run_context=run_context,
|
|
3654
3658
|
**kwargs,
|
|
3655
3659
|
)
|
|
3656
3660
|
|
|
@@ -4,7 +4,7 @@ agno/exceptions.py,sha256=7xqLur8sWHugnViIJz4PvPKSHljSiVKNAqaKQOJgZiU,4982
|
|
|
4
4
|
agno/media.py,sha256=eTfYb_pwhX_PCIVPSrW4VYRqmoxKABEF1aZClrVvQ30,16500
|
|
5
5
|
agno/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
agno/agent/__init__.py,sha256=s7S3FgsjZxuaabzi8L5n4aSH8IZAiZ7XaNNcySGR-EQ,1051
|
|
7
|
-
agno/agent/agent.py,sha256=
|
|
7
|
+
agno/agent/agent.py,sha256=34iFduKrOeMa8E_G5KyC3saxZAQJOlf8Tf5PE9iKfgc,458177
|
|
8
8
|
agno/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
agno/api/agent.py,sha256=fKlQ62E_C9Rjd7Zus3Gs3R1RG-IhzFV-ICpkb6SLqYc,932
|
|
10
10
|
agno/api/api.py,sha256=Z7iWbrjheJcGLeeDYrtTCWiKTVqjH0uJI35UNWOtAXw,973
|
|
@@ -258,7 +258,7 @@ agno/models/vllm/vllm.py,sha256=UtiiSvUR4pG_1CzuhY5MWduRgzM2hGVTakKJ6ZBdQmo,2730
|
|
|
258
258
|
agno/models/xai/__init__.py,sha256=ukcCxnCHxTtkJNA2bAMTX4MhCv1wJcbiq8ZIfYczIxs,55
|
|
259
259
|
agno/models/xai/xai.py,sha256=jA6_39tfapkjkHKdzbKaNq1t9qIvO1IaZY1hQqEmFVs,4181
|
|
260
260
|
agno/os/__init__.py,sha256=h8oQu7vhD5RZf09jkyM_Kt1Kdq_d5kFB9gJju8QPwcY,55
|
|
261
|
-
agno/os/app.py,sha256=
|
|
261
|
+
agno/os/app.py,sha256=tP1Jd4vGxDNO10WoXAN4LI25DOQh521ZU-myW4OlWHk,34160
|
|
262
262
|
agno/os/auth.py,sha256=FyBtAKWtg-qSunCas5m5pK1dVEmikOSZvcCp5r25tTA,1844
|
|
263
263
|
agno/os/config.py,sha256=QPGxENF2yezEOp0yV9OXU-FBs4_vYSXkxbbSol51wPE,2932
|
|
264
264
|
agno/os/mcp.py,sha256=7lAiELFmwcF-eN_pOIJVjun9r5dFcQfPTHD_rP1Zu-s,10318
|
|
@@ -329,7 +329,7 @@ agno/session/summary.py,sha256=f0e02PblHEzG1uPvNiLSTbR1DpwchDy4kCin4l2Dt20,10304
|
|
|
329
329
|
agno/session/team.py,sha256=M9QEmGYyQM64ZsvPWRdp1xZV6EQGuun6pjJL05AzU-k,15260
|
|
330
330
|
agno/session/workflow.py,sha256=DnYjubF6rKwDl_HSR3_ieLeX0SyGm6xkn9SCWJ1ldbk,7419
|
|
331
331
|
agno/team/__init__.py,sha256=toHidBOo5M3n_TIVtIKHgcDbLL9HR-_U-YQYuIt_XtE,847
|
|
332
|
-
agno/team/team.py,sha256=
|
|
332
|
+
agno/team/team.py,sha256=krxPtNB9zVMTMIhLrYxLFjxQwrb9QHcSZPzpLnz1Drc,398920
|
|
333
333
|
agno/tools/__init__.py,sha256=jNll2sELhPPbqm5nPeT4_uyzRO2_KRTW-8Or60kioS0,210
|
|
334
334
|
agno/tools/agentql.py,sha256=S82Z9aTNr-E5wnA4fbFs76COljJtiQIjf2grjz3CkHU,4104
|
|
335
335
|
agno/tools/airflow.py,sha256=uf2rOzZpSU64l_qRJ5Raku-R3Gky-uewmYkh6W0-oxg,2610
|
|
@@ -557,17 +557,17 @@ agno/vectordb/weaviate/__init__.py,sha256=FIoFJgqSmGuFgpvmsg8EjAn8FDAhuqAXed7fja
|
|
|
557
557
|
agno/vectordb/weaviate/index.py,sha256=y4XYPRZFksMfrrF85B4hn5AtmXM4SH--4CyLo27EHgM,253
|
|
558
558
|
agno/vectordb/weaviate/weaviate.py,sha256=8KNa5a-RuksE6w9poD4vi_ixUBeoB96PkzCL9DHSs5o,39406
|
|
559
559
|
agno/workflow/__init__.py,sha256=Ze2j811jwnsS8Sjv6u0Ap4l7Pyw_ivRof1uBYNJhb1w,609
|
|
560
|
-
agno/workflow/agent.py,sha256=
|
|
561
|
-
agno/workflow/condition.py,sha256=
|
|
562
|
-
agno/workflow/loop.py,sha256=
|
|
563
|
-
agno/workflow/parallel.py,sha256=
|
|
564
|
-
agno/workflow/router.py,sha256=
|
|
565
|
-
agno/workflow/step.py,sha256=
|
|
566
|
-
agno/workflow/steps.py,sha256=
|
|
560
|
+
agno/workflow/agent.py,sha256=fKLB4kop7YYFeM1e-d3IzvVPsVF5cLNX6Z0gPn81ZR4,12170
|
|
561
|
+
agno/workflow/condition.py,sha256=4VXIpBH9-G9W0w10Sn4qn32gg9kap4uKVEF6dxIxGrg,32909
|
|
562
|
+
agno/workflow/loop.py,sha256=T38rX3wQeCMW7twIHjPKfhE_ONlsa6p3tKl0xgR7zwo,32956
|
|
563
|
+
agno/workflow/parallel.py,sha256=_kDg15O65RLgmEwAsE15ckwALgmHdreQ2TSt5yiOBio,36684
|
|
564
|
+
agno/workflow/router.py,sha256=1ez59iVrkV0g56WKdo26EDS2yeQFnC8aEA8KbzmBJV0,30986
|
|
565
|
+
agno/workflow/step.py,sha256=71cEzjLF9UDBDzq2kvl5xb0_0DVCr2CtwYoDGH-KbLw,65086
|
|
566
|
+
agno/workflow/steps.py,sha256=jMGnCUNTwU8bUj8Uf3xNrwPWrKWqx4TfJSzGZCKiVWY,26088
|
|
567
567
|
agno/workflow/types.py,sha256=J474F5MWHCHHVjrzTUPJihlcrRLUnQ3hVW2-9TWdxWw,18519
|
|
568
|
-
agno/workflow/workflow.py,sha256=
|
|
569
|
-
agno-2.2.
|
|
570
|
-
agno-2.2.
|
|
571
|
-
agno-2.2.
|
|
572
|
-
agno-2.2.
|
|
573
|
-
agno-2.2.
|
|
568
|
+
agno/workflow/workflow.py,sha256=ff_2pFVZNTvN83LdSY1SvUDGVl4jGKjJFTmdCJ6NibQ,186012
|
|
569
|
+
agno-2.2.10.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
570
|
+
agno-2.2.10.dist-info/METADATA,sha256=ttcbIjnIJWxUqYmEJwCot9BU6IbblgtbWlwJ4YUISVo,28549
|
|
571
|
+
agno-2.2.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
572
|
+
agno-2.2.10.dist-info/top_level.txt,sha256=MKyeuVesTyOKIXUhc-d_tPa2Hrh0oTA4LM0izowpx70,5
|
|
573
|
+
agno-2.2.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|