Skip to content

Commit 2059819

Browse files
dirkbrndysolanky
andauthored
chore: Release 1.6.4 (#3629)
# Changelog ## New Features: - **Brightdata Toolkit**: Added multiple web-based tools via Brightdata. - **OpenCV Video/Image Toolkit**: Added tools for capturing image/video via your webcam. - **DiscordClient App**: Added a DiscordClient app for connecting your agent or team with Discord in the form of a discord bot. ## Improvements: - **FileTools File Search**: Added `search` to `FileTools`. ## Bug Fixes: - **Fix User Control Flow with History**: Fixed issues where user control flow (HITL) flows failed with message history. - **Fix lance db upsert method for supporting knowledge filters: Fixed** function `upsert` not using the parameter `filters` - **Update mongo db hybrid search for filters:** Mongodb now correctly uses filters for hybrid search - **Fixed `team.rename_session(...)` that raises an `AttributeError`** ## Breaking Changes: - **`SerperApiTools`**: Refactored `SerperApiTools` to `SerperTools` for clearer naming. --------- Co-authored-by: Yash Pratap Solanky <101447028+ysolanky@users.noreply.github.com>
1 parent 5d3e4fd commit 2059819

File tree

38 files changed

+82
-57
lines changed

38 files changed

+82
-57
lines changed

cookbook/apps/discord/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ agent = Agent(
5959
# Initialize the Discord client
6060
discord_agent = DiscordClient(media_agent)
6161
if __name__ == "__main__":
62-
discord_agent.run()
62+
discord_agent.serve()
6363
```
6464

6565
## Features

cookbook/apps/discord/agent_with_media.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
)
1515
discord_agent = DiscordClient(media_agent)
1616
if __name__ == "__main__":
17-
discord_agent.run()
17+
discord_agent.serve()

cookbook/apps/discord/agent_with_user_memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
)
5151
discord_agent = DiscordClient(personal_agent)
5252
if __name__ == "__main__":
53-
discord_agent.run()
53+
discord_agent.serve()

cookbook/apps/discord/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
discord_agent = DiscordClient(basic_agent)
1414
if __name__ == "__main__":
15-
discord_agent.run()
15+
discord_agent.serve()

cookbook/teams/memory/04_agentic_context.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
show_tool_calls=True,
5858
markdown=True,
5959
show_members_responses=True,
60+
debug_mode=True,
6061
)
6162

6263
session_id = "stock_team_session_1"
@@ -75,8 +76,8 @@
7576
stream_intermediate_steps=True,
7677
session_id=session_id,
7778
)
78-
print("Team Context: ", memory.team_context[session_id].text)
79-
for interaction in memory.team_context[session_id].member_interactions:
79+
print("Team Context: ", team.memory.team_context[session_id].text)
80+
for interaction in team.memory.team_context[session_id].member_interactions:
8081
print(
8182
"Member Interactions: ",
8283
f"{interaction.member_name}: {interaction.task} - {interaction.response.content}",

libs/agno/agno/agent/agent.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,6 @@ def set_defaults(self) -> None:
614614
def reset_session_state(self) -> None:
615615
self.session_name = None
616616
self.session_state = None
617-
self.team_session_state = None
618617
self.session_metrics = None
619618
self.images = None
620619
self.videos = None
@@ -2069,7 +2068,6 @@ async def acontinue_run(
20692068
# We are continuing from a previous run_response in state
20702069
self.run_response = cast(RunResponse, self.run_response)
20712070
run_response = self.run_response
2072-
run_response.status = RunStatus.running
20732071
messages = self.run_response.messages or []
20742072
self.run_id = self.run_response.run_id
20752073

@@ -3553,6 +3551,34 @@ def get_tools(
35533551
self._raise_if_async_tools()
35543552
agent_tools.extend(self.tools)
35553553

3554+
# If any of the tools has "agent" as parameter, set _rebuild_tools to True
3555+
for tool in agent_tools:
3556+
if isinstance(tool, Function):
3557+
if "agent" in tool.parameters:
3558+
self._rebuild_tools = True
3559+
break
3560+
if "team" in tool.parameters:
3561+
self._rebuild_tools = True
3562+
break
3563+
if isinstance(tool, Toolkit):
3564+
for func in tool.functions.values():
3565+
if "agent" in func.parameters:
3566+
self._rebuild_tools = True
3567+
break
3568+
if "team" in func.parameters:
3569+
self._rebuild_tools = True
3570+
break
3571+
if callable(tool):
3572+
from inspect import signature
3573+
3574+
sig = signature(tool)
3575+
if "agent" in sig.parameters:
3576+
self._rebuild_tools = True
3577+
break
3578+
if "team" in sig.parameters:
3579+
self._rebuild_tools = True
3580+
break
3581+
35563582
# Add tools for accessing memory
35573583
if self.read_chat_history:
35583584
agent_tools.append(self.get_chat_history_function(session_id=session_id))

libs/agno/agno/app/discord/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async def _send_discord_messages(self, thread: discord.channel, message: str, it
110110
else:
111111
await thread.send(batch_message) # type: ignore
112112

113-
def run(self):
113+
def serve(self):
114114
try:
115115
token = getenv("DISCORD_BOT_TOKEN")
116116
if not token:

libs/agno/agno/memory/v2/memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ def __deepcopy__(self, memo):
11171117
# Deep copy attributes
11181118
for k, v in self.__dict__.items():
11191119
# Reuse db
1120-
if k in {"db", "memory_manager", "summary_manager"}:
1120+
if k in {"db", "memory_manager", "summary_manager", "team_context"}:
11211121
setattr(copied_obj, k, v)
11221122
else:
11231123
setattr(copied_obj, k, deepcopy(v, memo))

libs/agno/agno/team/team.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6478,9 +6478,6 @@ def rename_session(self, session_name: str, session_id: Optional[str] = None) ->
64786478

64796479
session_id = session_id or self.session_id
64806480

6481-
# Ensure storage mode is set to "team" before reading
6482-
self._set_storage_mode()
6483-
64846481
# -*- Read from storage
64856482
self.read_from_storage(session_id=session_id) # type: ignore
64866483
# -*- Rename session

libs/agno/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agno"
3-
version = "1.6.3"
3+
version = "1.6.4"
44
description = "Agno: a lightweight library for building Multi-Agent Systems"
55
requires-python = ">=3.7,<4"
66
readme = "README.md"

0 commit comments

Comments
 (0)