#7306·agno

[Feature Request] Add files /filename/file_id to session_state

Author: wildchronCreated Apr 2, 2026Updated Sep 29, 2026
Labelsgood first issuepriority: low

Problem Description

When you send file(s) within a run of an agent configured with send_media_to_model=False, the agent as no way to actually know that a file is available even though it will be in the context for further tool calling.

Exemple of use case is: I want the agent to perform excel operations on an xls file that is provided by the user during a conversation. These operation will be done with various tool call, so send_media_to_model=False (and store_media=True in my case) In this case, the agent has no way of knowing when I pass a file during a turn. I have to inform it with another run, or explicitely says it in the message.

One workaround is to build a pre_hook, detect file uploads, and add them to the session_state.

Proposed Solution

It would be nice to have some parameter to do this automatically, like add_file_ids_to_session_states. of course, in that case, only the ids should be passed to the following context

Alternatives Considered

No response

Additional Context

No response

Would you like to work on this?

  • Yes, I’d love to work on it!
  • I’m open to collaborating but need guidance.
  • No, I’m just sharing the idea.