StructuredPart
@forge/monorepo / backend/src / StructuredPart
Type Alias: StructuredPart
StructuredPart =
PartBase<"structured"> &object
Defined in: backend/src/core/content-parts.ts:69
The validated answer of a structured agent — task #243.
Its own part rather than a TextPart holding JSON, for the reason the whole task exists: a consumer that
asked for structured output wants the object, and handing back text would leave every reader re-parsing it
and deciding for itself whether the parse succeeded. The part carries the value after validation, so its
presence is the guarantee — an agent whose model produced nothing conforming fails the run instead of
emitting this with something unchecked in it.
There is no partial form. A half-built object does not satisfy the schema the caller asked for, so streaming one would mean emitting values that violate the contract; the part is added once, complete, at the end of the turn. Tool calls still stream normally around it.
Type Declaration
value
readonlyvalue:unknown