Skip to main content

present_public_file

Presents a public file as a downloadable card in the chat. Use this when a user asks for a file or when you want to offer a document for download. Requires the file to exist in the agent’s public data (uploaded via the Data → Public tab in the dashboard).

Parameters

Returns

On failure (file not in manifest, missing from storage, or presign error):
The agent can retry with the correct filename from available_public_files.

Examples

Offer a single document

Offer a document with context

Offer different files based on the user’s plan

Add a rule to your agent’s configuration:
The agent calls:

Call from your own custom tool

Notes

  • Only registered when the agent has at least one file in data_public.
  • Filenames are matched exactly (case-sensitive, including extension).
  • Download links are short-lived and expire automatically.
  • For binary files that should be shown inline rather than downloaded, use show_image. For displaying text file contents inline, use show_file_excerpt. For files generated at runtime, use surface_file.