Skip to content

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

Description

@Yimin-Jin

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.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions