The File Object

FilesThe File Object

Your workflows make files from very different places: an email attachment, a generated image, synthesized speech, a parsed document. Inside the workflow, every one of them travels as the same thing: a file object.

What you will learn

Different payloads, identical package

A PDF, an image, and an audio clip arrive from different blocks, each delivered exactly the same way.

The fields never change

Every file object carries an I.D., a name, a URL where the bytes live, a size, a type, and the content, no matter which block made it.

Producers are swappable

Because every producer speaks the same format, you can change which one feeds an agent and the agent side never changes.

Consumers compose

The same object rides to any consumer, into an agent, out as an email attachment, or straight into storage.

The common shape

Catch a file mid-run and look inside: an I.D., a name, a URL where the bytes live, a size, a type, and the content itself. A couple more fields exist under the hood, but the shape never changes: which is exactly what lets a Gmail attachment, a generated image, and a text-to-speech clip all feed the same agent without special handling.

The video closes on this machine: one file object riding the whole chain:

Why one shape matters

Swap which producer feeds the agent, and nothing on the agent side changes. Point the same object at a different consumer, an email, cloud storage, another agent, and it just rides. In the closing machine, an invoice lands in Gmail, gets parsed, an agent extracts the fields, and the result settles in the database: one object carried the whole way through.

Common Questions

An I.D., a name, a URL where the bytes live, a size, a MIME type, and the content. A few internal fields exist under the hood, but the shape is the same for every file, whatever block made it.
Producers and consumers compose without special handling. You can swap which block feeds an agent, or point the same file at a different destination, and nothing else changes.
Through the Files field on the Agent block, usually referenced with a connection tag such as <file.files[0]>. The agent reads the document content directly.
Yes. An image from a generator, an audio clip from text-to-speech, and an email attachment all travel as the same object, so downstream blocks treat them identically.