agno 2.3.4__py3-none-any.whl → 2.3.6__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 (116) hide show
  1. agno/agent/agent.py +184 -45
  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 +553 -15
  17. agno/db/postgres/postgres.py +544 -5
  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 +549 -10
  24. agno/db/sqlite/schemas.py +38 -0
  25. agno/db/sqlite/sqlite.py +540 -9
  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 +18 -8
  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/integrations/discord/client.py +1 -1
  36. agno/knowledge/chunking/semantic.py +2 -2
  37. agno/models/aimlapi/aimlapi.py +2 -3
  38. agno/models/anthropic/claude.py +18 -13
  39. agno/models/aws/bedrock.py +3 -4
  40. agno/models/aws/claude.py +5 -1
  41. agno/models/azure/ai_foundry.py +2 -2
  42. agno/models/azure/openai_chat.py +8 -0
  43. agno/models/cerebras/cerebras.py +62 -11
  44. agno/models/cerebras/cerebras_openai.py +2 -3
  45. agno/models/cohere/chat.py +1 -5
  46. agno/models/cometapi/cometapi.py +2 -3
  47. agno/models/dashscope/dashscope.py +2 -3
  48. agno/models/deepinfra/deepinfra.py +2 -3
  49. agno/models/deepseek/deepseek.py +2 -3
  50. agno/models/fireworks/fireworks.py +2 -3
  51. agno/models/google/gemini.py +9 -7
  52. agno/models/groq/groq.py +2 -3
  53. agno/models/huggingface/huggingface.py +1 -5
  54. agno/models/ibm/watsonx.py +1 -5
  55. agno/models/internlm/internlm.py +2 -3
  56. agno/models/langdb/langdb.py +6 -4
  57. agno/models/litellm/chat.py +2 -2
  58. agno/models/litellm/litellm_openai.py +2 -3
  59. agno/models/meta/llama.py +1 -5
  60. agno/models/meta/llama_openai.py +4 -5
  61. agno/models/mistral/mistral.py +1 -5
  62. agno/models/nebius/nebius.py +2 -3
  63. agno/models/nvidia/nvidia.py +4 -5
  64. agno/models/openai/chat.py +14 -3
  65. agno/models/openai/responses.py +14 -3
  66. agno/models/openrouter/openrouter.py +4 -5
  67. agno/models/perplexity/perplexity.py +2 -3
  68. agno/models/portkey/portkey.py +7 -6
  69. agno/models/requesty/requesty.py +4 -5
  70. agno/models/response.py +2 -1
  71. agno/models/sambanova/sambanova.py +4 -5
  72. agno/models/siliconflow/siliconflow.py +3 -4
  73. agno/models/together/together.py +4 -5
  74. agno/models/vercel/v0.py +4 -5
  75. agno/models/vllm/vllm.py +19 -14
  76. agno/models/xai/xai.py +4 -5
  77. agno/os/app.py +104 -0
  78. agno/os/config.py +13 -0
  79. agno/os/interfaces/whatsapp/router.py +0 -1
  80. agno/os/interfaces/whatsapp/security.py +3 -1
  81. agno/os/mcp.py +1 -0
  82. agno/os/router.py +31 -0
  83. agno/os/routers/traces/__init__.py +3 -0
  84. agno/os/routers/traces/schemas.py +414 -0
  85. agno/os/routers/traces/traces.py +499 -0
  86. agno/os/schema.py +12 -2
  87. agno/os/utils.py +57 -0
  88. agno/run/agent.py +1 -0
  89. agno/run/base.py +17 -0
  90. agno/run/team.py +4 -0
  91. agno/table.py +10 -0
  92. agno/team/team.py +221 -69
  93. agno/tools/function.py +10 -8
  94. agno/tools/google_drive.py +4 -3
  95. agno/tools/nano_banana.py +1 -1
  96. agno/tools/spotify.py +922 -0
  97. agno/tracing/__init__.py +12 -0
  98. agno/tracing/exporter.py +157 -0
  99. agno/tracing/schemas.py +276 -0
  100. agno/tracing/setup.py +111 -0
  101. agno/utils/agent.py +6 -6
  102. agno/utils/hooks.py +56 -1
  103. agno/utils/mcp.py +1 -1
  104. agno/vectordb/qdrant/qdrant.py +22 -22
  105. agno/workflow/condition.py +8 -0
  106. agno/workflow/loop.py +8 -0
  107. agno/workflow/parallel.py +8 -0
  108. agno/workflow/router.py +8 -0
  109. agno/workflow/step.py +20 -0
  110. agno/workflow/steps.py +8 -0
  111. agno/workflow/workflow.py +88 -19
  112. {agno-2.3.4.dist-info → agno-2.3.6.dist-info}/METADATA +38 -33
  113. {agno-2.3.4.dist-info → agno-2.3.6.dist-info}/RECORD +116 -105
  114. {agno-2.3.4.dist-info → agno-2.3.6.dist-info}/WHEEL +0 -0
  115. {agno-2.3.4.dist-info → agno-2.3.6.dist-info}/licenses/LICENSE +0 -0
  116. {agno-2.3.4.dist-info → agno-2.3.6.dist-info}/top_level.txt +0 -0
