Fix Agno examples for v2 API compatibility
๐ฅ Pull Request
๐ Description
This PR fixes 4 out of 5 failing Agno example files reported in #1266 by updating them to be compatible with Agno v2 API changes:
-
Team API updates (
agno_basic_agents.py,agno_research_team.py):- Removed deprecated
modeparameter from Team initialization (v1 API usedmode="coordinate"ormode="collaborate") - Removed other deprecated Team parameters:
success_criteria,enable_agentic_context,add_context,show_tool_calls - Moved
membersto be the first positional argument per v2 API signature
- Removed deprecated
-
Import fixes (
agno_workflow_setup.py):- Replaced
RunResponsewithRunOutputthroughout (import, type hints, instantiation) - Updated all 5 occurrences across the file
- Replaced
-
Dependency correction (
requirements.txt):- Changed
duckduckgo-searchtoddgs(the actual package name required byagno.tools.duckduckgo)
- Changed
๐งช Testing
- Verified examples no longer crash with
Team.__init__() got an unexpected keyword argument 'mode'error - Confirmed
agno_basic_agents.pyruns to completion without import/API errors - Verified
agno_workflow_setup.pyruns withoutImportError: cannot import name 'RunResponse' - Checked that
ddgsis the correct package by inspecting agno's DuckDuckGoTools implementation
โ ๏ธ Known Limitations
The telemetry validation issue mentioned in the original issue (#1266) for agno_async_operations.py (and affecting other examples) where token usage shows as 0 is NOT addressed in this PR. This appears to be a separate instrumentation issue that warrants its own investigation. The examples now run without crashing, but the validation checks still fail due to missing LLM token metrics.
๐ Review Checklist
Please verify:
- [ ] The removed Team parameters are actually deprecated in Agno v2.x (I verified via
inspect.signature(Team.__init__)but not against official docs) - [ ]
RunOutputis the correct replacement forRunResponsein Agno v2 API - [ ] The
ddgspackage is the intended dependency (vsduckduckgo-search) - [ ] Examples run successfully with actual API keys end-to-end
Link to Devin run: https://app.devin.ai/sessions/40e4aa50aa494eeda703391874364782
Requested by: Alex ([email protected]) / @areibman
๐ค Devin AI Engineer
I'll be helping with this pull request! Here's what you should know:
โ I will automatically:
- Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
- Look at CI failures and help fix them
Note: I can only respond to comments from users who have write access to this repository.
โ๏ธ Control Options:
- [ ] Disable automatic comment and CI monitoring