Keeping external-tool fallback deterministic in Agent Framework workflows #7548
auxiliar-ag
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Microsoft Agent Framework gives teams explicit agents, tools, and workflow orchestration. One production boundary that still deserves its own contract is the handoff from a tool call to an external provider.
The model can select the correct function while the provider behind that function still returns an unusable result. A
200response may contain too few search results, incomplete page content, stale data, or fields that do not satisfy the workflow's schema.I have been using a three-part boundary for this:
This keeps provider-specific response formats out of the agent prompt and gives the workflow a stable result envelope.
What belongs in the task contract
A useful contract records:
satisfied,unsatisfied, andbudget_exceeded.The fallback router can then filter candidates instead of trying a static provider list. A provider should be attempted only when it supports the requested capability, has passed the relevant evaluation tasks, and fits the remaining budget.
Why deterministic validation matters
Asking the model whether its own tool result is valid mixes reasoning with enforcement. Schema checks, minimum-result requirements, URL validation, and budget accounting are more reliable as code-level workflow steps.
It also produces better traces. Instead of a generic tool exception, the workflow can preserve failure reasons such as
too_few_results,schema_mismatch, orstale_sources, plus the provider, latency, cost, and attempt number.We published the evaluation rules we use for this layer in a capability-first provider evaluation method, including fixed task corpora, grading, confidence handling, and versioning.
This is a framework pattern rather than a packaged Agent Framework integration. I would be interested in how others represent this boundary: middleware around tools, dedicated workflow nodes, or provider-specific agents?
Disclosure: I am affiliated with NativePort. This post was prepared with AI assistance and reviewed by a human for technical accuracy.
All reactions