microsoft-foundry / microsoft-foundry/foundry-samples

09-declarative-customer-support fails on code/zip deploy: PowerFx is not available (dotnet runtime not installed)

Open
#799 0 comments 0 reactions 8 assignees View on GitHub

@brandom-msft is already working on this.

Since Aug 13, 2026.

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

Description

Sample

samples/python/hosted-agents/agent-framework/responses/09-declarative-customer-support

Summary

The declarative workflow.yaml routes with Power Fx =... conditions (e.g. =Local.Triage.NeedsClarification). Evaluating them requires both the powerfx pip package and the .NET runtime. With a code/zip deployment neither is available, so every invoke fails:

PowerFx is not available (dotnet runtime not installed).
Expression '=Local.Triage.NeedsClarification' cannot be evaluated.
Install dotnet and the powerfx package for full PowerFx support.
Why it happens (two compounding causes)
  1. agent-framework-declarative pins powerfx … ; python_version < "3.14". The default code runtime is python_3_14, so the powerfx package isn't installed at all.
  2. The code/zip managed runtime has no .NET, and there's no way to install it (zip is pip-only). The container path works only because the Dockerfile apt-get-installs .NET 10.
Repro
  • Deploy as Code (Foundry Toolkit "Deploy Hosted Agent" → Code, or agent.yaml with code_configuration:), then invoke "My laptop won't turn on".
Verified A/B test
Deploy Runtime Result
Container (Dockerfile + .NET 10) py3.12 ✅ routes correctly ("Connecting you with technical support…")
Code/zip python_3_13 (powerfx installable) ❌ same PowerFx error

Using 3.13 isolates it: even with the powerfx pkg installable, code deploy still fails — confirming .NET is the hard blocker, so container is the only option today.

Impact

README says "requires a Docker based deployment", but the Toolkit/azd flows can pick Code, and nothing in the sample prevents it — users hit a runtime crash with no obvious cause.

Suggestions (pick one)
  1. Force container: make the manifest/agent.yaml container-only + add an explicit "Code deploy unsupported (needs .NET)" note.
  2. Provide a code-friendly variant: port the routing to Python (BaseAgent, plain if/else) so it deploys as code with no PowerFx/.NET.
  3. Doc-only: prominently warn that code deploy will fail.
Environment
  • Python 3.14 (default zip runtime); agent-framework-declarative 1.0.0rc2; deployed via azd.

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.