Artifacts
An artifact is something the agent writes for you to read, such as an investigation, a proposal or a mockup of a screen. It can also be a screenshot or a recording the agent made while checking its work. Artifacts belong to the chat session. They never reach the diff or the pull request, and you can still read them after the session ends.
Ask for an artifact
Ask for the thing you want to see, for example:
- "Mock up the new pricing page."
- "Investigate why the sprite is wrong and write it up."
- "Compare the two approaches."
The agent decides when a turn's result is worth an artifact of its own. Ordinary answers stay in the chat.
A Backlog ticket can have an artifact before it starts: a file from Files that you put on it, such as a prototype from Sensei. The ticket shows it under Artifacts, and its agent reads it when the session starts. See Put a file on a ticket.
To change an artifact, ask for the change. The agent rewrites the same artifact and its version counts up.
The four kinds
| Kind | What it is | How Sensei shows it | Size limit |
|---|---|---|---|
| Document | Markdown the agent writes | Formatted text | 1 MB |
| Mockup | A self-contained HTML page the agent writes | The page itself, in an isolated frame | 1 MB |
| Image | A .png, .jpg, .jpeg, .gif or .webp file | The picture, with Open full size | 25 MB |
| Video | An .mp4 or .webm file | A player with controls | 25 MB |
A mockup runs in isolation. It has no access to your app or to Sensei. The Preview tab is where the real app runs.
SVG is not one of the image kinds. For a drawing that needs to move or respond, ask for a mockup.
Put a file on a ticket
A file in Files can go onto a Backlog ticket as the ticket's own artifact. Ask Sensei to attach it, or run the command yourself:
kosuke sessions artifacts create <projectId> <sessionId> --file prototypes/board/a-columns.html
--file is a path in the Files of the project's workspace. A path to a file copies that file. A path to a folder copies each file directly inside it, so --file prototypes/board attaches every variant in the folder.
- Only a Backlog ticket accepts it. A session that has started refuses it.
- The file must be in the project's workspace.
- Only Markdown, HTML, PNG, JPEG, GIF, WebP, MP4 and WebM files can be copied. Text files are up to 1 MB and the rest up to 25 MB.
- The artifact's name is the file name without its extension, at most 64 characters. When two files would get the same name, or one file cannot be an artifact, nothing is attached and the error names the files.
- The ticket gets a copy. Later changes to the file in Files do not reach it. Attach again to replace the copy at its next version.
Find and read artifacts
Each artifact leaves a card in the transcript, at the point in the turn where the agent wrote it. Press Open on the card to read it in the Artifacts tab.
The Artifacts tab sits beside Preview, Changes and Files once the session has an artifact. It lists every artifact, most recently changed first.
Each row in the tab shows the title and kind, and the version once it passes 1, such as "Mockup, v2". Artifacts appear while the agent works, without waiting for its reply.
Anyone who can open the session can read its artifacts. The Artifacts tab stays readable when the sandbox is paused and after the session is Completed or Archived.
When the session gets a new sandbox, Sensei writes its artifacts back where the agent wrote them, so the agent can read and revise them. Past 100 MB in all, the oldest images and videos stay only in the Artifacts tab.
QA films are deleted 30 days after the session closes or a newer QA run stops using them; the QA Report itself is kept. An expired film shows Video expired on <date> and is no longer restored to a sandbox.
Versions
Sensei keeps only the current version of each artifact. A card in the transcript records the version that turn wrote, such as "version 2". Opening any card shows the current version. Earlier versions are gone.
A report from a skill can declare its own version, which Sensei shows instead of counting saves. The QA Report and the review report are one artifact each per session, and each run or review publishes over it at the next version.
Link to an artifact
Open the artifact in the Artifacts tab and copy the address from your browser. The address opens that artifact, which suits a pull request description. Whoever follows the link needs to be a member of the workspace.
Download or copy an artifact
| Button | Where | What it does |
|---|---|---|
| Download artifact | The selected row in the list | Saves the Markdown or HTML source, or the original image or video. |
| Copy artifact | Over a document or a mockup | Copies its Markdown or HTML source. |
| Copy artifact link | Over an image or a video | Copies a link to it in Sensei. |
Share artifacts outside Sensei
A share link for a session's preview carries its artifacts too. Once the session has an artifact, the shared page offers App and Artifacts. A visitor with no Sensei account can read both.
If the session is Completed or Archived, the shared page still shows its artifacts. If the sandbox is paused, a visitor can read the artifacts while the app wakes up. Revoking the link removes access to both.
Artifacts and attachments
An attachment is a file you send to the agent with a message. An artifact is something the agent writes back to you. Nothing in an artifact is committed. Ask the agent to put code in the repository, and review it in the Changes tab.
Limits
- Members cannot edit, rename or delete an artifact. Ask the agent to rewrite it instead.
- Deleting a session deletes its artifacts.
- A mockup can show images and videos from the session's other artifacts. In a downloaded or copied mockup, those stop loading after about a day.
To read artifacts from a script or an agent, use kosuke sessions artifacts list and kosuke sessions artifacts get. See Sensei CLI.