Agent structured output

Created on 1 September 2025, 14 days ago

Problem/Motivation

Because we have the possibility to ask the AI provider to answer with structured output and because we have a way to transfer data from one agent to another without writing tokens in Add artifacts to agents Active , we should put both in use for the agent.

Sometimes the agent might need to produce JSON for the next agent to use or even in the future use a portion of the structured data to fill out a tool. In the future we also want it to be possible to add input parameters to agents, so they can take structured input.

To be able to do this, we need to start with the "simple" part, which is the structured output of an agent.

This means that you do not have to ask in the system prompt with examples on how to generate the output, but rather using the providers structured output.

Remaining tasks

  • Add two parameters to the agent config, called structured_output_enabled (bool) and structured_output_schema (string). Both nullable since we are adding them now.
  • Add it to the config schema.
  • On the agent form make it a checkbox that you can enable and disable.
  • On the agent add a long textarea where you can input a json schema. (At a later stage we can look into JS tools for json-schema)
  • Validate the json schema.
  • Store it all.
  • If its enabled during runtime, use the structured call functionality on the agent

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.2

Component

Code

Created by

🇩🇪Germany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024