Repository navigation
Invoking Workflows with AG-UI without being model driven #9559
|
I just started using MAF a few days ago, but am somewhat stuck and my use-case seems nowhere covered. I made a simple workflow (for staring) with two Executors, one fetches data, the other evaulates it and gives a reply using a LLM model. The first executor is a simple retriever who gets a model with 2 ids and fetches the data and pass it to the 2nd one. Later it should be integrated into a bigger workflow (fetching multiple objects and run this 2 as sub workflow, aggregate the results and do a final answer/summary/evaluation). But with testing, I'm stuck. I can't find a good way to start this workflow with a fixed json payload (that I know in advance, i.e. from an "Evaluate" button on a page). I "hack" something around using AdditionalProperties and fetch these on the backend (ASP.NET Core) and run the workflow. That works more or less. But, when I want to do a follow-up (i.e. user asking certain aspects of the evaluation), the whole workflow gets executed again instead of using the already fetched and evaluated data as continuation. I have storge configured and stuff, but feel stuck here. Most stuff I find is about configuring model driven workflows (which start with a prompt, rather than a json payload), so I'm at a complete loss. Anyone can point me to some documentation or wh at the proper approach is? |
Replies: 1 comment 1 reply
|
you can pass the json as typed input to for ag-ui, i'd put an adapter in front with an explicit action field:
the state sample shows reading |
you can pass the json as typed input to
InProcessExecution.RunAsyncinMicrosoft.Agents.AI.Workflows1.25.0, matching your first executor's input typefor ag-ui, i'd put an adapter in front with an explicit action field:
evaluate: run the workflow and save the fetched data/evaluationfollowup: load that saved context and call the chat agent without rerunning retrievalthe state sample shows reading
RunAgentInput.Statebefore delegation. storage alone won't choose that branch. the workflow-as-agent sample reruns the workflow even with the same session