Jian/ Docs

Files, images, and voice

How attachments become model context and how generated media reaches a conversation.

Attach a file to a conversation or receive one through a supported messaging channel. The gateway stores media with an ID and prepares readable content for the agent. Media processing depends on the file type and configured models.

What the agent receives

AttachmentPreparation
ImageDirect visual input when supported by the conversation model; otherwise an analysis-model description
Voice note or audioTranscription/analysis according to configured audio support
PDFExtracted or model-readable document content
Modern Word, Excel, PowerPoint, OpenDocumentExtracted text; spreadsheets become per-sheet tabular text
Text, source code, CSV, JSON, MarkdownText content
Unsupported binary, archive, legacy Office format, videoStored attachment metadata; not a promise of automatic content analysis

Document extraction can be truncated at roughly 100,000 characters. If exact detail matters, ask the agent to inspect the relevant part or save and process the attachment with suitable tools. Text extraction does not preserve every visual detail of a designed document.

Models for media

Settings → Model defaults separates conversation, compaction, image analysis, image generation, audio analysis, and speech. Connecting a chat provider alone does not mean every media activity has a usable model.

analyze_media lets the agent ask a specific follow-up question about supported media. An image or PDF needing close inspection should not be answered from a guessed filename.

Generating and sending

The agent can use generate_image for requested images, generate_speech for requested audio, and send_file for an existing media ID, workspace path, or generated text content. Speech voices are provider-specific; the agent can list them before choosing one.

To create a PDF, document, spreadsheet, or presentation, an agent can use appropriate libraries in its workspace, then send the resulting file. A Markdown answer and an actual .docx attachment are different deliverables.

Normal files are limited to 16 MB each. Remote worker transfers have a much smaller transport budget and should not be confused with normal media uploads.

Delivery is a separate result

Generated media is queued to the target conversation. On WhatsApp or Telegram, channel delivery can fail after generation succeeded. Inspect delivery status before treating the recipient as having received it.

A draft composer keeps its text across navigation, but attached files are not persisted with that draft. Reattach them if you leave before sending and they are no longer present.

Implementation reference

Media processing and tool guidance.

On this page