Files the agent creates (preview)

[This article is prerelease documentation and is subject to change.]

An agent can create files during a conversation - for example, a report, a spreadsheet, an image, or a code snippet - as the outcome of the work the user requested. The agent surfaces each of these files back to the user so they can review or download it.

Note

Features in this article are powered by the GitHub Copilot harness, which uses Copilot Credits for usage-based billing. Learn more about Copilot Credits in Overview of billing for agents powered by the GitHub Copilot harness.

Usage-based billing applies to using, building, testing, and evaluating agents. These actions might consume Copilot Credits.

When an agent creates a file

An agent creates a file when the user's request naturally produces one. Common patterns include:

  • Generating a document, deck, or spreadsheet based on the conversation.
  • Producing a chart, diagram, or image from data the user provided.
  • Emitting a code file, script, or data extract that the user asked for.
  • Editing a file the user attached and returning an updated version.

You don't configure this behavior explicitly. When the agent needs to write a file to complete a turn, it produces one and includes it in the response.

How users see created files

At the end of the turn that produces a file, the agent's response includes a created file card below the message text. The card shows:

  • The file name and file type.
  • A preview or icon appropriate to the file type.
  • A Download action.

Created file cards appear in every surface where the agent runs:

  • The Preview tab in Copilot Studio, when you test the agent. Learn more in Test an agent.
  • Published channels such as Microsoft Teams, Microsoft 365 Copilot, and web chat. Each channel renders the card using its native attachment or file experience.

Users can reference a created file in a follow-up turn (for example, "make the chart taller" or "translate this into French"). The agent can read the file back and produce an updated version.

Retention and limits

Created files are stored with the conversation for the same period as user-attached files, so both the user and the agent can reference them across turns.

Item Limit
Size per created file 10 MB
Retention (per conversation) 28 days after the last activity in the conversation
Behavior when the size limit is exceeded The file isn't surfaced in the response. The turn continues, and the agent typically explains why the file wasn't produced.

If the agent's work would produce a file larger than 10 MB, ask the agent to split the output — for example, one deliverable per chapter of a long report — so that each individual file stays under the limit.

After the retention window elapses, created files are deleted from the conversation.