agno 2.3.3__py3-none-any.whl → 2.3.5__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.
Files changed (108) hide show
  1. agno/agent/agent.py +177 -41
  2. agno/culture/manager.py +2 -2
  3. agno/db/base.py +330 -8
  4. agno/db/dynamo/dynamo.py +722 -2
  5. agno/db/dynamo/schemas.py +127 -0
  6. agno/db/firestore/firestore.py +573 -1
  7. agno/db/firestore/schemas.py +40 -0
  8. agno/db/gcs_json/gcs_json_db.py +446 -1
  9. agno/db/in_memory/in_memory_db.py +143 -1
  10. agno/db/json/json_db.py +438 -1
  11. agno/db/mongo/async_mongo.py +522 -0
  12. agno/db/mongo/mongo.py +523 -1
  13. agno/db/mongo/schemas.py +29 -0
  14. agno/db/mysql/mysql.py +536 -3
  15. agno/db/mysql/schemas.py +38 -0
  16. agno/db/postgres/async_postgres.py +546 -14
  17. agno/db/postgres/postgres.py +535 -2
  18. agno/db/postgres/schemas.py +38 -0
  19. agno/db/redis/redis.py +468 -1
  20. agno/db/redis/schemas.py +32 -0
  21. agno/db/singlestore/schemas.py +38 -0
  22. agno/db/singlestore/singlestore.py +523 -1
  23. agno/db/sqlite/async_sqlite.py +548 -9
  24. agno/db/sqlite/schemas.py +38 -0
  25. agno/db/sqlite/sqlite.py +537 -5
  26. agno/db/sqlite/utils.py +6 -8
  27. agno/db/surrealdb/models.py +25 -0
  28. agno/db/surrealdb/surrealdb.py +548 -1
  29. agno/eval/accuracy.py +10 -4
  30. agno/eval/performance.py +10 -4
  31. agno/eval/reliability.py +22 -13
  32. agno/exceptions.py +11 -0
  33. agno/hooks/__init__.py +3 -0
  34. agno/hooks/decorator.py +164 -0
  35. agno/knowledge/chunking/semantic.py +2 -2
  36. agno/models/aimlapi/aimlapi.py +17 -0
  37. agno/models/anthropic/claude.py +19 -12
  38. agno/models/aws/bedrock.py +3 -4
  39. agno/models/aws/claude.py +5 -1
  40. agno/models/azure/ai_foundry.py +2 -2
  41. agno/models/azure/openai_chat.py +8 -0
  42. agno/models/cerebras/cerebras.py +61 -4
  43. agno/models/cerebras/cerebras_openai.py +17 -0
  44. agno/models/cohere/chat.py +5 -1
  45. agno/models/cometapi/cometapi.py +18 -1
  46. agno/models/dashscope/dashscope.py +2 -3
  47. agno/models/deepinfra/deepinfra.py +18 -1
  48. agno/models/deepseek/deepseek.py +2 -3
  49. agno/models/fireworks/fireworks.py +18 -1
  50. agno/models/google/gemini.py +8 -2
  51. agno/models/groq/groq.py +5 -2
  52. agno/models/internlm/internlm.py +18 -1
  53. agno/models/langdb/langdb.py +13 -1
  54. agno/models/litellm/chat.py +2 -2
  55. agno/models/litellm/litellm_openai.py +18 -1
  56. agno/models/meta/llama_openai.py +19 -2
  57. agno/models/nebius/nebius.py +2 -3
  58. agno/models/nvidia/nvidia.py +20 -3
  59. agno/models/openai/chat.py +17 -2
  60. agno/models/openai/responses.py +17 -2
  61. agno/models/openrouter/openrouter.py +21 -2
  62. agno/models/perplexity/perplexity.py +17 -1
  63. agno/models/portkey/portkey.py +7 -6
  64. agno/models/requesty/requesty.py +19 -2
  65. agno/models/response.py +2 -1
  66. agno/models/sambanova/sambanova.py +20 -3
  67. agno/models/siliconflow/siliconflow.py +19 -2
  68. agno/models/together/together.py +20 -3
  69. agno/models/vercel/v0.py +20 -3
  70. agno/models/vllm/vllm.py +19 -14
  71. agno/models/xai/xai.py +19 -2
  72. agno/os/app.py +104 -0
  73. agno/os/config.py +13 -0
  74. agno/os/interfaces/whatsapp/router.py +0 -1
  75. agno/os/mcp.py +1 -0
  76. agno/os/router.py +31 -0
  77. agno/os/routers/traces/__init__.py +3 -0
  78. agno/os/routers/traces/schemas.py +414 -0
  79. agno/os/routers/traces/traces.py +499 -0
  80. agno/os/schema.py +22 -1
  81. agno/os/utils.py +57 -0
  82. agno/run/agent.py +1 -0
  83. agno/run/base.py +17 -0
  84. agno/run/team.py +4 -0
  85. agno/session/team.py +1 -0
  86. agno/table.py +10 -0
  87. agno/team/team.py +215 -65
  88. agno/tools/function.py +10 -8
  89. agno/tools/nano_banana.py +1 -1
  90. agno/tracing/__init__.py +12 -0
  91. agno/tracing/exporter.py +157 -0
  92. agno/tracing/schemas.py +276 -0
  93. agno/tracing/setup.py +111 -0
  94. agno/utils/agent.py +4 -4
  95. agno/utils/hooks.py +56 -1
  96. agno/vectordb/qdrant/qdrant.py +22 -22
  97. agno/workflow/condition.py +8 -0
  98. agno/workflow/loop.py +8 -0
  99. agno/workflow/parallel.py +8 -0
  100. agno/workflow/router.py +8 -0
  101. agno/workflow/step.py +20 -0
  102. agno/workflow/steps.py +8 -0
  103. agno/workflow/workflow.py +83 -17
  104. {agno-2.3.3.dist-info → agno-2.3.5.dist-info}/METADATA +2 -2
  105. {agno-2.3.3.dist-info → agno-2.3.5.dist-info}/RECORD +108 -98
  106. {agno-2.3.3.dist-info → agno-2.3.5.dist-info}/WHEEL +0 -0
  107. {agno-2.3.3.dist-info → agno-2.3.5.dist-info}/licenses/LICENSE +0 -0
  108. {agno-2.3.3.dist-info → agno-2.3.5.dist-info}/top_level.txt +0 -0
