Genkit JS API reference
Preparing search index...
genkit
beta
AgentOutputSchema
Variable AgentOutputSchema
Const
AgentOutputSchema
:
z
.
ZodObject
<
{
artifacts
:
z
.
ZodOptional
<
z
.
ZodArray
<
z
.
ZodObject
<
{
metadata
:
z
.
ZodOptional
<
z
.
ZodRecord
<
z
.
ZodString
,
z
.
ZodAny
>
>
;
name
:
z
.
ZodOptional
<
z
.
ZodString
>
;
parts
:
z
.
ZodArray
<
z
.
ZodUnion
<
[
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
>
,
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
...
;
data
?:
...
;
media
:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
{
custom
?:
...
;
data
?:
...
;
media
:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
>
,
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
:
...
;
toolResponse
?:
...
;
}
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
:
...
;
toolResponse
?:
...
;
}
,
>
,
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
:
...
;
}
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
:
...
;
}
,
>
,
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
>
,
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
{
custom
:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
>
,
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
>
,
z
.
ZodObject
<
(...)
&
(...)
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
,
>
,
]
,
>
,
"many"
,
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
(
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
:
{
contentType
?:
...
;
url
:
...
}
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
...
;
name
:
...
;
partial
?:
...
;
ref
?:
...
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
(...)
&
(...)
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
:
{
uri
:
...
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
}
,
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
(
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
:
{
contentType
?:
...
;
url
:
...
}
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
...
;
name
:
...
;
partial
?:
...
;
ref
?:
...
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
(...)
&
(...)
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
:
{
uri
:
...
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
}
,
>
,
"many"
,
>
,
>
;
error
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
details
:
z
.
ZodOptional
<
z
.
ZodAny
>
;
message
:
z
.
ZodString
;
status
:
z
.
ZodOptional
<
z
.
ZodString
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
details
?:
any
;
message
:
string
;
status
?:
string
}
,
{
details
?:
any
;
message
:
string
;
status
?:
string
}
,
>
,
>
;
finishReason
:
z
.
ZodOptional
<
z
.
ZodEnum
<
[
"stop"
,
"length"
,
"blocked"
,
"interrupted"
,
"other"
,
"unknown"
,
"aborted"
,
"detached"
,
"failed"
,
]
,
>
,
>
;
message
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
content
:
z
.
ZodArray
<
z
.
ZodUnion
<
[
z
.
ZodObject
<
{
custom
:
...
;
data
:
...
;
media
:
...
;
metadata
:
...
;
reasoning
:
...
;
resource
:
...
;
toolRequest
:
...
;
toolResponse
:
...
;
}
&
{
text
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
>
,
z
.
ZodObject
<
{
custom
:
...
;
data
:
...
;
metadata
:
...
;
reasoning
:
...
;
resource
:
...
;
text
:
...
;
toolRequest
:
...
;
toolResponse
:
...
;
}
&
{
media
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
:
{
contentType
?:
...
;
url
:
...
}
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
:
{
contentType
?:
...
;
url
:
...
}
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
>
,
z
.
ZodObject
<
{
custom
:
...
;
data
:
...
;
media
:
...
;
metadata
:
...
;
reasoning
:
...
;
resource
:
...
;
text
:
...
;
toolResponse
:
...
;
}
&
{
toolRequest
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
...
;
name
:
...
;
partial
?:
...
;
ref
?:
...
}
;
toolResponse
?:
undefined
;
}
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
...
;
name
:
...
;
partial
?:
...
;
ref
?:
...
}
;
toolResponse
?:
undefined
;
}
,
>
,
z
.
ZodObject
<
{
custom
:
...
;
data
:
...
;
media
:
...
;
metadata
:
...
;
reasoning
:
...
;
resource
:
...
;
text
:
...
;
toolRequest
:
...
;
}
&
{
toolResponse
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
(...)
&
(...)
;
}
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
(...)
&
(...)
;
}
,
>
,
z
.
ZodObject
<
{
custom
:
...
;
media
:
...
;
metadata
:
...
;
reasoning
:
...
;
resource
:
...
;
text
:
...
;
toolRequest
:
...
;
toolResponse
:
...
;
}
&
{
data
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
>
,
z
.
ZodObject
<
{
data
:
...
;
media
:
...
;
metadata
:
...
;
reasoning
:
...
;
resource
:
...
;
text
:
...
;
toolRequest
:
...
;
toolResponse
:
...
;
}
&
{
custom
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
{
custom
:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
>
,
z
.
ZodObject
<
{
custom
:
...
;
data
:
...
;
media
:
...
;
metadata
:
...
;
resource
:
...
;
text
:
...
;
toolRequest
:
...
;
toolResponse
:
...
;
}
&
{
reasoning
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
>
,
z
.
ZodObject
<
{
custom
:
...
;
data
:
...
;
media
:
...
;
metadata
:
...
;
reasoning
:
...
;
text
:
...
;
toolRequest
:
...
;
toolResponse
:
...
;
}
&
{
resource
:
...
}
,
"strip"
,
z
.
ZodTypeAny
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
:
{
uri
:
...
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
{
custom
?:
(...)
|
(...)
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
(...)
|
(...)
;
reasoning
?:
undefined
;
resource
:
{
uri
:
...
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
,
>
,
]
,
>
,
"many"
,
>
;
metadata
:
z
.
ZodOptional
<
z
.
ZodRecord
<
z
.
ZodString
,
z
.
ZodUnknown
>
>
;
role
:
z
.
ZodEnum
<
[
"system"
,
"user"
,
"model"
,
"tool"
]
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
content
:
(
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
:
{
contentType
?:
(...)
|
(...)
;
url
:
string
}
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
unknown
;
name
:
string
;
partial
?:
(...)
|
(...)
;
ref
?:
(...)
|
(...)
;
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
{
name
:
...
;
output
?:
...
;
ref
?:
...
}
&
{
content
?:
...
;
}
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
string
,
any
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
:
{
uri
:
string
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
,
{
content
:
(
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
:
{
contentType
?:
(...)
|
(...)
;
url
:
string
}
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
unknown
;
name
:
string
;
partial
?:
(...)
|
(...)
;
ref
?:
(...)
|
(...)
;
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
{
name
:
...
;
output
?:
...
;
ref
?:
...
}
&
{
content
?:
...
;
}
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
string
,
any
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
:
{
uri
:
string
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
,
>
,
>
;
sessionId
:
z
.
ZodOptional
<
z
.
ZodString
>
;
snapshotId
:
z
.
ZodOptional
<
z
.
ZodString
>
;
state
:
z
.
ZodOptional
<
z
.
ZodObject
<
{
artifacts
:
z
.
ZodOptional
<
z
.
ZodArray
<
z
.
ZodObject
<
{
metadata
:
z
.
ZodOptional
<
z
.
ZodRecord
<
(...)
,
(...)
>
>
;
name
:
z
.
ZodOptional
<
z
.
ZodString
>
;
parts
:
z
.
ZodArray
<
z
.
ZodUnion
<
(...)
>
,
"many"
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
metadata
?:
Record
<
(...)
,
(...)
>
;
name
?:
string
;
parts
:
(...)
[]
}
,
{
metadata
?:
Record
<
(...)
,
(...)
>
;
name
?:
string
;
parts
:
(...)
[]
}
,
>
,
"many"
,
>
,
>
;
custom
:
z
.
ZodOptional
<
z
.
ZodAny
>
;
messages
:
z
.
ZodOptional
<
z
.
ZodArray
<
z
.
ZodObject
<
{
content
:
z
.
ZodArray
<
z
.
ZodUnion
<
(...)
>
,
"many"
>
;
metadata
:
z
.
ZodOptional
<
z
.
ZodRecord
<
(...)
,
(...)
>
>
;
role
:
z
.
ZodEnum
<
[
(...)
,
(...)
,
(...)
,
(...)
]
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
content
:
(...)
[]
;
metadata
?:
Record
<
(...)
,
(...)
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
,
{
content
:
(...)
[]
;
metadata
?:
Record
<
(...)
,
(...)
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
,
>
,
"many"
,
>
,
>
;
sessionId
:
z
.
ZodOptional
<
z
.
ZodString
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
artifacts
?:
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
((...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...))
[]
;
}
[]
;
custom
?:
any
;
messages
?:
{
content
:
(
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
[]
;
sessionId
?:
string
;
}
,
{
artifacts
?:
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
((...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...))
[]
;
}
[]
;
custom
?:
any
;
messages
?:
{
content
:
(
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
[]
;
sessionId
?:
string
;
}
,
>
,
>
;
}
,
"strip"
,
z
.
ZodTypeAny
,
{
artifacts
?:
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
(
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
:
{
contentType
?:
(...)
|
(...)
;
url
:
string
}
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
unknown
;
name
:
string
;
partial
?:
(...)
|
(...)
;
ref
?:
(...)
|
(...)
;
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
{
name
:
...
;
output
?:
...
;
ref
?:
...
}
&
{
content
?:
...
;
}
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
string
,
any
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
:
{
uri
:
string
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
}
[]
;
error
?:
{
details
?:
any
;
message
:
string
;
status
?:
string
}
;
finishReason
?:
|
"length"
|
"aborted"
|
"unknown"
|
"failed"
|
"stop"
|
"blocked"
|
"interrupted"
|
"other"
|
"detached"
;
message
?:
{
content
:
(
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
:
{
contentType
?:
string
;
url
:
string
}
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
unknown
;
name
:
string
;
partial
?:
boolean
;
ref
?:
string
;
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
{
name
:
string
;
output
?:
unknown
;
ref
?:
(...)
|
(...)
}
&
{
content
?:
(...)
[]
;
}
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
string
,
any
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
:
{
uri
:
string
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
;
sessionId
?:
string
;
snapshotId
?:
string
;
state
?:
{
artifacts
?:
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
(
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
)
[]
;
}
[]
;
custom
?:
any
;
messages
?:
{
content
:
(
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
[]
;
sessionId
?:
string
;
}
;
}
,
{
artifacts
?:
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
(
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
:
{
contentType
?:
(...)
|
(...)
;
url
:
string
}
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
unknown
;
name
:
string
;
partial
?:
(...)
|
(...)
;
ref
?:
(...)
|
(...)
;
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
{
name
:
...
;
output
?:
...
;
ref
?:
...
}
&
{
content
?:
...
;
}
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
string
,
any
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
(...)
,
(...)
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
(...)
,
(...)
>
;
reasoning
?:
undefined
;
resource
:
{
uri
:
string
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
}
[]
;
error
?:
{
details
?:
any
;
message
:
string
;
status
?:
string
}
;
finishReason
?:
|
"length"
|
"aborted"
|
"unknown"
|
"failed"
|
"stop"
|
"blocked"
|
"interrupted"
|
"other"
|
"detached"
;
message
?:
{
content
:
(
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
:
string
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
:
{
contentType
?:
string
;
url
:
string
}
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
:
{
input
?:
unknown
;
name
:
string
;
partial
?:
boolean
;
ref
?:
string
;
}
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
:
{
name
:
string
;
output
?:
unknown
;
ref
?:
(...)
|
(...)
}
&
{
content
?:
(...)
[]
;
}
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
:
Record
<
string
,
any
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
:
string
;
resource
?:
undefined
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
|
{
custom
?:
Record
<
string
,
unknown
>
;
data
?:
unknown
;
media
?:
undefined
;
metadata
?:
Record
<
string
,
unknown
>
;
reasoning
?:
undefined
;
resource
:
{
uri
:
string
}
;
text
?:
undefined
;
toolRequest
?:
undefined
;
toolResponse
?:
undefined
;
}
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
;
sessionId
?:
string
;
snapshotId
?:
string
;
state
?:
{
artifacts
?:
{
metadata
?:
Record
<
string
,
any
>
;
name
?:
string
;
parts
:
(
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
)
[]
;
}
[]
;
custom
?:
any
;
messages
?:
{
content
:
(
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
:
...
;
resource
?:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
|
{
custom
?:
...
;
data
?:
...
;
media
?:
...
;
metadata
?:
...
;
reasoning
?:
...
;
resource
:
...
;
text
?:
...
;
toolRequest
?:
...
;
toolResponse
?:
...
;
}
)
[]
;
metadata
?:
Record
<
string
,
unknown
>
;
role
:
"system"
|
"user"
|
"model"
|
"tool"
;
}
[]
;
sessionId
?:
string
;
}
;
}
,
>
Schema for output returned at turn completion.
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Genkit JS API reference
Loading...
Schema for output returned at turn completion.