What the new build-time edge check accepts and rejects (integer into number, enum subsets, required keys, nulls, closed inferred objects, maps) and what still fails only at run time.
What changed in 1.15.0
ADK Java 1.15.0 was published on 18 November 2026. Among a large set of workflow changes, its release notes list "check workflow edges by assignability" (commit a0cc1dc, authored 6 November 2026) and a companion change that checks "an untyped enum on an edge as the number or boolean it spells". Together they move a class of workflow bugs from run time to graph construction: when a workflow graph is built, each edge whose source node declares an output schema and whose target node declares an input schema is checked, and a mismatch throws a WorkflowConfigurationException before any agent runs.
This guide explains what that check accepts and rejects, reproduces the rules in a small original Python checker so you can experiment with your own schemas, and lists what the build-time check deliberately does not see. The source for the rules is SchemaFit.java at tag v1.15.0, read directly; the companion checker follows its documented behaviour but is not a port of its code.
Why a build-time check matters for agent workflows
An agent workflow graph connects nodes: an LLM agent that classifies a help-desk case, a function node that computes a refund, a node that drafts a reply. Each edge passes the output of one node to the input of the next. When the shapes do not line up, the failure traditionally shows up deep in a run: a function node receives an object without the key it needs, or a string where it expected a number, after the model has already spent tokens on earlier steps.
Checking edges when the graph is built is the same idea as type-checking a program. It cannot prove the workflow correct, but it rejects graphs that cannot work for any input, and it does so in a unit test or at application start rather than in production.
The rules, one at a time
The class comment in SchemaFit.java summarises the check: an output schema fits an input schema "by types, enums, keys and nullability; it ignores formats, patterns and bounds". The details are worth knowing, because a few of them are not what you might guess.
- Widening is allowed, narrowing is not. An
integeroutput fits anumberinput. Anumberoutput does not fit anintegerinput, because the source may produce 2.5. - Enums must be subsets. A source that can only produce
damagedorlatefits a target that acceptsdamaged,lateorwrong_item. A source that can also produceotherdoes not fit a target that accepts onlydamagedandlate. A typed source with no enum, such as any string, does not fit a target with one. - Nulls must be accepted. A nullable output fits only an input that accepts null.
- Required keys must be guaranteed. Every key the target requires must also be required by the source, and declared by it if the target declares it.
- Extra keys depend on whether the target is closed. An object with an extra
reasonkey fits an open target object. It does not fit a target whose schema was inferred from a Java type, because such a target is treated as closed: it takes no keys other than the ones it lists. - Maps pass. An object output that lists no keys, such as a
Map<String, Object>, fits any object input, because the build cannot know which keys it will have. - Untyped enum values are read as what they spell. In a schema with an enum but no type, a value such as
"1"or"true"is checked as the integer or boolean it spells, and other text is checked as a string. A value with surrounding whitespace, such as" 1", must fit both ways.
The closed-object rule produces the most surprising errors in practice. When the target is a function node whose input schema ADK inferred from a Java class, the exception includes a hint for exactly this case: the schema "was inferred from the port's type and takes no other keys; set inputSchema on the builder or read the objects as Maps to accept them."
The worked example
The companion checker runs ten edges between refund records in a help-desk workflow. The refund node's output is an object with a required case_id string, an amount integer and a reason enum of damaged or late.
edge fits reason
integer into number yes types fit
number into integer no $: number does not fit integer
enum subset yes types fit
enum superset no $: source can produce ['other'] outside target enum
nullable into non-null no $: source may be null, target does not accept null
refund into wider open object yes object keys fit
refund into closed inferred record no $: closed target takes no key ['reason']
missing required key no $: target requires ['amount'], source does not guarantee them
map output into record input yes source object declares no keys (a map)
bounds ignored at build time yes types fitThe two refund rows show the closed-object rule. The same output fits a target that declares case_id and amount as an open object, and fails against the same properties when the target was inferred from a record type, because the output also carries reason.
The core of the check is short:
ttype = target.get('type')
if ttype is not None and ttype != stype and not (stype == 'integer' and ttype == 'number'):
return False, f'{path}: {stype} does not fit {ttype}'
if stype == 'object':
return _object_fits(source, target, closed, path)The model covers type, enum, nullable, items, properties and required. It does not model anyOf unions or the multiple readings of untyped enum strings, which the real class handles; those are documented in its source and worth reading before you rely on them.
What still fails at run time
A build-time schema check is only as complete as the schemas, and three gaps remain by design.
First, bounds, formats and patterns are ignored. The last row above passes: an integer output fits an input with minimum 1 and maximum 500. A refund node that computes 0 or 900 still fails when the value arrives. Validate values at the node that consumes them.
Second, edges without schemas on both ends are not checked. The graph builder skips any edge where the source has no output schema or the target has no input schema. An LLM agent node without an output schema produces free text, and nothing at build time can say whether the next node will be able to use it.
Third, maps pass. An output typed as a map fits any object input, so a node that returns Map<String, Object> can still omit a key the next node requires. If an edge matters, give the source a schema with declared keys.
Model outputs deserve particular care. A schema on an LLM agent's output tells the graph what the agent is supposed to produce; whether the model actually produces it is a run-time question, answered by structured output support and validation at the boundary. The edge check makes the declared contract consistent, not the model reliable.
Upgrading to 1.15.0
Graphs that built before may now fail to build. That is the intended effect, but it means the upgrade needs a pass over your workflows.
- Build every workflow graph in a test, so a schema mismatch fails CI rather than application start.
- For each new failure, read the two schemas in the exception message and decide which side is wrong. Often the source is wider than it needs to be, such as a number that is always whole, or an enum with a catch-all value.
- For closed-object failures on function nodes, either declare the extra key on the target type, set an explicit input schema that allows it, or read the input as a map if the node genuinely accepts anything.
- Add value checks for bounds inside nodes, since the edge check will not.
Tradeoffs
Strict build-time checks make workflows harder to change in small steps. Adding a value to an output enum now requires updating every downstream input that lists the enum, in the same change. That is usually what you want, because a downstream node that does not handle the new value is a bug, but it does mean schema changes need to be planned across the graph.
Closed inferred objects trade flexibility for safety. They catch a node silently receiving data it will drop, at the cost of rejecting harmless extra keys. The exception hint makes the escape routes explicit.
Verification
The companion checker has seven tests: widening is allowed and narrowing is not, enums must be subsets, a nullable source needs a nullable target, extra keys fit an open but not a closed target, required keys must be guaranteed, the build cannot see maps or bounds, and nested failures report their path. Run python -m unittest -v. It does not run ADK; check the behaviour of your own graphs against the library itself.
Run the example yourself
The original schema-fit checker, the ten refund edges and seven tests. It is not ADK code. Companion code on GitHub; its README lists the prerequisites, exact commands, expected output and limits.