microsoft-foundry / microsoft-foundry/foundry-samples

[Hosted Agents] Container readiness probe fails - documentation doesn't specify health endpoint

Open
#490 1 comment 0 reactions 2 assignees View on GitHub

@ankitbko is already working on this.

Since Jun 18, 2026.

Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

Description

When deploying a hosted agent following the official documentation, the deployment fails with ContainerProbesFailed error. The documentation doesn't clearly specify which health endpoint Azure Container Apps probes for readiness checks.

Environment

  • Region: North Central US
  • SDK: azure-ai-projects==2.0.0b3
  • Hosting Adapter: azure-ai-agentserver-agentframework==1.0.0b9
  • Agent Framework: agent-framework==1.0.0b260107

Steps to Reproduce

  1. Create a hosted agent following the documentation at https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/hosted-agents
  2. Use the sample Dockerfile pattern from the docs
  3. Deploy using client.agents.create_version() and az cognitiveservices agent start
  4. Deployment stays in "Starting" status indefinitely

Error

Portal shows only one line in deployment logs:

[ContainerProbesFailed] User Error Occurred - Container readiness probes failed.

Root Cause Found

The Dockerfile in documentation examples uses:

HEALTHCHECK CMD curl -f http://localhost:8088/ || exit 1

But the hosting adapter exposes /readiness endpoint, not /. Azure Container Apps probes /readiness.

Suggested Fix

  1. Update documentation to clarify that the hosting adapter provides /readiness and /health endpoints
  2. Update sample Dockerfiles to use:
HEALTHCHECK CMD curl -f http://localhost:8088/readiness || exit 1
  1. Document the expected health endpoints in the "Package code and test locally" section

Additional Issue: Container Log API Not Working

The documented REST API for viewing container logs returns UnsupportedAction:

Documented endpoint:

GET /agents/v2.0/.../containers/default:logstream?kind=console&tail=50

Response:

{"error":{"code":"UnsupportedAction","message":"The requested action 'agents/.../containers/default:logstream' is not supported"}}

This makes troubleshooting deployment failures very difficult as the only diagnostic information is the single-line error in the portal.

Related Documentation

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.