> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the SDK. To install or publish skills from a terminal, use the `aireg` CLI; `aireg --map json` prints its command map. The `atlanai` CLI is deprecated. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.
> These docs cover Atlan AI Registry, Atlan's hosted product. The AI registry specification and aireg CLI are maintained separately. /open-source lists publicly reachable signed installers and explains that the source repository and hosted CLI reference currently require GitHub access. Do not claim the repository or its reference docs are publicly accessible. Use these docs for Atlan-specific setup such as the adapter, sign-in and workspaces.

# Save outputs to the Library

> Record the documents, pages, and files your agents produce as outputs, keep their versions, and find them in the Library.

An output is a deliverable a run produced, such as a document, a page, or a file, recorded with the agent and session that made it. Save outputs so your team can find every result in one place and trace each one back to the run behind it.

## What an output holds

| Part | Meaning |
| - | - |
| **Name** and **description** | The output's title and what it is. |
| **Content** | Either a file uploaded to Atlan (`upload` mode) or a link to something hosted elsewhere (`link` mode). Exactly one per version. |
| **Agent** | The agent or coding harness that produced it, when recorded. |
| **Session** | The recorded session it came from, when recorded. |
| **Workspace** | Where it lives. It follows that workspace's access. |
| **Versions** | Every version stays readable. An uploaded file is pinned to the exact file version it was published with. |

## Before you begin

* You can write to the workspace where the output should live.
* For a local file, your agent can reach Atlan through the Atlan MCP endpoint or the Atlan API.
* For a link, the URL is an absolute `http` or `https` address with no user name, password, or credential in it. A presigned URL is refused; upload the file instead.

<Steps>
  <Step title="Record the output">
    <Tabs>
      <Tab title="From a coding agent">
        Ask your agent to run the `/atlan-record-output` command with the file path or URL and a name. In Claude Code, with the Atlan MCP server named `atlan`:

        ```text theme={null}
        /mcp__atlan__atlan-record-output ./reports/q3-churn.md q3-churn-report
        ```

        For a local file, the command uploads it first, then creates the output pinned to that upload. For a URL, it creates a link output. It also attributes the output to the agent and session when it knows them. See [Atlan commands and skills for coding agents](/plugins/references/commands).
      </Tab>

      <Tab title="With the API">
        Call `POST /agent/v1/outputs`. For a link output:

        ```bash theme={null}
        curl -sS --fail-with-body \
          -X POST "${ATLAN_GATEWAY_URL}/agent/v1/outputs" \
          -H "Authorization: Bearer ${ATLAN_TOKEN}" \
          -H "Content-Type: application/json" \
          -d '{
            "name": "q3-churn-report",
            "description": "Churn drivers for Q3, by segment.",
            "workspace_id": "workspace_01example",
            "mode": "link",
            "external_url": "https://docs.example.com/q3-churn",
            "subject_kind": "agent",
            "subject_id": "agent_01example",
            "session_id": "session_01example"
          }'
        ```

        For an uploaded file, upload it as a file record first, then send `"mode": "upload"` with `file_artifact_id` and `file_version_ordinal` instead of `external_url`. Set `subject_kind` and `subject_id` together, or leave both out. The `201` response returns the output with its `output_…` handle.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Publish a new version when the content changes">
    An output's content doesn't change in place. To publish new content, call `POST /agent/v1/outputs/{output_id}/versions` with the same fields as a create, without the name, description, or workspace. Each version is complete: agent and session fields you leave out are empty on that version, not copied from the last one. A version can switch between `upload` and `link`.

    To change only the description, use `PATCH /agent/v1/outputs/{output_id}`.
  </Step>
</Steps>

## Verify

<Steps>
  <Step title="Open the Library">
    Select **Library** in the left rail. The page reads **Library**, "Everything your agents have made, in one place."
  </Step>

  <Step title="Find the output">
    Use **Search the Library**, or narrow with **All agents**, **All workspaces**, and **All types**. Switch between **List view** and **Gallery view**. Each row shows the output's type, the agent that made it, its workspace, and when it was made.
  </Step>

  <Step title="Open it and check its versions">
    Select the output to open it. When it has more than one version, a **Versions** rail lists them as **V1**, **V2**, and so on; select one to view it. The row's menu can also offer **Open the session**, **Copy link**, and **Download**.
  </Step>
</Steps>

To see one agent's outputs, open the agent's profile and select **Library**. An agent with none shows **No outputs yet**.

## If the output is refused

| Message | Fix |
| - | - |
| `An upload output requires file_artifact_id and file_version_ordinal.` | Upload the file first and send both fields. |
| `An upload output cannot also carry external_url.` or `A link output cannot also pin a file.` | Send either the file fields or `external_url`, not both. |
| `A link output requires external_url.` | Add the URL, or switch to `upload`. |
| `subject_kind and subject_id must be set together.` | Send both or neither. |
| `external_url must not carry a credential in its query or fragment.` | Upload the file instead of linking to a presigned URL. |

## Availability and limits

* By default, an uploaded file can be up to 100 MiB.
* A workspace admin can archive an output with `POST /agent/v1/outputs/{output_id}/archive`. Archiving leaves the pinned file in place, and there is no permanent delete.
* **Yours** in the Library may be empty for now, because outputs aren't yet linked to the person who asked for them. Use **All**.
* The Library's skill filter isn't available yet.

## Related

* [Agent profile](/registry/agents/references/profile): The agent's **Library** tab.
* [How agent sessions work](/registry/agents/concepts/sessions-and-events): The sessions outputs link back to.
* [Public API](/api/references/api-reference): The `agent.createOutput`, `agent.appendOutputVersion`, and `agent.listOutputs` operations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.