Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/agent / / OutputSpec

Interface: OutputSpec<TOutput>

Defined in: packages/agent/src/types.ts:58

Output type specification.

Stable

Type Parameters

Type Parameter
TOutput

Properties

PropertyModifierTypeDescriptionDefined in
description?readonlystringOptional description shown to the model alongside the schema.packages/agent/src/types.ts:67
jsonSchema?readonlyReadonly<Record&lt;string, unknown&gt;>Wire-format JSON Schema advertised to the model: forwarded on ProviderRequest.outputType for adapters with native structured output, and embedded in the fallback JSON instruction appended as a trailing system message (the documented contract until adapters consume outputType natively - PS-24).packages/agent/src/types.ts:75
kindreadonly"text" | "structured"-packages/agent/src/types.ts:59
schema?readonly{ parse: TOutput; }Local validator (Zod-compatible { parse }) applied to the final model output on the completed path (AG-3). A parse failure fails the run with output-validation-failed - never a silent cast.packages/agent/src/types.ts:65
schema.parsepublicTOutput-packages/agent/src/types.ts:65