[AAASM-3537] ✨ (adapters): Add Agno framework adapter#162
Merged
Conversation
Agno (pip agno, formerly Phidata) runs every function-tool body through FunctionCall.execute (sync) / aexecute (async). Patch that chokepoint with a pre-execution allow/deny: deny short-circuits the body and returns a failure FunctionExecutionResult; allow runs it and records the result. Reuses the shared fail-closed decision/approval helpers from the crewai adapter. Refs AAASM-3537 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AgnoAdapter advertises framework name "agno" and supported range >=2.0.0, and installs/reverts the AgnoPatch governance hooks. Refs AAASM-3537 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add AgnoAdapter to the registry's built-in list and priority map so init_assembly() auto-detects and hooks Agno whenever the framework is installed. Refs AAASM-3537 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…vert Drive a fake agno.tools.function module to cover the allow/deny/pending/record branches, fail-closed-under-enforce on unknown verdicts, the async aexecute path, and idempotent apply+revert — without importing the real framework. Refs AAASM-3537 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…trol) Drive a real agno FunctionCall through the patched execute() to prove a deny short-circuits the actual tool body (fails if the patch is ever a no-op), an allow runs and records it, revert restores unguarded execution, and the registry auto-detects the installed adapter. importorskip-guarded on agno. Refs AAASM-3537 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dev/test-only (NOT a runtime dependency). Installing agno lets the importorskip-guarded integration test drive a real FunctionCall, so the negative-control deny test fails on a regression instead of being silently skipped. Refs AAASM-3537 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add Agno to the README and the authoritative Python framework-compatibility matrix, with a section explaining the FunctionCall.execute/aexecute hook point and the >=2.0.0 supported / 2.6.x tested lines. Refs AAASM-3537 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
Author
|
Claude Code — review result ✅ Real CI green (SonarCloud not blocking).
Ready to merge. Merge before examples #151 + a python-sdk release. Full cross-repo review on AAASM-3535. |
The helper always returned the constant True (early idempotency guard + end-of-body), which Sonar flags as S3516 "method always returns the same value". Convert it to a void procedure — it installs the patch as a side effect — and have apply() return True explicitly after calling it. The apply() contract (True when patched, False when the framework is absent) is unchanged; the idempotency tests still pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Claude Code — SonarCloud new-code review (round 2) Deep new-code pass found 1 finding here, now fixed:
✅ Quality gate now OK; 0 new-code issues (Security / Reliability / Maintainability / Hotspots / Coverage all clean). |
Resolve registry + README overlaps after py #160 (Haystack) merged: keep both the Haystack (master) and Agno entries/imports/builtins and the combined README adapter list. frameworks.md + compat table auto-merged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eat/agno_support # Conflicts: # README.md # agent_assembly/adapters/registry.py # docs/compatibility/frameworks.md # pyproject.toml
The conflict resolution bumped smolagents 6->7 and set agno=8, which would silently change master's smolagents priority on merge and re-conflict with the llamaindex/MS branches. Match master + siblings: haystack/smolagents/agno all at priority 6 (disjoint frameworks; relative order among them is irrelevant). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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.



Description
Adds a full framework adapter for Agno (pip
agno, formerly Phidata) so thePython SDK genuinely governs Agno agents at the in-process SDK layer.
Agno runs every function-tool body through a single chokepoint:
agno.tools.function.FunctionCall.execute(sync) andFunctionCall.aexecute(async). An
Agentbuilds aFunctionCallfrom the model's tool-call request andinvokes that method, which runs the user's tool entrypoint and wraps the return in
a
FunctionExecutionResult. The adapter patches that one method:FunctionExecutionResult(status="failure", ...)carrying the block message;Decision normalization, fail-closed-under-enforce (AAASM-3107), and the approval
helpers are reused from the CrewAI adapter so posture is identical across adapters.
Type of Change
Breaking Changes
Related Issues
Testing
fail-closed, async path, idempotent apply+revert)
FunctionCalldriven through thepatched
execute()as a negative control: a deny must short-circuit the realtool body (the test fails if the patch is ever a no-op), an allow runs and records
it, revert restores unguarded execution, and the registry auto-detects the adapter.
agno>=2.0.0added to thetestdependency group so the integration test runsin CI rather than being skipped.
Verified locally:
pytest test/unit(537 passed, 1 native-only skip), the newunit + integration suite (17 passed),
ruff checkclean on new files,mypyclean. Negative control confirmed: neutering the patch makes the deny test fail
(body executes
[1000]); restoring it passes.Checklist
docs/compatibility/frameworks.md)Refs AAASM-3537
🤖 Generated with Claude Code