agno/tools/function.py CHANGED
@@ -897,7 +897,7 @@ class FunctionCall(BaseModel):
897
897
  return FunctionExecutionResult(status="success", result=cached_result)
898
898
 
899
899
  # Execute function
900
- execution_result = None
900
+ execution_result: FunctionExecutionResult
901
901
  exception_to_raise = None
902
902
 
903
903
  try:
@@ -939,6 +939,7 @@ class FunctionCall(BaseModel):
939
939
  log_debug(f"{e.__class__.__name__}: {e}")
940
940
  self.error = str(e)
941
941
  exception_to_raise = e
942
+ execution_result = FunctionExecutionResult(status="failure", error=str(e))
942
943
  except Exception as e:
943
944
  log_warning(f"Could not run function {self.get_call_str()}")
944
945
  log_exception(e)
@@ -948,10 +949,10 @@ class FunctionCall(BaseModel):
948
949
  finally:
949
950
  self._handle_post_hook()
950
951
 
951
- if exception_to_raise is not None:
952
- raise exception_to_raise
952
+ if exception_to_raise is not None:
953
+ raise exception_to_raise
953
954
 
954
- return execution_result # type: ignore[return-value]
955
+ return execution_result
955
956
 
956
957
  async def _handle_pre_hook_async(self):
957
958
  """Handles the async pre-hook for the function call."""
@@ -1117,7 +1118,7 @@ class FunctionCall(BaseModel):
1117
1118
  return FunctionExecutionResult(status="success", result=cached_result)
1118
1119
 
1119
1120
  # Execute function
1120
- execution_result = None
1121
+ execution_result: FunctionExecutionResult
1121
1122
  exception_to_raise = None
1122
1123
 
1123
1124
  try:
@@ -1159,6 +1160,7 @@ class FunctionCall(BaseModel):
1159
1160
  log_debug(f"{e.__class__.__name__}: {e}")
1160
1161
  self.error = str(e)
1161
1162
  exception_to_raise = e
1163
+ execution_result = FunctionExecutionResult(status="failure", error=str(e))
1162
1164
  except Exception as e:
1163
1165
  log_warning(f"Could not run function {self.get_call_str()}")
1164
1166
  log_exception(e)
@@ -1171,10 +1173,10 @@ class FunctionCall(BaseModel):
1171
1173
  else:
1172
1174
  self._handle_post_hook()
1173
1175
 
1174
- if exception_to_raise is not None:
1175
- raise exception_to_raise
1176
+ if exception_to_raise is not None:
1177
+ raise exception_to_raise
1176
1178
 
1177
- return execution_result # type: ignore[return-value]
1179
+ return execution_result
1178
1180
 
1179
1181
 
1180
1182
  class ToolResult(BaseModel):
@@ -69,6 +69,7 @@ from pathlib import Path
69
69
  from typing import Any, List, Optional, Union
70
70
 
71
71
  from agno.tools import Toolkit
72
+ from agno.utils.log import log_error
72
73
 
73
74
  try:
74
75
  from google.auth.transport.requests import Request
@@ -202,7 +203,7 @@ class GoogleDriveTools(Toolkit):
202
203
  items = results.get("files", [])
203
204
  return items
204
205
  except Exception as error:
205
- print(f"Could not list files: {error}")
206
+ log_error(f"Could not list files: {error}")
206
207
  return []
207
208
 
208
209
  @authenticate
@@ -238,7 +239,7 @@ class GoogleDriveTools(Toolkit):
238
239
  )
239
240
  return uploaded_file
240
241
  except Exception as error:
241
- print(f"Could not upload file '{file_path}': {error}")
242
+ log_error(f"Could not upload file '{file_path}': {error}")
242
243
  return None
243
244
 
244
245
  @authenticate
@@ -266,5 +267,5 @@ class GoogleDriveTools(Toolkit):
266
267
  print(f"Download progress: {int(status.progress() * 100)}%.")
267
268
  return dest_path
268
269
  except Exception as error:
269
- print(f"Could not download file '{file_id}': {error}")
270
+ log_error(f"Could not download file '{file_id}': {error}")
270
271
  return None
agno/tools/nano_banana.py CHANGED
@@ -79,7 +79,7 @@ class NanoBananaTools(Toolkit):
79
79
 
80
80
  response = client.models.generate_content(
81
81
  model=self.model,
82
- contents=[prompt],
82
+ contents=[prompt], # type: ignore
83
83
  config=cfg,
84
84
  )
85
85