feat: Add agent binding interface - #366
Draft
hallvictoria wants to merge 7 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
There is a confirmed provider-selection logic bug in AiApp.markdown_agent, and the new public markdown_agent API lacks consistent type annotations.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds provider-neutral “agent binding” entry points to the Azure Functions Python programming model, enabling extension packages to supply agent behavior (and optional Durable support) without the core SDK depending on a specific provider implementation.
Changes:
- Introduces
FunctionApp.markdown_agent(...)plusAiApp/DurableAiAppconvenience wrappers that delegate to a provider extension module. - Exports
AiAppandDurableAiAppviaazure.functions.decoratorsandazure.functions. - Documents the new APIs in
README.mdanddocs/ProgModelSpec.pyi, and adds unit tests validating delegation/error behavior.
File summaries
| File | Description |
|---|---|
| tests/decorators/test_agents.py | Adds unit tests for agent app delegation, configuration, exports, and import error messaging. |
| README.md | Documents provider-neutral agent APIs and durable extra installation guidance. |
| docs/ProgModelSpec.pyi | Updates public API spec with markdown_agent, AiApp, and DurableAiApp signatures. |
| azure/functions/decorators/function_app.py | Implements provider-loading, markdown_agent, and new AiApp/DurableAiApp classes. |
| azure/functions/decorators/init.py | Re-exports AiApp/DurableAiApp from decorators package. |
| azure/functions/init.py | Re-exports AiApp/DurableAiApp at top-level azure.functions. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…hub.com/Azure/azure-functions-python-library into hallvictoria/pluggable-agent-extensions
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.
Adds lightweight, provider-neutral Agent APIs to
azure-functions:FunctionApp.markdown_agent()for decorator-based Agent injection.AiAppandDurableAiApp.These APIs add no host binding metadata and allow future Agent providers through the shared extension contract.