Code and repositories / Artifacts
Keep plans and pages next to your work
Your agent writes a plan, a test report or a small HTML page, and it gets lost in a chat or in a file that nobody reads. An artifact keeps that page on the forge, on the issue or the pull request that it is about, with its versions and its comments. It stays private until you share it.
4 min read
What an artifact is:
- A kind: a Markdown page, an HTML page, or a link. A Markdown page can be a plan.
- Files: a page can have more files with it, such as images, styles and scripts. The page links them by their names.
- A target: each artifact is on a repository, an issue, a pull request, or a profile.
- Versions: each publish adds a version. The old versions stay, and you can restore one.
- Private first: only its creator and the people with write access see a new artifact.
1. Open the Artifacts tab
Open the repository, then the Artifacts tab (/@<owner>/<repo>/artifacts). It lists the artifacts of the repository that you can see, newest first, with the target of each.
An issue and a pull request also show their own artifacts, in an Artifacts section on their page.
2. Make an artifact
You need write access. Without it, you can add an artifact only to your own issue or pull request, from its Artifacts section.
- Click New artifact.
- Type a Title. Pick the Kind: Markdown page, HTML page or Link. For a Markdown page, pick the Type: Page or Plan.
- In Tied to, pick This repository, An issue or A pull request. For an issue or a pull request, type its number.
- Under Content, pick Write or paste it, or Upload files. For a link, type the URL.
- Click Create artifact.
The page of the artifact opens at /@<owner>/<repo>/artifact/<n>, with the badge Private.
Note
The browser uploads files of at most 25 MiB. Use src for a larger file: see Publish from your coding agent.
3. Share it
On the page of the artifact, click Share on and its target, for example Share on issue #12. The badge changes to Shared.
Done
Everyone who can see the issue now sees the plan in its Artifacts section. They read it, pick an older version, and comment on it.
Next, pick the page for your job:
- Let your agent publish: Publish from your coding agent.
- Send a link to a person outside the team: Share an artifact.
- Review a plan as it changes: Read versions and comment.
- Show your work on your profile: Show artifacts on your profile.
- Allow share links or a script host in a repository: Set share links and allowed hosts.
Reference
Who sees an artifact
The badge on the artifact says who sees it:
| Badge | Who sees it |
|---|---|
| Private | Its creator and the people with write access |
| Shared | Everyone who can see its target: the repository, the issue, the pull request or the profile |
| Waiting for review | The same people as Private, until a review shows the share |
| Not shared | The same people as Private. The review refused the share |
A share link shows one artifact to anyone who has the link. See Share an artifact.
HTML pages
An HTML page runs in a sandbox, on a separate artifacts domain of the forge. The forge shows it in a frame. If the forge has no artifacts domain, an HTML artifact shows the note "HTML artifacts are not set up on this forge", and the page does not run. Markdown and link artifacts still work. A site operator sets up the domain: see Set up the artifacts domain.
Limits
These are the defaults. A site admin can change them: see Set the limits of the site.
- The entry page of a version is at most 16 MiB.
- Each file is at most the asset file limit, 100 MiB by default.
- A version has at most 1,000 files.
- The artifacts of a repository hold at most 10 GiB, and the artifacts of an account at most 1 GiB. The same file counts once in a repository or an account.
Not CI artifacts
The files that a CI job uploads with artifact() are CI artifacts, a different thing. See the CI reference.