Skip to content

Commit a545ab7

Browse files
authored
Release 1.4.2 (#2965)
# Changelog ## New Features: - **MCP SSE Support**: Added support for connecting to SSE MCP Servers. - **Tool Hooks**: You can now have a hook that is wrapped around all tool calls. This works for `Toolkits` and custom tools. See [this example](https://github.com/agno-agi/agno/blob/main/cookbook/agent_concepts/tool_concepts/toolkits/tool_hook.py). - **Team Session State:** You can now manage a single state dictionary across a team leader and team members inside tools given to the team leader/members. See [this example](https://github.com/agno-agi/agno/blob/main/cookbook/teams/team_with_shared_state.py). - **Cartesia Tool**: Added support for Cartesia for text-to-speech capabilities. - **Gemini Image Generation**: Added a tool that uses Gemini models to generate images. ## Improvements: - **PubmedTools Expanded Results**: Added expanded result sets for `PubmedTools` . - **Variety in Tool Results**: Custom tools can now have any return type and it would be handled before being provided to the model. ## Bug Fixes: - **Teams Shared Model Bug**: Fixed issues where a single model is used across team members. This should reduce tool call failures in team execution.
1 parent bae2185 commit a545ab7

File tree

6 files changed

+94
-8
lines changed

6 files changed

+94
-8
lines changed

.github/workflows/test_on_release.yml

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,92 @@ jobs:
557557
source .venv/bin/activate
558558
python -m pytest ./libs/agno/tests/integration/models/deepinfra
559559
560+
test-agents:
561+
runs-on: ubuntu-latest
562+
strategy:
563+
matrix:
564+
python-version: ["3.12"]
565+
fail-fast: true # Stop all matrix jobs if one fails
566+
env:
567+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
568+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
569+
steps:
570+
- uses: actions/checkout@v3
571+
- name: Set up Python ${{ matrix.python-version }}
572+
uses: actions/setup-python@v4
573+
with:
574+
python-version: ${{ matrix.python-version }}
575+
- name: Install uv
576+
run: |
577+
curl -LsSf https://astral.sh/uv/install.sh | sh
578+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
579+
- name: Run dev setup
580+
working-directory: .
581+
run: |
582+
./scripts/dev_setup.sh
583+
- name: Run remaining integration tests
584+
working-directory: .
585+
run: |
586+
source .venv/bin/activate
587+
python -m pytest ./libs/agno/tests/integration/agent
560588
589+
test-teams:
590+
runs-on: ubuntu-latest
591+
strategy:
592+
matrix:
593+
python-version: ["3.12"]
594+
fail-fast: true # Stop all matrix jobs if one fails
595+
env:
596+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
597+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
598+
steps:
599+
- uses: actions/checkout@v3
600+
- name: Set up Python ${{ matrix.python-version }}
601+
uses: actions/setup-python@v4
602+
with:
603+
python-version: ${{ matrix.python-version }}
604+
- name: Install uv
605+
run: |
606+
curl -LsSf https://astral.sh/uv/install.sh | sh
607+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
608+
- name: Run dev setup
609+
working-directory: .
610+
run: |
611+
./scripts/dev_setup.sh
612+
- name: Run remaining integration tests
613+
working-directory: .
614+
run: |
615+
source .venv/bin/activate
616+
python -m pytest ./libs/agno/tests/integration/teams
617+
618+
test-knowledge:
619+
runs-on: ubuntu-latest
620+
strategy:
621+
matrix:
622+
python-version: ["3.12"]
623+
fail-fast: true # Stop all matrix jobs if one fails
624+
env:
625+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
626+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
627+
steps:
628+
- uses: actions/checkout@v3
629+
- name: Set up Python ${{ matrix.python-version }}
630+
uses: actions/setup-python@v4
631+
with:
632+
python-version: ${{ matrix.python-version }}
633+
- name: Install uv
634+
run: |
635+
curl -LsSf https://astral.sh/uv/install.sh | sh
636+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
637+
- name: Run dev setup
638+
working-directory: .
639+
run: |
640+
./scripts/dev_setup.sh
641+
- name: Run remaining integration tests
642+
working-directory: .
643+
run: |
644+
source .venv/bin/activate
645+
python -m pytest ./libs/agno/tests/integration/knowledge
561646
562647
# Run remaining integration tests
563648
test-remaining:
@@ -587,4 +672,4 @@ jobs:
587672
working-directory: .
588673
run: |
589674
source .venv/bin/activate
590-
python -m pytest --ignore=./libs/agno/tests/integration/models ./libs/agno/tests/integration
675+
python -m pytest --ignore=./libs/agno/tests/integration/models --ignore=./libs/agno/tests/integration/agents --ignore=./libs/agno/tests/integration/knowledge --ignore=./libs/agno/tests/integration/teams ./libs/agno/tests/integration

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.4.1"
3+
version = "1.4.2"
44
description = "Agno: a lightweight library for building Reasoning Agents"
55
requires-python = ">=3.7,<4"
66
readme = "README.md"

libs/agno/tests/integration/storage/test_json_storage_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_agent_session_storage(agent_with_storage, agent_storage):
5656
assert stored_session.session_id == session_id
5757

5858
# Verify session contains the interaction
59-
assert len(stored_session.memory["messages"]) > 0
59+
assert len(stored_session.memory["runs"]) > 0
6060

6161

6262
def test_multiple_interactions(agent_with_storage, agent_storage):
@@ -71,7 +71,7 @@ def test_multiple_interactions(agent_with_storage, agent_storage):
7171
# Verify both interactions are in the same session
7272
stored_session = agent_storage.read(session_id)
7373
assert stored_session is not None
74-
assert len(stored_session.memory["messages"]) >= 4 # Should have at least 4 messages (2 questions + 2 responses)
74+
assert len(stored_session.memory["runs"]) >= 2 # Should have at least 2 runs (2 x (question + response))
7575

7676

7777
def test_session_retrieval_by_user(agent_with_storage, agent_storage):

libs/agno/tests/integration/storage/test_sqlite_storage_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_agent_session_storage(agent_with_storage, agent_storage):
5757
assert stored_session.session_id == session_id
5858

5959
# Verify session contains the interaction
60-
assert len(stored_session.memory["messages"]) > 0
60+
assert len(stored_session.memory["runs"]) > 0
6161

6262

6363
def test_multiple_interactions(agent_with_storage, agent_storage):
@@ -72,7 +72,7 @@ def test_multiple_interactions(agent_with_storage, agent_storage):
7272
# Verify both interactions are in the same session
7373
stored_session = agent_storage.read(session_id)
7474
assert stored_session is not None
75-
assert len(stored_session.memory["messages"]) >= 4 # Should have at least 4 messages (2 questions + 2 responses)
75+
assert len(stored_session.memory["runs"]) >= 2 # Should have at least 2 runs (2 x (question + response))
7676

7777

7878
def test_session_retrieval_by_user(agent_with_storage, agent_storage):

libs/agno/tests/integration/storage/test_yaml_storage_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_agent_session_storage(agent_with_storage, agent_storage):
5656
assert stored_session.session_id == session_id
5757

5858
# Verify session contains the interaction
59-
assert len(stored_session.memory["messages"]) > 0
59+
assert len(stored_session.memory["runs"]) > 0
6060

6161

6262
def test_multiple_interactions(agent_with_storage, agent_storage):
@@ -71,7 +71,7 @@ def test_multiple_interactions(agent_with_storage, agent_storage):
7171
# Verify both interactions are in the same session
7272
stored_session = agent_storage.read(session_id)
7373
assert stored_session is not None
74-
assert len(stored_session.memory["messages"]) >= 4 # Should have at least 4 messages (2 questions + 2 responses)
74+
assert len(stored_session.memory["runs"]) >= 2 # Should have at least 2 runs (2 x (question + response))
7575

7676

7777
def test_session_retrieval_by_user(agent_with_storage, agent_storage):

libs/agno/tests/unit/tools/models/test_groq.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def mock_groq_client():
4242

4343
yield mock_client_instance
4444

45+
4546
@patch("agno.tools.toolkit.Toolkit.__init__", return_value=None) # Mock base init
4647
def test_groq_tools_init_success(mock_toolkit_init, mock_groq_client):
4748
"""Test successful initialization with API key from env."""

0 commit comments

Comments
 (0)