Skip to main content

Interface: StructuredReplySpec

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:18

Properties​

description?​

optional description: string

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:25


maxRetries?​

optional maxRetries: number

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:27

Repair rounds after a reply that does not match. Default 2, clamped to 0..5.


name?​

optional name: string

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:24

Named in the instruction and in the output's meta. Default "reply".


onExhausted?​

optional onExhausted: "error" | "return_invalid"

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:29

When every attempt failed: end the turn with GMI_STRUCTURED_OUTPUT_INVALID, or return the last reply with meta.valid: false. Default error.


schema?​

optional schema: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | JsonSchemaObject

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:20

A Zod schema, or a JSON Schema object. One of schema and schemaRef is required.


schemaRef?​

optional schemaRef: string

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:22

The key of a schema in AgentOSConfig.structuredSchemas, resolved before the turn.


streamDeltas?​

optional streamDeltas: boolean

Defined in: packages/agentos/src/api/runtime/structuredReply.ts:31

Stream the model's text deltas on a structured turn. Default false: the caller sees nothing before the check.