feat: Improve compatibility with agno 2.5.0#41
Merged
Abhijeet Prasad (AbhiPrasad) merged 2 commits intomainfrom Mar 5, 2026
Merged
feat: Improve compatibility with agno 2.5.0#41Abhijeet Prasad (AbhiPrasad) merged 2 commits intomainfrom
Abhijeet Prasad (AbhiPrasad) merged 2 commits intomainfrom
Conversation
8803089 to
c3bf48e
Compare
Andrew Kent (realark)
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
resolves https://linear.app/braintrustdata/issue/BRA-4192/agno-integration-improvements
AI Summary
This PR hardens and modernizes the Agno integration to support the API changes introduced around the Agno
2.4 -> 2.5transition, while preserving compatibility with older versions.Why this change was needed
Agno’s run execution model changed significantly:
_run/_arun/_run_stream/_arun_streamrun/arun) with mixed return contracts (direct value, iterator, async iterator, awaitable returning async iterator)Our wrapper previously had gaps in these newer async/streaming paths:
agent.py/team.pymade this behavior harder to maintain safelyWhat changed
Integration behavior
run/arunwrapping logic for both Agent and Team to handle all dispatcher return shapes correctly.span.end()).Refactor / maintainability
py/src/braintrust/wrappers/agno/run_helpers.pyTests
Expanded
py/src/braintrust/wrappers/test_agno.pywith coverage for:Also added short explanatory docstrings for complex tests.
Version matrix
LATEST,2.4.0,2.1.0User-facing changes
arun(..., stream=True)setup_agno(...)remains the same).