Skip to main content

Image, Video & Speech Generation

Ask for a picture, a video or a spoken sentence and the result shows up in the chat by itself, as a card, whatever the model writes in its reply. Images and videos are generated in the background, so you can keep chatting while they render; every file is saved to your media library before anything reports success.

Turn it on

The agent gets a media tool only after you choose what it runs. A saved API key alone offers nothing, and no model is preselected.
  1. Open Settings → Model Service → Default Model. The cards Image Generation, Video Generation and Text-to-Speech each take a choice:
    • Image: one of 8 models from OpenAI, Google, Together AI, Stability AI and xAI.
    • Video: one of 6 providers: Google Veo, Qwen Wan, MiniMax Hailuo, xAI Grok, FAL.ai and Volcengine Seedance.
    • Speech: ElevenLabs or Volcengine Speech, with a model and a voice.
  2. Save the provider’s API key on the same card and press Test Connection.
  3. In the agent’s configuration panel, open Built-in Tools and switch on Image Generation, Video Generation or Text to Speech.
If something is missing, the panel says exactly what (“no image model is selected”, “no API key for the selected image provider”) and offers Open Settings and Recheck. A stored model that the catalog no longer lists, such as one its vendor has retired, counts as nothing chosen: the dropdown asks again and the agent loses the tool until you choose.

What you get in the chat

Images (image_tool)
  • A request makes 1 to 4 images, and each image is its own background task with a card: progress, Cancel task, Retry Task, and when it finishes, the picture with preview, download and an Edit this image action.
  • An edit takes one image and is answered in the same turn. It needs a model that can edit. With a mask, the picture keeps its original size, because a mask only fits an image of the same size; areas the mask makes transparent are regenerated.
  • Reference images can be earlier results, files in the workspace, or web addresses.
Videos (video_tool)
  • A request becomes one background task. The card shows progress with Cancel task and Retry Task, and plays the finished video in place.
  • Reference images and videos are read when the task starts, and the options offered follow what the chosen provider supports.
Speech (tts_generate)
  • The text is limited to 1,500 characters. The result is an audio player in the message, and it appears only once the audio is stored.
  • Voice replies on chat channels use the separate channel voice settings, see Voice Interaction.
The agent is told not to repeat a file’s address in its reply, because the card already shows the result. If it needs the result for a next step, it checks the task and can wait up to 90 seconds for it.

Where the files go

  • Media library. Each file is stored before a tool or task reports success. If it cannot be stored, the generation counts as failed instead of leaving a result without a file. Find your files on the Library page (/library).
  • Workspace copy. A real copy lands in _generated/ inside the agent’s workspace, named after the media, so the shell and file tools can open it. Editing the copy never touches the library’s original.
  • After 30 days. Task records are cleaned up after 30 days; the files stay in the media library, and an old card says so and links there.
  • After a restart. A task that was running when the app closed ends as a failed card (“Generation was interrupted because the app closed. You can retry it.”) and Retry Task starts it again.

Keys and privacy

Provider keys and gateway tokens are encrypted (AES-GCM) before a task is written to the local task database. When the server has no encryption key, they are stripped instead of stored in plain text.

What is not covered yet

  • No run against real provider accounts has finished an image, a video and a speech result from start to end. The card chain was exercised live in a browser with a local stand-in for the image and speech gateway, and with the real video provider answering a key it refuses.
  • The choice is narrower than some other agents: 8 image models, 6 video providers and 2 speech providers, and no music generation. See the media row of the competitor comparison.
  • Nothing is preselected, so a new install needs the Settings step above before the tools appear.
  • This guide covers the chat in the app. Sending generated files to chat-platform channels is not described here.

For developers

The engines live in the open-source harness and work without the product around them: ImageGenerator in myrm-agent-harness/src/myrm_agent_harness/toolkits/llms/image/generator.py, VideoGenerator in myrm-agent-harness/src/myrm_agent_harness/toolkits/llms/video/generator.py and AsyncTTSEngine in myrm-agent-harness/src/myrm_agent_harness/toolkits/llms/tts/generator.py. Each takes a media callback that stores the result and returns a stable reference; with one configured, a result that cannot be stored is a failed generation, and without one the provider’s result is returned as it came. The product layer adds the pieces you see in the chat: the three tools in myrm-agent-server/app/ai_agents/media_tools/, the rule that mounts a tool only after you chose its model (is_image_model_selected in myrm-agent-server/app/core/media/selection.py), the card that is registered from the tool’s own result (announce_result in myrm-agent-server/app/ai_agents/media_tools/result_announcement.py), the media library (create_media_persist_callback in myrm-agent-server/app/ai_agents/media_tools/media_persist.py) and the workspace copy (WorkspaceExporter in myrm-agent-server/app/ai_agents/media_tools/workspace_export.py).