Add schema-aware custom-agent outputs#3684
Merged
DavidBakerEffendi merged 7 commits intoMay 27, 2026
Merged
Conversation
DavidBakerEffendi
deleted the
3683-support-schema-constrained-custom-agent-outputs
branch
May 27, 2026 15:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an explicit
callCustomAgentWithSchemapath for schema-constrained child agents while preserving legacycallCustomAgentbehavior. The child agent validates schemas, runs its normal tool loop, and makes one final structured-answer call when a schema is supplied.The schema-aware tool no longer depends on the parent model copying a large schema object exactly. It accepts a full schema object, a schema name string, or a partial
{name, schema:{}}reference, then resolves the full validated schema from the parent task text before dispatch.Key Changes:
CustomAgentExecutor,CustomAgentTools, andParallelCustomAgent.callCustomAgentWithSchemaexposure on model JSON-schema support and kept schema-aware child failures as hard failures.SearchAgentrun read-only custom-agent batches throughParallelCustomAgent, including schema-aware specialist flows.Touch Points:
app/src/main/java/ai/brokk/agents/ArchitectAgent.javaapp/src/main/java/ai/brokk/agents/LutzAgent.javaapp/src/main/java/ai/brokk/agents/SearchAgent.javaapp/src/main/java/ai/brokk/executor/agents/CustomAgentExecutor.javaapp/src/main/java/ai/brokk/executor/agents/CustomAgentResponseSchemaResolver.javaapp/src/main/java/ai/brokk/executor/agents/CustomAgentTools.javaapp/src/main/java/ai/brokk/executor/agents/ParallelCustomAgent.javaapp/src/main/java/ai/brokk/mcpserver/BrokkExternalMcpServer.javaapp/src/test/java/ai/brokk/agents/SearchAgentTest.javaapp/src/test/java/ai/brokk/executor/agents/CustomAgentExecutorTest.javaapp/src/test/java/ai/brokk/executor/agents/ParallelCustomAgentTest.javaSummary
callCustomAgentpath unchanged.Testing
./gradlew :app:test --tests ai.brokk.executor.agents.ParallelCustomAgentTest --tests ai.brokk.executor.agents.CustomAgentExecutorTest --tests ai.brokk.agents.SearchAgentTest --tests ai.brokk.agents.LutzAgentTest./gradlew fix tidy./gradlew analyze