Often times, when connecting to the Interactions endpoint for using deep research agents, the connection gets interrupted after exactly 10 minutes, and errors flow down the "EventStream” instead of events.
POST to https://generativelanguage.googleapis.com/v1beta/interactions?key=OMITTED with body:
{
"agent": "deep-research-preview-04-2026",
"input": "say hi",
"stream": true,
"background": true,
"store": true,
"agent_config": {
"type": "deep-research",
"thinking_summaries": "auto"
}
}
The output is an Event stream, here in all its entirety:
event: interaction.start
data: {"interaction":{"id":"...","status":"in_progress","object":"interaction","agent":"deep-research-preview-04-2026"},"event_type":"interaction.start"}
event: interaction.status_update
data: {"interaction_id":"...","status":"in_progress","event_type":"interaction.status_update"}
event: content.start
data: {"index":0,"content":{"type":"thought"},"event_type":"content.start"}
event: content.delta
data: {"index":0,"delta":{"content":{"text":"***Generating research plan***\n\n....","type":"text"},"type":"thought_summary"},"event_id":"v1_MF90aG91Z2h0XzE1","event_type":"content.delta"}
event: content.delta
data: {"index":0,"delta":{"content":{"text":"**Adapting Reporting Protocols**\n\n...","type":"text"},"type":"thought_summary"},"event_type":"content.delta"}
[{
"error": {
"code": 503,
"message": "The service is currently unavailable.",
"status": "UNAVAILABLE"
}
}
]
Note that the event: data: encoding is correct for the EventStream, while the last JSON array, with the 503 error just appears as TEXT within the response, at 10 minutes 0 seconds, and the connection is then interrupted.
This is a very confusing error, not documented, not expected, and also not happening all the times, probably ever 3-4 requests as of now.