ItemType
type ItemType<TData> = { agent?: { render?: (data) => string | undefined; }; data: TData; description?: string; id: string; name: string;};Defined in: item/item.types.ts:8
A registered kind of conversation item (see promptOutputItemSchema): the
schema its data must satisfy, plus how it is presented. Follows the same
registry pattern as EntityType and ProviderType.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TData extends z.ZodType |
z.ZodType |
Properties
Section titled “Properties”agent?
Section titled “agent?”optional agent?: { render?: (data) => string | undefined;};Defined in: item/item.types.ts:18
How items of this type are exposed to the agent. Omit it for presentation-only artifacts (e.g. UI widgets): those stay in the transcript for hosts and UIs to consume, but never enter the model’s context.
render?
Section titled “render?”optional render?: (data) => string | undefined;Render an item of this type into the model’s context. Return undefined
to keep a specific item out even though the type is exposed. Omit to use
the default rendering (a name-labelled JSON dump).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
z.infer<TData> |
Returns
Section titled “Returns”string | undefined
data: TData;Defined in: item/item.types.ts:12
description?
Section titled “description?”optional description?: string;Defined in: item/item.types.ts:11
id: string;Defined in: item/item.types.ts:9
name: string;Defined in: item/item.types.ts:10