Chat with the Flow agent
flow_agent_chatSend a message to Google Flow's agent (it plans, writes storyboards and generates images and videos with Flow's models in the account's Flow project) and get its answer. Without chatId a new chat starts; with chatId the message continues that chat (one turn at a time per chat). Images, videos, voices and characters go in as referenceImage_N / referenceVideo_1 / referenceAudio_N / character_N and are named in the message as @referenceImage_1… (find them with flow_upload_image, flow_list_assets, flow_list_voices and flow_list_characters; references must belong to the chat's account). Sending waits for Google to accept the turn (usually 3-40 s), then follows the agent up to ~50 s in all and returns chatId, turn, status (completed / waiting_approval / failed / running), the agent's text, its tool calls, media (referenceId + url) and a pending permission request. When status is running, call flow_agent_get_chat (chatId, wait: true, after: lastEventId) for the rest. Chatting is free; what the agent generates costs Flow credits (in ask mode it asks first). POST /agent/chats or POST /agent/chats/{chatId}/messages, then GET /agent/chats/{chatId}/stream.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | New chats only: the Google Flow account. When omitted, the account of the references, else one picked by the load balancer. | ||
| chatId | No | Continue this chat (from an earlier flow_agent_chat or flow_agent_list_chats). Omit to start a new chat. | |
| message | Yes | What you say to the agent, up to 20000 characters. May name references as @referenceImage_1, @referenceAudio_1, @character_1… | |
| projectId | No | New chats only: a Flow project id for the chat, instead of the account's own agent project. | |
| character_1 | No | A character: a reference id of the chat account's character (flow_list_characters). Name it @character_1 in the message to point the agent at it; unnamed, it is attached only. | |
| character_2 | No | A character: a reference id of the chat account's character (flow_list_characters). Name it @character_2 in the message to point the agent at it; unnamed, it is attached only. | |
| character_3 | No | A character: a reference id of the chat account's character (flow_list_characters). Name it @character_3 in the message to point the agent at it; unnamed, it is attached only. | |
| character_4 | No | A character: a reference id of the chat account's character (flow_list_characters). Name it @character_4 in the message to point the agent at it; unnamed, it is attached only. | |
| character_5 | No | A character: a reference id of the chat account's character (flow_list_characters). Name it @character_5 in the message to point the agent at it; unnamed, it is attached only. | |
| character_6 | No | A character: a reference id of the chat account's character (flow_list_characters). Name it @character_6 in the message to point the agent at it; unnamed, it is attached only. | |
| character_7 | No | A character: a reference id of the chat account's character (flow_list_characters). Name it @character_7 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceAudio_1 | No | A voice: a built-in voice name (Achird, Achernar, Algieba, Algenib, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Puck, Pulcherrima, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi) or a reference id of the chat account's custom voice (flow_list_voices). Name it @referenceAudio_1 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceAudio_2 | No | A voice: a built-in voice name (Achird, Achernar, Algieba, Algenib, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Puck, Pulcherrima, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi) or a reference id of the chat account's custom voice (flow_list_voices). Name it @referenceAudio_2 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceAudio_3 | No | A voice: a built-in voice name (Achird, Achernar, Algieba, Algenib, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Puck, Pulcherrima, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi) or a reference id of the chat account's custom voice (flow_list_voices). Name it @referenceAudio_3 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceAudio_4 | No | A voice: a built-in voice name (Achird, Achernar, Algieba, Algenib, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Puck, Pulcherrima, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi) or a reference id of the chat account's custom voice (flow_list_voices). Name it @referenceAudio_4 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceAudio_5 | No | A voice: a built-in voice name (Achird, Achernar, Algieba, Algenib, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Puck, Pulcherrima, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi) or a reference id of the chat account's custom voice (flow_list_voices). Name it @referenceAudio_5 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceImage_1 | No | An image: a reference id of the chat account's image (from flow_upload_image, flow_list_assets, or the media referenceId of an earlier agent turn). Name it @referenceImage_1 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceImage_2 | No | An image: a reference id of the chat account's image (from flow_upload_image, flow_list_assets, or the media referenceId of an earlier agent turn). Name it @referenceImage_2 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceImage_3 | No | An image: a reference id of the chat account's image (from flow_upload_image, flow_list_assets, or the media referenceId of an earlier agent turn). Name it @referenceImage_3 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceImage_4 | No | An image: a reference id of the chat account's image (from flow_upload_image, flow_list_assets, or the media referenceId of an earlier agent turn). Name it @referenceImage_4 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceImage_5 | No | An image: a reference id of the chat account's image (from flow_upload_image, flow_list_assets, or the media referenceId of an earlier agent turn). Name it @referenceImage_5 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceImage_6 | No | An image: a reference id of the chat account's image (from flow_upload_image, flow_list_assets, or the media referenceId of an earlier agent turn). Name it @referenceImage_6 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceImage_7 | No | An image: a reference id of the chat account's image (from flow_upload_image, flow_list_assets, or the media referenceId of an earlier agent turn). Name it @referenceImage_7 in the message to point the agent at it; unnamed, it is attached only. | |
| referenceVideo_1 | No | A video: a reference id of the chat account's video (from flow_list_assets type video, or the media referenceId of an earlier agent turn). Name it @referenceVideo_1 in the message to point the agent at it; unnamed, it is attached only. |