Skip to main content
Version: v1.7.5

Agent files

Overview​

When an agent runs during a chat session, it can produce output files such as generated reports, data exports, code outputs, or PDF summaries. These are collectively called agent files.

Where agent files live​

While an agent runs, it writes files to a sandboxed server-side working directory. h2oGPTe stores most of those files with the chat session.

Stored files​

Stored files persist as long as the message remains in the chat session. They appear in the Files tab of the agent response's right panel, which lists the files stored for the chat session.

Each run's primary output appears there, such as a CSV or a code file. The same files appear under every agent response in the chat.

When the agent produces a file and a PDF rendering of it, the tab lists the source file and shows the PDF as its preview. A PDF that shares no name with another file gets its own entry in the list.

Files the agent stores during a run appear when the run finishes. You don't need to reopen the panel.

Every stored file also appears in the Documents section, where the Source Chat column shows which chat session produced it. See Find the source chat of a Document.

Two kinds of files never appear in the tab:

  • Files whose names begin with a dot.
  • Files that would take you over your document limit or agent document limit. h2oGPTe doesn't store these files. See Limit settings.
note

Only you see the stored files from agents you run. Anyone else who views the chat, including through a shared link, sees only the output files of each response, and only when the share includes them (see Share a Chat session). Importing an agent file into a collection adds a copy to that collection and leaves the original file in place.

Manage stored files with the REST API​

The REST API lists the same stored files as the Files tab. Its listing also includes files whose names begin with a dot. To list or delete the stored files for a chat session, use these endpoints:

  • GET /api/v1/chats/{session_id}/agent_server_files: list the agent files stored for the chat session
  • DELETE /api/v1/chats/{session_id}/agent_server_files: delete every agent file stored for the chat session
warning

DELETE removes the files permanently. They no longer appear in the Files tab or on the Documents page.

For full API details, see the REST API guide.

Working with stored files in the chat UI​

Open the right panel by clicking Details on an agent response, then click the Files tab. For each file action, see File actions.

Permissions​

Working with agent files requires the Manage agent files permission. See Roles and Permissions for details.


Feedback