Fix Agno examples for v2 API compatibility #1267
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📥 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):modeparameter from Team initialization (v1 API usedmode="coordinate"ormode="collaborate")success_criteria,enable_agentic_context,add_context,show_tool_callsmembersto be the first positional argument per v2 API signatureImport fixes (
agno_workflow_setup.py):RunResponsewithRunOutputthroughout (import, type hints, instantiation)Dependency correction (
requirements.txt):duckduckgo-searchtoddgs(the actual package name required byagno.tools.duckduckgo)🧪 Testing
Team.__init__() got an unexpected keyword argument 'mode'erroragno_basic_agents.pyruns to completion without import/API errorsagno_workflow_setup.pyruns withoutImportError: cannot import name 'RunResponse'ddgsis the correct package by inspecting agno's DuckDuckGoTools implementationThe 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:
inspect.signature(Team.__init__)but not against official docs)RunOutputis the correct replacement forRunResponsein Agno v2 APIddgspackage is the intended dependency (vsduckduckgo-search)Link to Devin run: https://app.devin.ai/sessions/40e4aa50aa494eeda703391874364782
Requested by: Alex ([email protected]) / @areibman