agno 2.0.6__py3-none-any.whl → 2.0.8__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 (52) hide show
  1. agno/agent/agent.py +94 -48
  2. agno/db/migrations/v1_to_v2.py +140 -11
  3. agno/knowledge/chunking/semantic.py +33 -6
  4. agno/knowledge/embedder/sentence_transformer.py +3 -3
  5. agno/knowledge/knowledge.py +152 -31
  6. agno/knowledge/types.py +8 -0
  7. agno/media.py +2 -0
  8. agno/models/base.py +38 -9
  9. agno/models/cometapi/__init__.py +5 -0
  10. agno/models/cometapi/cometapi.py +57 -0
  11. agno/models/google/gemini.py +4 -8
  12. agno/models/llama_cpp/__init__.py +5 -0
  13. agno/models/llama_cpp/llama_cpp.py +22 -0
  14. agno/models/nexus/__init__.py +1 -1
  15. agno/models/nexus/nexus.py +2 -5
  16. agno/models/ollama/chat.py +24 -1
  17. agno/models/openai/chat.py +2 -7
  18. agno/models/openai/responses.py +21 -17
  19. agno/os/app.py +4 -10
  20. agno/os/interfaces/agui/agui.py +2 -2
  21. agno/os/interfaces/agui/utils.py +81 -18
  22. agno/os/interfaces/slack/slack.py +2 -2
  23. agno/os/interfaces/whatsapp/whatsapp.py +2 -2
  24. agno/os/router.py +3 -4
  25. agno/os/routers/evals/evals.py +1 -1
  26. agno/os/routers/memory/memory.py +1 -1
  27. agno/os/schema.py +3 -4
  28. agno/os/utils.py +55 -12
  29. agno/reasoning/default.py +3 -1
  30. agno/run/agent.py +4 -0
  31. agno/run/team.py +3 -1
  32. agno/session/agent.py +8 -5
  33. agno/session/team.py +14 -10
  34. agno/team/team.py +239 -115
  35. agno/tools/decorator.py +4 -2
  36. agno/tools/function.py +43 -4
  37. agno/tools/mcp.py +61 -38
  38. agno/tools/memori.py +1 -53
  39. agno/utils/events.py +7 -1
  40. agno/utils/gemini.py +147 -19
  41. agno/utils/models/claude.py +9 -0
  42. agno/utils/print_response/agent.py +16 -0
  43. agno/utils/print_response/team.py +16 -0
  44. agno/vectordb/base.py +2 -2
  45. agno/vectordb/langchaindb/langchaindb.py +5 -7
  46. agno/vectordb/llamaindex/llamaindexdb.py +25 -6
  47. agno/workflow/workflow.py +59 -15
  48. {agno-2.0.6.dist-info → agno-2.0.8.dist-info}/METADATA +1 -1
  49. {agno-2.0.6.dist-info → agno-2.0.8.dist-info}/RECORD +52 -48
  50. {agno-2.0.6.dist-info → agno-2.0.8.dist-info}/WHEEL +0 -0
  51. {agno-2.0.6.dist-info → agno-2.0.8.dist-info}/licenses/LICENSE +0 -0
  52. {agno-2.0.6.dist-info → agno-2.0.8.dist-info}/top_level.txt +0 -0
agno/run/agent.py CHANGED
@@ -96,6 +96,7 @@ class RunContentEvent(BaseAgentRunEvent):
96
96
  content: Optional[Any] = None
97
97
  content_type: str = "str"
98
98
  reasoning_content: Optional[str] = None
99
+ model_provider_data: Optional[Dict[str, Any]] = None
99
100
  citations: Optional[Citations] = None
100
101
  response_audio: Optional[Audio] = None # Model audio response
101
102
  image: Optional[Image] = None # Image attached to the response
@@ -119,6 +120,7 @@ class RunCompletedEvent(BaseAgentRunEvent):
119
120
  content_type: str = "str"
120
121
  reasoning_content: Optional[str] = None
121
122
  citations: Optional[Citations] = None
123
+ model_provider_data: Optional[Dict[str, Any]] = None
122
124
  images: Optional[List[Image]] = None # Images attached to the response
123
125
  videos: Optional[List[Video]] = None # Videos attached to the response
124
126
  audio: Optional[List[Audio]] = None # Audio attached to the response
@@ -383,6 +385,8 @@ class RunOutput:
383
385
  reasoning_steps: Optional[List[ReasoningStep]] = None
384
386
  reasoning_messages: Optional[List[Message]] = None
385
387
 
388
+ model_provider_data: Optional[Dict[str, Any]] = None
389
+
386
390
  model: Optional[str] = None
387
391
  model_provider: Optional[str] = None
388
392
  messages: Optional[List[Message]] = None