agno/run/base.py CHANGED
@@ -50,6 +50,7 @@ class BaseRunOutputEvent:
50
50
  "additional_input",
51
51
  "session_summary",
52
52
  "metrics",
53
+ "run_input",
53
54
  ]
54
55
  }
55
56
 
@@ -134,6 +135,9 @@ class BaseRunOutputEvent:
134
135
  if hasattr(self, "session_summary") and self.session_summary is not None:
135
136
  _dict["session_summary"] = self.session_summary.to_dict()
136
137
 
138
+ if hasattr(self, "run_input") and self.run_input is not None:
139
+ _dict["run_input"] = self.run_input.to_dict()
140
+
137
141
  return _dict
138
142
 
139
143
  def to_json(self, separators=(", ", ": "), indent: Optional[int] = 2) -> str:
@@ -202,6 +206,19 @@ class BaseRunOutputEvent:
202
206
 
203
207
  data["session_summary"] = SessionSummary.from_dict(session_summary)
204
208
 
209
+ run_input = data.pop("run_input", None)
210
+ if run_input:
211
+ from agno.run.team import BaseTeamRunEvent
212
+
213
+ if issubclass(cls, BaseTeamRunEvent):
214
+ from agno.run.team import TeamRunInput
215
+
216
+ data["run_input"] = TeamRunInput.from_dict(run_input)
217
+ else:
218
+ from agno.run.agent import RunInput
219
+
220
+ data["run_input"] = RunInput.from_dict(run_input)
221
+
205
222
  # Filter data to only include fields that are actually defined in the target class
206
223
  from dataclasses import fields
207
224
 
agno/run/team.py CHANGED
@@ -536,6 +536,7 @@ class TeamRunOutput:
536
536
  and k
537
537
  not in [
538
538
  "messages",
539
+ "metrics",
539
540
  "status",
540
541
  "tools",
541
542
  "metadata",
@@ -555,6 +556,9 @@ class TeamRunOutput:
555
556
  if self.events is not None:
556
557
  _dict["events"] = [e.to_dict() for e in self.events]
557
558
 
559
+ if self.metrics is not None:
560
+ _dict["metrics"] = self.metrics.to_dict() if isinstance(self.metrics, Metrics) else self.metrics
561
+
558
562
  if self.status is not None:
559
563
  _dict["status"] = self.status.value if isinstance(self.status, RunStatus) else self.status
560
564
 
agno/session/team.py CHANGED
@@ -46,6 +46,7 @@ class TeamSession:
46
46
  session_dict = asdict(self)
47
47
 
48
48
  session_dict["runs"] = [run.to_dict() for run in self.runs] if self.runs else None
49
+ print(session_dict["runs"])
49
50
  session_dict["summary"] = self.summary.to_dict() if self.summary else None
50
51
 
51
52
  return session_dict
agno/table.py ADDED
@@ -0,0 +1,10 @@
1
+ import sqlite3
2
+
3
+ db_path = "tmp/traces.db"
4
+ table_name = "agno_spans"
5
+
6
+ conn = sqlite3.connect(db_path)
7
+ cur = conn.cursor()
8
+ cur.execute(f"DROP TABLE IF EXISTS {table_name}")
9
+ conn.commit()
10
+ conn.close()