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

# Create and update

> Publish artifacts with Runlayer Agents or a connected MCP client, then revise them at the same link.

## Create with a Runlayer Agent

Ask the agent for the file you want, including the format, audience, and
information the artifact should contain. The agent publishes the finished file
and replies with a shareable link.

**1. Describe the result**

For example: "Build a self-contained HTML dashboard from this CSV. Include
filters and a summary chart. Publish it as an artifact and give me the link."

**2. Review the published file**

Open the link in the agent's response. You can also find the file in the
agent's **Artifacts** tab or the main **Artifacts** library.

**3. Revise and share**

Ask for changes to the existing artifact, then review its
[sharing settings](https://docs.runlayer.com/artifacts/sharing.md) before sending the link to colleagues.

Artifact publishing is enabled by default for new agents. If publishing is
unavailable, ask the agent owner to check the agent's settings.

### How agent publishing works

The agent creates a file in its workspace and uses these built-in tools:

| Tool | Purpose |
| - | - |
| `publish_artifact` | Publishes a file under `/tmp/workspace` and returns its artifact ID and stable URL. Accepts an optional title, published filename, content type, and display mode. |
| `screenshot_artifact` | Renders a local HTML, SVG, or image file so the agent can inspect its appearance. |
| `fetch_artifact` | Downloads an existing artifact into the workspace for reading or revision. Access follows the permissions of the user who started the run. |

For a visual result, ask the agent to inspect a screenshot before publishing.
Choose `inline` for a browser preview or `attachment` for a download-only file.
The agent can set the content type, such as `text/html` or `application/pdf`, to
match the file.

### Update an agent artifact

Continue with the same agent and provide the existing artifact link:

> Update this report with the latest numbers. Keep the same artifact URL rather
> than creating a separate report: \[paste the artifact link].

The agent passes the existing `artifact_id` to `publish_artifact`. This publishes
a new version at the same URL. Updating this way requires the same originating
agent and the same user who created the artifact.

Each published file can be up to **25 MB**.

## Create from a connected assistant

With [Runlayer MCP](https://docs.runlayer.com/runlayer-mcp.md) connected to your assistant, you can publish a
standalone artifact without creating a Runlayer Agent. Your account needs
**Use Agents** or **Manage Agents** access.

For example:

> Save this analysis as a Markdown artifact in Runlayer and give me its link.

The assistant uses `create_artifact` with the filename and content. Text files use
`content_format="text"`; binary files use `content_format="base64"`. For HTML or
Markdown, specify `content_type="text/html"` or `content_type="text/markdown"`;
text input otherwise defaults to plain text. Creation requires confirmation
through the tool's `confirm=true` parameter.

### Upload a file from disk

Inline `content` is written out by the model one token at a time, so a page of
a few dozen kilobytes can take minutes to publish. An assistant that can run
shell commands, such as Claude Code, Codex, or Cursor, can upload the file
instead:

1. `prepare_artifact_upload` takes the file's exact size in bytes and returns
   an upload URL (`put_url`), valid 15 minutes, an `upload_key`, and a
   ready-to-run `curl` command.
2. The assistant uploads the file to `put_url`, an address on your Runlayer
   deployment that redirects the upload straight to the deployment's artifact
   storage bucket in S3, so Runlayer never stores the file.
   The URL accepts exactly that many bytes, and S3 refuses a second upload over
   a file that hasn't been published yet.
3. `create_artifact` or `update_artifact` takes `upload_key` in place of
   `content`. The content type is guessed from the filename unless
   `content_type` is set.

Only the person who prepared an upload can publish it. It is checked for
credentials like any other artifact content and discarded once published, so
prepare a new upload for each file. Before it is published, a text file goes
through the organization's input scanners for that tool, the same as inline
content: a file they block isn't published, and one they mask is published
masked. Binary files pass through unscanned, as inline base64 content does.

The assistant's network must reach both your Runlayer deployment and S3. If it
can't reach S3, the upload fails and the assistant falls back to inline
`content`.

Standalone artifacts appear in **Owned by me**. Use **Share** on the artifact to
grant colleagues access.

### Read and revise standalone artifacts

| Tool | Purpose |
| - | - |
| `list_artifacts` | Finds artifacts visible to you. |
| `get_artifact` | Reads an artifact's metadata, link, and custom link. Accepts the artifact ID or its custom link. |
| `get_artifact_content` | Reads the stored content. Accepts the artifact ID or its custom link. Large responses can be truncated; check the returned `truncated` field before using the content for a revision. |
| `update_artifact` | Replaces the content and metadata of a standalone artifact you own. |
| `edit_artifact` | Replaces or appends text in a standalone artifact you own without resending the whole file. |
| `set_artifact_alias` | Sets, changes, or removes an artifact's [custom link](https://docs.runlayer.com/artifacts/sharing.md#custom-links). Requires **Can edit** access. |
| `set_artifact_public_access` | Turns an artifact's [public link](https://docs.runlayer.com/artifacts/sharing.md#public-links) on or off. Requires **Full access** and the public links feature. Assistants are told to use it only when you explicitly ask. |

Updates and text edits require `confirm=true`, preserve the artifact link, and
create a new version. These MCP editing tools work on standalone artifacts;
revise an agent-created artifact through its originating agent.
`set_artifact_alias` also requires `confirm=true`, but it creates no version
and works on any artifact you can edit, including agent-created ones.

See [version history](https://docs.runlayer.com/artifacts/manage.md#version-history) to review or restore an
earlier result.


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