Voice notes and media
Your agent can read the photos, files and voice notes people send it, and it can send files, images, video and voice notes back. This page covers what to configure and what the agent can then do. The CLI and API equivalents are on Send and download attachments and Video and image quality.
What the agent receives
The agent only downloads attachments from messages it is allowed to answer. Messages it ignores are never downloaded or transcribed. See Which chats the agent answers.
| Attachment | What the agent gets |
|---|---|
| Image | The file path, and the image itself for the model to look at |
| File | The file path |
| Video | The file path |
| Voice note | A transcript added to the message, when transcription is set up |
| Channels post card | The post’s publisher, description and length, and its cover image |
Voice transcription uses OpenClaw’s media-understanding setup, so set up a transcription provider in OpenClaw. The transcript appears in the message as [Voice transcript: ...]. If transcription fails or isn’t set up, the message says [Voice transcription unavailable] and the audio file stays available.
The agent downloads a Channels video only when it asks for it. The cover image is available without downloading the video.
Tools the agent can call
| Tool | Use |
|---|---|
wechat_media | Download an attachment from this chat, or a Channels video. Use quality to pick a copy. Images are shown to the model. |
wechat_message | Look up a message. Media is described, not downloaded. |
wechat_archive_media | Download media from any chat. Only available if you grant the archive tools. See Agent tools. |
wechat_media accepts these quality values: best (the default), original, standard, thumbnail, normal (video) and encoded (voice). Explicit values are strict, so a copy that isn’t available returns an error instead of a substitute. A pending result means a download has started; ask again later. Downloads need the token’s media scope. See the tool reference for every parameter.
A sandboxed agent, such as one whose shell runs over SSH, can’t open files that the media tools download. The tool result says so with reachableFromSandbox: false instead of giving a path. Attachments that arrive with the message still reach a sandboxed agent.
What the agent sends
The agent sends attachments through its normal message tool, with a media field:
| What the agent sends | Result |
|---|---|
| An image | Original quality. JPEGs keep their source bytes; other formats become full-resolution JPEGs. |
A file, with asDocument: true (or forceDocument) | The file, unchanged, as a file attachment |
| Ordinary audio | A file attachment |
Audio, with audioAsVoice: true | A voice note |
A video, with channelData set to {"agent-wechat": {"videoQuality": "original"}} | The playback copy and the unchanged original |
Video quality accepts normal or original, and each video send needs exactly one attachment. Video quality doesn’t combine with document mode.
If a send comes back needs_review, the agent should inspect that send rather than send the file again. Sends use stable idempotency keys, so a retry after a lost response doesn’t send twice.
Settings
| Setting | Effect |
|---|---|
channels.agent-wechat.mediaMaxMb | Largest attachment the plugin will send, from 1 to 1024 MB. The default is 50 MB. |
The plugin uses the smaller of mediaMaxMb and the size limit for the kind of send. Raising mediaMaxMb can’t go past the daemon’s limits. For a 512 MB file, set it to 512. See OpenClaw configuration for the other keys.