agentops icon indicating copy to clipboard operation
agentops copied to clipboard

Fix Agno examples for v2 API compatibility

Open devin-ai-integration[bot] opened this issue 2 months ago โ€ข 1 comments

๐Ÿ“ฅ 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:

  1. Team API updates (agno_basic_agents.py, agno_research_team.py):

    • Removed deprecated mode parameter from Team initialization (v1 API used mode="coordinate" or mode="collaborate")
    • Removed other deprecated Team parameters: success_criteria, enable_agentic_context, add_context, show_tool_calls
    • Moved members to be the first positional argument per v2 API signature
  2. Import fixes (agno_workflow_setup.py):

    • Replaced RunResponse with RunOutput throughout (import, type hints, instantiation)
    • Updated all 5 occurrences across the file
  3. Dependency correction (requirements.txt):

    • Changed duckduckgo-search to ddgs (the actual package name required by agno.tools.duckduckgo)

๐Ÿงช Testing

  • Verified examples no longer crash with Team.__init__() got an unexpected keyword argument 'mode' error
  • Confirmed agno_basic_agents.py runs to completion without import/API errors
  • Verified agno_workflow_setup.py runs without ImportError: cannot import name 'RunResponse'
  • Checked that ddgs is 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)
  • [ ] RunOutput is the correct replacement for RunResponse in Agno v2 API
  • [ ] The ddgs package is the intended dependency (vs duckduckgo-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