Media offloading stores media in object storage instead of your database
August 24, 20261 min read
Media offloading moves images, audio, video, and files out of the session row and into object storage. By default, media on a run is persisted as base64 in the database, so a 113 KB JPEG becomes about 151,000 characters in the row. Set media_storage and the bytes go to object storage instead, leaving a small MediaReference with the key, bucket, mime type, size, and hash. That same JPEG drops to 2,897 characters.
The model still receives the media and history still replays it on later runs. Only the storage location changes, and there is no schema change. media_storage works the same on Agent, Team, and Workflow, across local, S3, and GCS backends, each with an async twin.
Configure it when you create an agent:
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.media.storage import S3MediaStorage
from agno.models.openai import OpenAIResponses
agent = Agent(
model=OpenAIResponses(id="gpt-5.5"),
db=SqliteDb(db_file="tmp/agent.db"),
media_storage=S3MediaStorage(bucket="my-bucket"),
)Learn more about media storage.


