agno 2.0.7__py3-none-any.whl → 2.0.9__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 +83 -51
- agno/db/base.py +14 -0
- agno/db/dynamo/dynamo.py +107 -27
- agno/db/firestore/firestore.py +109 -33
- agno/db/gcs_json/gcs_json_db.py +100 -20
- agno/db/in_memory/in_memory_db.py +95 -20
- agno/db/json/json_db.py +101 -21
- agno/db/migrations/v1_to_v2.py +322 -47
- agno/db/mongo/mongo.py +251 -26
- agno/db/mysql/mysql.py +307 -6
- agno/db/postgres/postgres.py +279 -33
- agno/db/redis/redis.py +99 -22
- agno/db/singlestore/singlestore.py +319 -38
- agno/db/sqlite/sqlite.py +339 -23
- agno/knowledge/embedder/sentence_transformer.py +3 -3
- agno/knowledge/knowledge.py +152 -31
- agno/knowledge/types.py +8 -0
- agno/models/anthropic/claude.py +0 -20
- agno/models/cometapi/__init__.py +5 -0
- agno/models/cometapi/cometapi.py +57 -0
- agno/models/google/gemini.py +4 -8
- agno/models/huggingface/huggingface.py +2 -1
- agno/models/ollama/chat.py +52 -3
- agno/models/openai/chat.py +9 -7
- agno/models/openai/responses.py +21 -17
- agno/os/interfaces/agui/agui.py +2 -2
- agno/os/interfaces/agui/utils.py +81 -18
- agno/os/interfaces/base.py +2 -0
- agno/os/interfaces/slack/router.py +50 -10
- agno/os/interfaces/slack/slack.py +6 -4
- agno/os/interfaces/whatsapp/router.py +7 -4
- agno/os/interfaces/whatsapp/whatsapp.py +2 -2
- agno/os/router.py +18 -0
- agno/os/utils.py +10 -2
- agno/reasoning/azure_ai_foundry.py +2 -2
- agno/reasoning/deepseek.py +2 -2
- agno/reasoning/default.py +3 -1
- agno/reasoning/groq.py +2 -2
- agno/reasoning/ollama.py +2 -2
- agno/reasoning/openai.py +2 -2
- agno/run/base.py +15 -2
- agno/session/agent.py +8 -5
- agno/session/team.py +14 -10
- agno/team/team.py +218 -111
- agno/tools/function.py +43 -4
- agno/tools/mcp.py +60 -37
- agno/tools/mcp_toolbox.py +284 -0
- agno/tools/scrapegraph.py +58 -31
- agno/tools/whatsapp.py +1 -1
- agno/utils/gemini.py +147 -19
- agno/utils/models/claude.py +9 -0
- agno/utils/print_response/agent.py +18 -2
- agno/utils/print_response/team.py +22 -6
- agno/utils/reasoning.py +22 -1
- agno/utils/string.py +9 -0
- agno/vectordb/base.py +2 -2
- agno/vectordb/langchaindb/langchaindb.py +5 -7
- agno/vectordb/llamaindex/llamaindexdb.py +25 -6
- agno/workflow/workflow.py +30 -15
- {agno-2.0.7.dist-info → agno-2.0.9.dist-info}/METADATA +4 -1
- {agno-2.0.7.dist-info → agno-2.0.9.dist-info}/RECORD +64 -61
- {agno-2.0.7.dist-info → agno-2.0.9.dist-info}/WHEEL +0 -0
- {agno-2.0.7.dist-info → agno-2.0.9.dist-info}/licenses/LICENSE +0 -0
- {agno-2.0.7.dist-info → agno-2.0.9.dist-info}/top_level.txt +0 -0
agno/reasoning/openai.py
CHANGED
|
@@ -29,7 +29,7 @@ def get_openai_reasoning(reasoning_agent: "Agent", messages: List[Message]) -> O
|
|
|
29
29
|
from agno.run.agent import RunOutput
|
|
30
30
|
|
|
31
31
|
try:
|
|
32
|
-
reasoning_agent_response: RunOutput = reasoning_agent.run(
|
|
32
|
+
reasoning_agent_response: RunOutput = reasoning_agent.run(input=messages)
|
|
33
33
|
except Exception as e:
|
|
34
34
|
logger.warning(f"Reasoning error: {e}")
|
|
35
35
|
return None
|
|
@@ -60,7 +60,7 @@ async def aget_openai_reasoning(reasoning_agent: "Agent", messages: List[Message
|
|
|
60
60
|
message.role = "system"
|
|
61
61
|
|
|
62
62
|
try:
|
|
63
|
-
reasoning_agent_response: RunOutput = await reasoning_agent.arun(
|
|
63
|
+
reasoning_agent_response: RunOutput = await reasoning_agent.arun(input=messages)
|
|
64
64
|
except Exception as e:
|
|
65
65
|
logger.warning(f"Reasoning error: {e}")
|
|
66
66
|
return None
|
agno/run/base.py
CHANGED
|
@@ -117,6 +117,19 @@ class BaseRunOutputEvent:
|
|
|
117
117
|
|
|
118
118
|
def to_json(self, separators=(", ", ": "), indent: Optional[int] = 2) -> str:
|
|
119
119
|
import json
|
|
120
|
+
from datetime import date, datetime, time
|
|
121
|
+
from enum import Enum
|
|
122
|
+
|
|
123
|
+
def json_serializer(obj):
|
|
124
|
+
# Datetime like
|
|
125
|
+
if isinstance(obj, (datetime, date, time)):
|
|
126
|
+
return obj.isoformat()
|
|
127
|
+
# Enums
|
|
128
|
+
if isinstance(obj, Enum):
|
|
129
|
+
v = obj.value
|
|
130
|
+
return v if isinstance(v, (str, int, float, bool, type(None))) else obj.name
|
|
131
|
+
# Fallback to string
|
|
132
|
+
return str(obj)
|
|
120
133
|
|
|
121
134
|
try:
|
|
122
135
|
_dict = self.to_dict()
|
|
@@ -125,9 +138,9 @@ class BaseRunOutputEvent:
|
|
|
125
138
|
raise
|
|
126
139
|
|
|
127
140
|
if indent is None:
|
|
128
|
-
return json.dumps(_dict, separators=separators)
|
|
141
|
+
return json.dumps(_dict, separators=separators, default=json_serializer, ensure_ascii=False)
|
|
129
142
|
else:
|
|
130
|
-
return json.dumps(_dict, indent=indent, separators=separators)
|
|
143
|
+
return json.dumps(_dict, indent=indent, separators=separators, default=json_serializer, ensure_ascii=False)
|
|
131
144
|
|
|
132
145
|
@classmethod
|
|
133
146
|
def from_dict(cls, data: Dict[str, Any]):
|
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
|
-
|
|
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=
|
|
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
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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:
|