Replies: 1 comment 3 replies
-
|
There are complexities around Magentic + AG-UI due to the internal state that is part of the ledger/inner-loop/outer-loop. As an aside from using it with AG-UI, once the magentic loop is done, that's why we've included the check that you saw:
Could you please help us understand the scenarios where you'd want to resume a previously completed magentic task with something new? |
Beta Was this translation helpful? Give feedback.
3 replies
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.
-
Summary
We are trying to build a multi-turn chat experience using the Magentic orchestration pattern exposed through an AG-UI endpoint. After testing and investigation, it appears that Magentic does not support multi-turn conversation in the same way that Handoff does, and we want to confirm whether this is by design or a gap.
Environment
agent-framework-core1.x (Python)agent-framework-ag-uiagent-framework-orchestrationsWhat we observe
With Handoff workflow — works correctly
After each agent turn,
RUN_FINISHEDcontains aninterruptarray:{ "type": "RUN_FINISHED", "threadId": "...", "runId": "...", "interrupt": [{ "id": "366a9397-...", "value": { "agent_response": { ... } } }] }The next user turn is sent as a resume payload referencing that interrupt ID, and the workflow continues correctly.
With Magentic workflow — fails on second turn
RUN_FINISHEDemits no interrupt array. Sending a second user message (with a newrun_id, samethread_id) immediately fails with:Root cause hypothesis
The Handoff pattern's multi-turn support is powered by
HandoffAgentUserRequest: when an agent completes its turn without requesting a handoff, the workflow pauses, emits an interrupt, and waits for the next user message. Magentic has no equivalent mechanism — it is designed around single-task completion and marks itself done after one full execution cycle.This means:
MagenticBuilderdoes not function as a conversational memory store across turns — it only serves plan review and mid-run resume (e.g.enable_plan_review=True).Questions for the team
checkpoint_storageinMagenticBuilderserve any purpose beyond plan review and mid-run recovery? Does it persist agent thread history across completed runs?Why this matters
Magentic is the only orchestration pattern that handles mixed-intent questions well (e.g. "Deploy my React app to App Service — I'm getting this container startup error", which spans both Azure product knowledge and coding). Handoff's routing model forces a question into a single agent's domain, causing loops on mixed-intent input.
A pattern that can handle both multi-turn chat and mixed-intent delegation would be ideal. Right now these two requirements appear to require different patterns with no single solution.
Related
agent-framework-ag-ui(Foundry project endpoint) #5941 — multi-turn tool calls fail via AG-UI (Python, Foundry endpoint)with_plan_reviewin Magentic + AG-UI errorsBeta Was this translation helpful? Give feedback.
All reactions