Skip to content

feat(website): [refact] migrate chatui to published agent application endpoint#91

Open
ferantivero wants to merge 5 commits intoAzure-Samples:mainfrom
ferantivero:patch/538619_website-stable-endpoint
Open

feat(website): [refact] migrate chatui to published agent application endpoint#91
ferantivero wants to merge 5 commits intoAzure-Samples:mainfrom
ferantivero:patch/538619_website-stable-endpoint

Conversation

@ferantivero
Copy link
Contributor

@ferantivero ferantivero commented Mar 18, 2026

This moves the chat web app from the project-scoped Foundry platform SDK
to the OpenAI .NET SDK, now targeting the published Agent Application
endpoint, the stable production surface for deployed agents.

Why

After starting to publish and deploy agent applications (#87), the
recommended path is to consume the new published endpoint directly.
The OpenAI SDK (with Azure.AI.OpenAI handling auth) turned out to be
the thinnest GA client that speaks this protocol.

What changed

Backend

  • Swapped AIProjectClient for AzureOpenAIClientResponsesClient
  • Rewrote ChatController to take the full message history (stateless now)
  • Dropped the Conversations() action, no server-side conversations anymore
  • Collapsed AIProjectEndpoint + AIAgentId into a single AgentBaseUrl setting

Frontend

  • Removed createThread(), the client now keeps the message history locally
  • Renamed sendPrompt()sendMessages() to better reflect what it does

Infrastructure

  • Assigned Azure AI User role at both Foundry project and agent application scope. The project-scope assignment grants workspaces/agents/action; the application-scope assignment gates access to the specific published agent. This two-level model enables fine-grained onboarding and offboarding of agent access — documented in the README.
  • Updated web-app.bicep to use a single AgentBaseUrl app setting
  • Updated the README deployment step to use AGENT_BASE_URL
  • Changed az webapp restart to a hard stop/start cycle so the managed identity acquires a fresh authentication token after RBAC or configuration changes

Packaging

  • Rebuilt chatui.zip to include wwwroot/ static files

Documentation

  • Documented RBAC mechanics for published agent invocation in the README
  • Added SHA-256 checksum verification step for chatui.zip download

Dependencies

  • Added: Azure.AI.OpenAI 2.1.0, OpenAI 2.9.1
  • Removed: Azure.AI.Projects 1.2.0-beta.5
  • Published zip is ~1.1 MB lighter (storage/crypto transitive deps gone)

Test

web app updated and working
image

app gw test

image

Add OpenAI SDK (v2.9.1) as a direct dependency. This is the GA, first-party
.NET library co-maintained by OpenAI and Microsoft that natively supports the
Responses API protocol used by published Agent Application endpoints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ferantivero ferantivero force-pushed the patch/538619_website-stable-endpoint branch 2 times, most recently from c1fbb50 to 7c38ede Compare March 19, 2026 21:01
- Replace Azure.AI.Projects with Azure.AI.OpenAI + OpenAI (Responses API)
- Build Foundry endpoint URL with /protocols/openai and api-version
- Set auth audience to https://ai.azure.com for published agent
- Move model deployment name to AgentModelDeploymentName app setting
- Rename controller action from Completions to Responses

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ferantivero ferantivero force-pushed the patch/538619_website-stable-endpoint branch 2 times, most recently from fd38b63 to d734cda Compare March 23, 2026 18:54
ferantivero and others added 3 commits March 23, 2026 16:22
Move Azure AI User role assignment from Foundry account scope (web-app.bicep)
to both Foundry project and Agent Application scope (ai-foundry-appdeploy.bicep).

- Assign Azure AI User at project scope for workspaces/agents/action permission
- Assign Azure AI User at application scope for least-privilege agent access
- Remove foundry account/project references from web-app.bicep
- Use hard stop/start in README to acquire fresh auth tokens
- Document RBAC mechanics for onboarding and offboarding agent access

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Include wwwroot/favicon.ico (and .br/.gz compressed variants) in zip
- Fixes App Gateway health probe 404 on /favicon.ico

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Recommend verifying zip integrity before uploading to blob storage
- Show commands for both local (sha256sum) and jump box (Get-FileHash)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ferantivero ferantivero force-pushed the patch/538619_website-stable-endpoint branch from d734cda to 32b604e Compare March 23, 2026 19:27
@ferantivero ferantivero marked this pull request as ready for review March 23, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant