Skip to content

Support for structured outputs in agent loop and improvements in clients#466

Open
kubinio123 wants to merge 9 commits intomasterfrom
436-add-support-for-structured-outputs-in-agent-loop
Open

Support for structured outputs in agent loop and improvements in clients#466
kubinio123 wants to merge 9 commits intomasterfrom
436-add-support-for-structured-outputs-in-agent-loop

Conversation

@kubinio123
Copy link
Copy Markdown

@kubinio123 kubinio123 commented May 5, 2026

DONE:

  • Support for structured output in agent core:
    • Add ResponseSchema[T] for structured responses instead of plain text
    • Agent.runAs[T] returning AgentResult[Either[AgentParseError, T]]
    • Update the system prompt to instruct the model to call finish with a JSON payload matching the response schema
  • Utilities in clients:
    • Typed chat helpers for using structured output (tapir schemas + upickle)

I think this solves the #436.

However #206 is still a valid idea to explore; less explicit approach relying solely on meta programming. I think that can still be a subject to some POC 🤔

@kubinio123 kubinio123 linked an issue May 5, 2026 that may be closed by this pull request
@kubinio123 kubinio123 changed the title Support for structured outputs Support for structured outputs in agent loop and improvements in clients May 5, 2026
@kubinio123 kubinio123 marked this pull request as ready for review May 5, 2026 12:54
@kubinio123 kubinio123 requested a review from adamw May 5, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for structured outputs in Agent Loop

1 participant