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-declarative pins powerfx … ; python_version < "3.14". The default code runtime is python_3_14, so the powerfx package 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
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)
- 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, plain if/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-declarative 1.0.0rc2; deployed via azd.
Sample
samples/python/hosted-agents/agent-framework/responses/09-declarative-customer-supportSummary
The declarative
workflow.yamlroutes with Power Fx=...conditions (e.g.=Local.Triage.NeedsClarification). Evaluating them requires both thepowerfxpip package and the .NET runtime. With a code/zip deployment neither is available, so every invoke fails: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.Dockerfileapt-get-installs .NET 10.Repro
agent.yamlwithcode_configuration:), then invoke "My laptop won't turn on".Verified A/B test
Using 3.13 isolates it: even with the
powerfxpkg 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)
BaseAgent, plainif/else) so it deploys as code with no PowerFx/.NET.Environment
agent-framework-declarative1.0.0rc2; deployed viaazd.