Skip to content

Conversation

@moonbox3
Copy link
Contributor

Motivation and Context

  • Add dependencies parameter to add_agent_framework_fastapi_endpoint() for middleware-like behavior
  • Update getting_started server example to demonstrate usage pattern
  • Add documentation for the new parameter

Description

Improve usage of FastAPI endpoint for AG-UI library.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@moonbox3 moonbox3 self-assigned this Jan 13, 2026
Copilot AI review requested due to automatic review settings January 13, 2026 05:47
@markwallace-microsoft markwallace-microsoft added the documentation Improvements or additions to documentation label Jan 13, 2026
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 13, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/ag-ui/agent_framework_ag_ui
   _endpoint.py440100% 
TOTAL17648287883% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2630 155 💤 0 ❌ 0 🔥 1m 2s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a dependencies parameter to the add_agent_framework_fastapi_endpoint() function to enable authentication and authorization for AG-UI endpoints using FastAPI's dependency injection system. The changes include comprehensive test coverage, updated documentation, and a working example demonstrating API key authentication.

Changes:

  • Added dependencies parameter to FastAPI endpoint creation function for middleware-like authentication/authorization
  • Updated getting_started server example with complete API key authentication implementation
  • Added comprehensive documentation in README with authentication examples and best practices

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
python/packages/ag-ui/agent_framework_ag_ui/_endpoint.py Added dependencies parameter to endpoint function signature and passed it to FastAPI decorator
python/packages/ag-ui/tests/test_endpoint.py Added 4 new tests covering unauthorized blocking, authorized access, multiple dependencies, and backward compatibility
python/packages/ag-ui/getting_started/server.py Added comprehensive authentication example with API key verification and security best practices documentation
python/packages/ag-ui/README.md Added detailed security section with authentication examples and integration options

@moonbox3 moonbox3 moved this to In Review in Agent Framework Jan 13, 2026
@moonbox3 moonbox3 added this pull request to the merge queue Jan 13, 2026
Merged via the queue into microsoft:main with commit 1ae0b09 Jan 13, 2026
24 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Agent Framework Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ag-ui documentation Improvements or additions to documentation python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants