> For the complete documentation index, see [llms.txt](https://docs.lleverage.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lleverage.ai/run-operations/agent/agent-context/file-handling.md).

# Files

Use files as Agent inputs, evidence and outputs, and understand where session files fit relative to durable Project knowledge.

Files can be part of the work going into a session or the concrete output coming back from it.

The Agent can read supported files, extract and compare information, transform data and create new files as the result of a task.

## Add files where the work happens

Attach relevant material in the session and describe the outcome you need.

Point to the relevant page, sheet, columns or section when that helps narrow the task.

## Files can play different roles

A file may be:

* **Input** — material the Agent needs to process;
* **Evidence** — material used to establish or verify what happened;
* **Output** — a file created as the result of the work.

The role matters when sources disagree. An uploaded spreadsheet may be useful evidence without outranking the current ERP record.

## Inspect generated files

When the Agent creates files, the session's Files area gives you a dedicated place to open them.

For important work, inspect the actual output rather than relying only on the Agent's summary. Check the rows, values, formulas, document sections or other result that matters.

## Inline results and HTML artefacts

Not every result needs to become a separate file.

Compact HTML summaries can appear directly in the conversation as in-stream widgets. Richer outputs with more space or interaction—such as multi-section reports, tabs or dashboard-like views—can be created as HTML artefacts and opened in Lleverage's sandboxed preview.

![Static inline HTML output compared with a richer interactive HTML file preview.](https://3370306531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlgSglJDQZxDZdn20CUcl%2Fuploads%2FN5YrKFgx81Wv1TFYTkTR%2Fhtml-output-comparison.png?alt=media)

## Session files are not automatically maintained knowledge

A file appearing in a session does **not** automatically become maintained Project knowledge or a governed source of truth.

If information should be reusable across future work, move it into the appropriate maintained Project surface, such as Knowledge, a Table, Project Files, a Skill or the underlying business system.

If a required file is missing, the Agent should ask for it rather than inventing the absent evidence.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lleverage.ai/run-operations/agent/agent-context/file-handling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
