From 1493dbbe8ff1f861facc19778e2597b106cf8924 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 9 Feb 2026 20:39:59 +0100 Subject: pkg/aflow: make it possible for LLMAgent to return only structured outputs In some cases there may be not final text reply, only some structured outputs (e.g. some bool). Don't require final reply, if structured outputs are specified. --- .../TestOnlyStructuredOutputs.trajectory.json | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 pkg/aflow/testdata/TestOnlyStructuredOutputs.trajectory.json (limited to 'pkg/aflow/testdata/TestOnlyStructuredOutputs.trajectory.json') diff --git a/pkg/aflow/testdata/TestOnlyStructuredOutputs.trajectory.json b/pkg/aflow/testdata/TestOnlyStructuredOutputs.trajectory.json new file mode 100644 index 000000000..ec0d9aba7 --- /dev/null +++ b/pkg/aflow/testdata/TestOnlyStructuredOutputs.trajectory.json @@ -0,0 +1,85 @@ +[ + { + "Seq": 0, + "Nesting": 0, + "Type": "flow", + "Name": "test", + "Started": "0001-01-01T00:00:01Z" + }, + { + "Seq": 1, + "Nesting": 1, + "Type": "agent", + "Name": "smarty", + "Model": "model", + "Started": "0001-01-01T00:00:02Z", + "Instruction": "Instructions\n\nUse set-results tool to provide results of the analysis.\nIt must be called exactly once before the final reply.\nIgnore results of this tool.\n", + "Prompt": "Initial Prompt" + }, + { + "Seq": 2, + "Nesting": 2, + "Type": "llm", + "Name": "smarty", + "Model": "model", + "Started": "0001-01-01T00:00:03Z" + }, + { + "Seq": 2, + "Nesting": 2, + "Type": "llm", + "Name": "smarty", + "Model": "model", + "Started": "0001-01-01T00:00:03Z", + "Finished": "0001-01-01T00:00:04Z" + }, + { + "Seq": 3, + "Nesting": 2, + "Type": "tool", + "Name": "set-results", + "Started": "0001-01-01T00:00:05Z", + "Args": { + "Result": 42 + } + }, + { + "Seq": 3, + "Nesting": 2, + "Type": "tool", + "Name": "set-results", + "Started": "0001-01-01T00:00:05Z", + "Finished": "0001-01-01T00:00:06Z", + "Args": { + "Result": 42 + }, + "Results": { + "Result": 42 + } + }, + { + "Seq": 1, + "Nesting": 1, + "Type": "agent", + "Name": "smarty", + "Model": "model", + "Started": "0001-01-01T00:00:02Z", + "Finished": "0001-01-01T00:00:07Z", + "Results": { + "Result": 42 + }, + "Instruction": "Instructions\n\nUse set-results tool to provide results of the analysis.\nIt must be called exactly once before the final reply.\nIgnore results of this tool.\n", + "Prompt": "Initial Prompt" + }, + { + "Seq": 0, + "Nesting": 0, + "Type": "flow", + "Name": "test", + "Started": "0001-01-01T00:00:01Z", + "Finished": "0001-01-01T00:00:08Z", + "Results": { + "Result": 42 + } + } +] \ No newline at end of file -- cgit mrf-deployment