microsoft-foundry / microsoft-foundry/foundry-samples
09-declarative-customer-support fails on code/zip deploy: PowerFx is not available (dotnet runtime not installed)
@brandom-msft is already working on this.
Since Aug 13, 2026.
- 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)
agent-framework-declarativepinspowerfx … ; python_version < "3.14". The default code runtime ispython_3_14, so thepowerfxpackage isn't installed at all.- 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
Dockerfileapt-get-installs .NET 10.
Repro
- Deploy as Code (Foundry Toolkit "Deploy Hosted Agent" → Code, or
agent.yamlwithcode_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)
- Force container: make the manifest/agent.yaml container-only + add an explicit "Code deploy unsupported (needs .NET)" note.
- Provide a code-friendly variant: port the routing to Python (
BaseAgent, plainif/else) so it deploys as code with no PowerFx/.NET. - Doc-only: prominently warn that code deploy will fail.
Environment
- Python 3.14 (default zip runtime);
agent-framework-declarative1.0.0rc2; deployed viaazd.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.