-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add Agno framework integration #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Release-As: 0.3.0
- Add Agno as optional dependency - Implement to_agno() method for StackOneTool and Tools classes - Create agno_integration.py example with sync and async usage - Add comprehensive tests for Agno integration - Update documentation and README with Agno support - Support both individual tool and batch tool conversion to Agno format
- Update import from agno.agent import Agent - Fix compatibility with Agno version 1.7.11 - Resolve GitHub Actions test failures
- Replace Tool class with tool decorator approach - Use agno.tools.tool decorator for function-based tools - Update tests to match new Agno tool architecture - Add comprehensive MyPy configuration for Agno modules - Fix compatibility with current Agno version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 9 files
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.
|
|
||
| load_dotenv() | ||
|
|
||
| account_id = "45072196112816593343" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid hard-coding potentially sensitive account and employee identifiers; read them from environment variables or user input instead.
Prompt for AI agents
Address the following comment on examples/agno_integration.py at line 20:
<comment>Avoid hard-coding potentially sensitive account and employee identifiers; read them from environment variables or user input instead.</comment>
<file context>
@@ -0,0 +1,119 @@
+"""
+This example demonstrates how to use StackOne tools with Agno agents.
+
+This example is runnable with the following command:
+```bash
+uv run examples/agno_integration.py
+```
+
+You can find out more about Agno framework at https://docs.agno.com
</file context>
tests/test_agno_integration.py
Outdated
| def test_to_agno_with_mocked_agno(self, mock_tool: StackOneTool) -> None: | ||
| """Test Agno conversion with mocked Agno classes""" | ||
| # Mock the Agno Tool class | ||
| mock_agno_base_tool = MagicMock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MagicMock instance used as base class stub—should pass a class, e.g. MagicMock(spec=type) or type('MockTool',(object,),{})
Prompt for AI agents
Address the following comment on tests/test_agno_integration.py at line 58:
<comment>MagicMock instance used as base class stub—should pass a class, e.g. MagicMock(spec=type) or type('MockTool',(object,),{})</comment>
<file context>
@@ -0,0 +1,164 @@
+from unittest.mock import MagicMock, patch
+
+import pytest
+
+from stackone_ai.models import (
+ ExecuteConfig,
+ StackOneTool,
+ ToolParameters,
+ Tools,
</file context>
Summary
This PR adds comprehensive integration support for Agno, a high-performance multi-agent AI system framework.
🔗 About Agno
Changes Made
to_agno()methods to bothStackOneToolandToolsclassesagno_integration.pywith both sync and async usage examplesKey Features
Integration Example
Test Coverage
Agno Compatibility
This integration is built for Agno v1.7.11 and uses the current function-based tool architecture:
@tooldecorator instead of class-based toolsTest Plan