agno/run/team.py CHANGED
@@ -98,6 +98,7 @@ class RunContentEvent(BaseTeamRunEvent):
98
98
  content: Optional[Any] = None
99
99
  content_type: str = "str"
100
100
  reasoning_content: Optional[str] = None
101
+ model_provider_data: Optional[Dict[str, Any]] = None
101
102
  citations: Optional[Citations] = None
102
103
  response_audio: Optional[Audio] = None # Model audio response
103
104
  image: Optional[Image] = None # Image attached to the response
@@ -121,6 +122,7 @@ class RunCompletedEvent(BaseTeamRunEvent):
121
122
  content_type: str = "str"
122
123
  reasoning_content: Optional[str] = None
123
124
  citations: Optional[Citations] = None
125
+ model_provider_data: Optional[Dict[str, Any]] = None
124
126
  images: Optional[List[Image]] = None # Images attached to the response
125
127
  videos: Optional[List[Video]] = None # Videos attached to the response
126
128
  audio: Optional[List[Audio]] = None # Audio attached to the response
@@ -382,7 +384,7 @@ class TeamRunOutput:
382
384
  reasoning_content: Optional[str] = None
383
385
 
384
386
  citations: Optional[Citations] = None
385
-
387
+ model_provider_data: Optional[Dict[str, Any]] = None
386
388
  metadata: Optional[Dict[str, Any]] = None
387
389
 
388
390
  references: Optional[List[MessageReferences]] = None
agno/session/agent.py CHANGED
@@ -57,8 +57,9 @@ class AgentSession:
57
57
  return None
58
58
 
59
59
  runs = data.get("runs")
60
+ serialized_runs: List[RunOutput] = []
60
61
  if runs is not None and isinstance(runs[0], dict):
61
- runs = [RunOutput.from_dict(run) for run in runs]
62
+ serialized_runs = [RunOutput.from_dict(run) for run in runs]
62
63
 
63
64
  summary = data.get("summary")
64
65
  if summary is not None and isinstance(summary, dict):
@@ -77,7 +78,7 @@ class AgentSession:
77
78
  metadata=metadata,
78
79
  created_at=data.get("created_at"),
79
80
  updated_at=data.get("updated_at"),
80
- runs=runs,
81
+ runs=serialized_runs,
81
82
  summary=summary,
82
83
  )
83
84
 
@@ -151,12 +152,14 @@ class AgentSession:
151
152
  continue
152
153
 
153
154
  for message in run_response.messages or []:
154
- # Skip messages with specified role
155
- if skip_role and message.role == skip_role:
156
- continue
157
155
  # Skip messages that were tagged as history in previous runs
158
156
  if hasattr(message, "from_history") and message.from_history and skip_history_messages:
159
157
  continue
158
+
159
+ # Skip messages with specified role
160
+ if skip_role and message.role == skip_role:
161
+ continue
162
+
160
163
  if message.role == "system":
161
164
  # Only add the system message once
162
165
  if system_message is None:
agno/session/team.py CHANGED
@@ -54,16 +54,18 @@ class TeamSession:
54
54
  log_warning("TeamSession is missing session_id")
55
55
  return None
56
56
 
57
- if data.get("summary") is not None:
57
+ summary = data.get("summary")
58
+ if summary is not None and isinstance(summary, dict):
58
59
  data["summary"] = SessionSummary.from_dict(data["summary"]) # type: ignore
59
60
 
60
- runs = data.get("runs", [])
61
+ runs = data.get("runs")
61
62
  serialized_runs: List[Union[TeamRunOutput, RunOutput]] = []
62
- for run in runs:
63
- if "agent_id" in run:
64
- serialized_runs.append(RunOutput.from_dict(run))
65
- elif "team_id" in run:
66
- serialized_runs.append(TeamRunOutput.from_dict(run))
63
+ if runs is not None and isinstance(runs[0], dict):
64
+ for run in runs:
65
+ if "agent_id" in run:
66
+ serialized_runs.append(RunOutput.from_dict(run))
67
+ elif "team_id" in run:
68
+ serialized_runs.append(TeamRunOutput.from_dict(run))
67
69
 
68
70
  return cls(
69
71
  session_id=data.get("session_id"), # type: ignore
@@ -160,12 +162,14 @@ class TeamSession:
160
162
  continue
161
163
 
162
164
  for message in run_response.messages or []:
163
- # Skip messages with specified role
164
- if skip_role and message.role == skip_role:
165
- continue
166
165
  # Skip messages that were tagged as history in previous runs
167
166
  if hasattr(message, "from_history") and message.from_history and skip_history_messages:
168
167
  continue
168
+
169
+ # Skip messages with specified role
170
+ if skip_role and message.role == skip_role:
171
+ continue
172
+
169
173
  if message.role == "system":
170
174
  # Only add the system message once
171
175
  if system_message is None: