agno 2.1.9__py3-none-any.whl → 2.2.0__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 +2048 -1204
- agno/culture/__init__.py +3 -0
- agno/culture/manager.py +954 -0
- agno/db/async_postgres/async_postgres.py +232 -0
- agno/db/async_postgres/schemas.py +15 -0
- agno/db/async_postgres/utils.py +58 -0
- agno/db/base.py +83 -6
- agno/db/dynamo/dynamo.py +162 -0
- agno/db/dynamo/schemas.py +44 -0
- agno/db/dynamo/utils.py +59 -0
- agno/db/firestore/firestore.py +231 -0
- agno/db/firestore/schemas.py +10 -0
- agno/db/firestore/utils.py +96 -0
- agno/db/gcs_json/gcs_json_db.py +190 -0
- agno/db/gcs_json/utils.py +58 -0
- agno/db/in_memory/in_memory_db.py +118 -0
- agno/db/in_memory/utils.py +58 -0
- agno/db/json/json_db.py +129 -0
- agno/db/json/utils.py +58 -0
- agno/db/mongo/mongo.py +222 -0
- agno/db/mongo/schemas.py +10 -0
- agno/db/mongo/utils.py +59 -0
- agno/db/mysql/mysql.py +232 -1
- agno/db/mysql/schemas.py +14 -0
- agno/db/mysql/utils.py +58 -0
- agno/db/postgres/postgres.py +242 -0
- agno/db/postgres/schemas.py +15 -0
- agno/db/postgres/utils.py +58 -0
- agno/db/redis/redis.py +181 -0
- agno/db/redis/schemas.py +14 -0
- agno/db/redis/utils.py +58 -0
- agno/db/schemas/__init__.py +2 -1
- agno/db/schemas/culture.py +120 -0
- agno/db/singlestore/schemas.py +14 -0
- agno/db/singlestore/singlestore.py +231 -0
- agno/db/singlestore/utils.py +58 -0
- agno/db/sqlite/schemas.py +14 -0
- agno/db/sqlite/sqlite.py +274 -7
- agno/db/sqlite/utils.py +62 -0
- agno/db/surrealdb/models.py +51 -1
- agno/db/surrealdb/surrealdb.py +154 -0
- agno/db/surrealdb/utils.py +61 -1
- agno/knowledge/reader/field_labeled_csv_reader.py +0 -2
- agno/memory/manager.py +28 -11
- agno/models/anthropic/claude.py +2 -2
- agno/models/message.py +0 -1
- agno/models/ollama/chat.py +7 -2
- agno/os/app.py +29 -7
- agno/os/interfaces/a2a/router.py +2 -2
- agno/os/interfaces/agui/router.py +2 -2
- agno/os/router.py +7 -7
- agno/os/routers/evals/schemas.py +31 -31
- agno/os/routers/health.py +6 -2
- agno/os/routers/knowledge/schemas.py +49 -47
- agno/os/routers/memory/schemas.py +16 -16
- agno/os/routers/metrics/schemas.py +16 -16
- agno/os/routers/session/session.py +382 -7
- agno/os/schema.py +254 -231
- agno/os/utils.py +1 -1
- agno/run/agent.py +49 -1
- agno/run/team.py +43 -0
- agno/session/summary.py +45 -13
- agno/session/team.py +90 -5
- agno/team/team.py +1118 -857
- agno/tools/gmail.py +59 -14
- agno/utils/agent.py +372 -0
- agno/utils/events.py +144 -2
- agno/utils/print_response/agent.py +10 -6
- agno/utils/print_response/team.py +6 -4
- agno/utils/print_response/workflow.py +7 -5
- agno/utils/team.py +9 -8
- agno/workflow/condition.py +17 -9
- agno/workflow/loop.py +18 -10
- agno/workflow/parallel.py +14 -6
- agno/workflow/router.py +17 -9
- agno/workflow/step.py +14 -6
- agno/workflow/steps.py +14 -6
- agno/workflow/workflow.py +245 -122
- {agno-2.1.9.dist-info → agno-2.2.0.dist-info}/METADATA +60 -23
- {agno-2.1.9.dist-info → agno-2.2.0.dist-info}/RECORD +83 -79
- {agno-2.1.9.dist-info → agno-2.2.0.dist-info}/WHEEL +0 -0
- {agno-2.1.9.dist-info → agno-2.2.0.dist-info}/licenses/LICENSE +0 -0
- {agno-2.1.9.dist-info → agno-2.2.0.dist-info}/top_level.txt +0 -0
agno/workflow/step.py
CHANGED
|
@@ -404,6 +404,7 @@ class Step:
|
|
|
404
404
|
step_input: StepInput,
|
|
405
405
|
session_id: Optional[str] = None,
|
|
406
406
|
user_id: Optional[str] = None,
|
|
407
|
+
stream_events: bool = False,
|
|
407
408
|
stream_intermediate_steps: bool = False,
|
|
408
409
|
stream_executor_events: bool = True,
|
|
409
410
|
workflow_run_response: Optional["WorkflowRunOutput"] = None,
|
|
@@ -425,8 +426,11 @@ class Step:
|
|
|
425
426
|
# Create session_state copy once to avoid duplication
|
|
426
427
|
session_state_copy = copy(session_state) if session_state is not None else {}
|
|
427
428
|
|
|
429
|
+
# Considering both stream_events and stream_intermediate_steps (deprecated)
|
|
430
|
+
stream_events = stream_events or stream_intermediate_steps
|
|
431
|
+
|
|
428
432
|
# Emit StepStartedEvent
|
|
429
|
-
if
|
|
433
|
+
if stream_events and workflow_run_response:
|
|
430
434
|
yield StepStartedEvent(
|
|
431
435
|
run_id=workflow_run_response.run_id or "",
|
|
432
436
|
workflow_name=workflow_run_response.workflow_name or "",
|
|
@@ -548,7 +552,7 @@ class Step:
|
|
|
548
552
|
user_id=user_id,
|
|
549
553
|
session_state=session_state_copy, # Send a copy to the executor
|
|
550
554
|
stream=True,
|
|
551
|
-
|
|
555
|
+
stream_events=stream_events,
|
|
552
556
|
yield_run_response=True,
|
|
553
557
|
**kwargs,
|
|
554
558
|
)
|
|
@@ -588,7 +592,7 @@ class Step:
|
|
|
588
592
|
yield final_response
|
|
589
593
|
|
|
590
594
|
# Emit StepCompletedEvent
|
|
591
|
-
if
|
|
595
|
+
if stream_events and workflow_run_response:
|
|
592
596
|
yield StepCompletedEvent(
|
|
593
597
|
run_id=workflow_run_response.run_id or "",
|
|
594
598
|
workflow_name=workflow_run_response.workflow_name or "",
|
|
@@ -809,6 +813,7 @@ class Step:
|
|
|
809
813
|
step_input: StepInput,
|
|
810
814
|
session_id: Optional[str] = None,
|
|
811
815
|
user_id: Optional[str] = None,
|
|
816
|
+
stream_events: bool = False,
|
|
812
817
|
stream_intermediate_steps: bool = False,
|
|
813
818
|
stream_executor_events: bool = True,
|
|
814
819
|
workflow_run_response: Optional["WorkflowRunOutput"] = None,
|
|
@@ -831,7 +836,10 @@ class Step:
|
|
|
831
836
|
# Create session_state copy once to avoid duplication
|
|
832
837
|
session_state_copy = copy(session_state) if session_state is not None else {}
|
|
833
838
|
|
|
834
|
-
|
|
839
|
+
# Considering both stream_events and stream_intermediate_steps (deprecated)
|
|
840
|
+
stream_events = stream_events or stream_intermediate_steps
|
|
841
|
+
|
|
842
|
+
if stream_events and workflow_run_response:
|
|
835
843
|
# Emit StepStartedEvent
|
|
836
844
|
yield StepStartedEvent(
|
|
837
845
|
run_id=workflow_run_response.run_id or "",
|
|
@@ -978,7 +986,7 @@ class Step:
|
|
|
978
986
|
user_id=user_id,
|
|
979
987
|
session_state=session_state_copy,
|
|
980
988
|
stream=True,
|
|
981
|
-
|
|
989
|
+
stream_events=stream_events,
|
|
982
990
|
yield_run_response=True,
|
|
983
991
|
**kwargs,
|
|
984
992
|
)
|
|
@@ -1015,7 +1023,7 @@ class Step:
|
|
|
1015
1023
|
final_response = self._process_step_output(final_response)
|
|
1016
1024
|
yield final_response
|
|
1017
1025
|
|
|
1018
|
-
if
|
|
1026
|
+
if stream_events and workflow_run_response:
|
|
1019
1027
|
# Emit StepCompletedEvent
|
|
1020
1028
|
yield StepCompletedEvent(
|
|
1021
1029
|
run_id=workflow_run_response.run_id or "",
|
agno/workflow/steps.py
CHANGED
|
@@ -207,6 +207,7 @@ class Steps:
|
|
|
207
207
|
session_state: Optional[Dict[str, Any]] = None,
|
|
208
208
|
session_id: Optional[str] = None,
|
|
209
209
|
user_id: Optional[str] = None,
|
|
210
|
+
stream_events: bool = False,
|
|
210
211
|
stream_intermediate_steps: bool = False,
|
|
211
212
|
stream_executor_events: bool = True,
|
|
212
213
|
step_index: Optional[Union[int, tuple]] = None,
|
|
@@ -223,7 +224,10 @@ class Steps:
|
|
|
223
224
|
|
|
224
225
|
self._prepare_steps()
|
|
225
226
|
|
|
226
|
-
|
|
227
|
+
# Considering both stream_events and stream_intermediate_steps (deprecated)
|
|
228
|
+
stream_events = stream_events or stream_intermediate_steps
|
|
229
|
+
|
|
230
|
+
if stream_events:
|
|
227
231
|
# Yield steps execution started event
|
|
228
232
|
yield StepsExecutionStartedEvent(
|
|
229
233
|
run_id=workflow_run_response.run_id or "",
|
|
@@ -266,7 +270,7 @@ class Steps:
|
|
|
266
270
|
session_id=session_id,
|
|
267
271
|
user_id=user_id,
|
|
268
272
|
session_state=session_state,
|
|
269
|
-
|
|
273
|
+
stream_events=stream_events,
|
|
270
274
|
stream_executor_events=stream_executor_events,
|
|
271
275
|
workflow_run_response=workflow_run_response,
|
|
272
276
|
step_index=child_step_index,
|
|
@@ -309,7 +313,7 @@ class Steps:
|
|
|
309
313
|
|
|
310
314
|
log_debug(f"Steps End: {self.name} ({len(all_results)} results)", center=True, symbol="-")
|
|
311
315
|
|
|
312
|
-
if
|
|
316
|
+
if stream_events:
|
|
313
317
|
# Yield steps execution completed event
|
|
314
318
|
yield StepsExecutionCompletedEvent(
|
|
315
319
|
run_id=workflow_run_response.run_id or "",
|
|
@@ -438,6 +442,7 @@ class Steps:
|
|
|
438
442
|
session_state: Optional[Dict[str, Any]] = None,
|
|
439
443
|
session_id: Optional[str] = None,
|
|
440
444
|
user_id: Optional[str] = None,
|
|
445
|
+
stream_events: bool = False,
|
|
441
446
|
stream_intermediate_steps: bool = False,
|
|
442
447
|
stream_executor_events: bool = True,
|
|
443
448
|
step_index: Optional[Union[int, tuple]] = None,
|
|
@@ -454,7 +459,10 @@ class Steps:
|
|
|
454
459
|
|
|
455
460
|
self._prepare_steps()
|
|
456
461
|
|
|
457
|
-
|
|
462
|
+
# Considering both stream_events and stream_intermediate_steps (deprecated)
|
|
463
|
+
stream_events = stream_events or stream_intermediate_steps
|
|
464
|
+
|
|
465
|
+
if stream_events:
|
|
458
466
|
# Yield steps execution started event
|
|
459
467
|
yield StepsExecutionStartedEvent(
|
|
460
468
|
run_id=workflow_run_response.run_id or "",
|
|
@@ -497,7 +505,7 @@ class Steps:
|
|
|
497
505
|
session_id=session_id,
|
|
498
506
|
user_id=user_id,
|
|
499
507
|
session_state=session_state,
|
|
500
|
-
|
|
508
|
+
stream_events=stream_events,
|
|
501
509
|
stream_executor_events=stream_executor_events,
|
|
502
510
|
workflow_run_response=workflow_run_response,
|
|
503
511
|
step_index=child_step_index,
|
|
@@ -540,7 +548,7 @@ class Steps:
|
|
|
540
548
|
|
|
541
549
|
log_debug(f"Steps End: {self.name} ({len(all_results)} results)", center=True, symbol="-")
|
|
542
550
|
# Yield steps execution completed event
|
|
543
|
-
if
|
|
551
|
+
if stream_events:
|
|
544
552
|
yield StepsExecutionCompletedEvent(
|
|
545
553
|
run_id=workflow_run_response.run_id or "",
|
|
546
554
|
workflow_name=workflow_run_response.workflow_name or "",
|