Text artifact
{
"name": "summary",
"parts": [{"type": "text", "text": "The weather is warm."}]
}UTF-8 string. Simplest. Use for prose responses, single-value results.
Advertisement
Data artifact
{
"name": "weather_data",
"parts": [{"type": "data", "data": {"temp_c": 28, "humidity": 75, "forecast": [...]}}]
}Arbitrary JSON. Use for structured results, forms, records. Server should include a schema URI in metadata.
Advertisement
File artifact — inline
{
"parts": [{
"type": "file",
"file": {
"name": "report.pdf",
"mimeType": "application/pdf",
"bytes": ""
}
}]
} Base64 payload. Suitable for files < 5MB. Larger = wire cost + memory pressure.