Skip to content

feat: Add agent binding interface - #366

Draft
hallvictoria wants to merge 7 commits into
devfrom
hallvictoria/pluggable-agent-extensions
Draft

feat: Add agent binding interface#366
hallvictoria wants to merge 7 commits into
devfrom
hallvictoria/pluggable-agent-extensions

Conversation

@hallvictoria

@hallvictoria hallvictoria commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Adds lightweight, provider-neutral Agent APIs to azure-functions:

  • Adds FunctionApp.markdown_agent() for decorator-based Agent injection.
  • Adds and exports AiApp and DurableAiApp.
  • Loads Agent extensions lazily, keeping provider frameworks and Durable Functions out of core imports.
  • Reports actionable installation guidance when a provider or Durable extra is missing.
  • Delegates Agent construction, markdown resolution, execution, and lifecycle management to extension packages.
  • Adds API documentation and focused delegation/error-handling tests.

These APIs add no host binding metadata and allow future Agent providers through the shared extension contract.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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(...) plus AiApp/DurableAiApp convenience wrappers that delegate to a provider extension module.
  • Exports AiApp and DurableAiApp via azure.functions.decorators and azure.functions.
  • Documents the new APIs in README.md and docs/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.

Comment thread azure/functions/decorators/function_app.py Outdated
Comment thread azure/functions/decorators/function_app.py Outdated
hallvictoria and others added 3 commits September 2, 2026 14:38
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants