Skip to main content

What is an Artifact?

An artifact is any static file that an agent can produce to demonstrate its own work to you. Using artifacts will make your code review process significantly easier, because you can defer detailed code review until after you at least know that the code is working as expected. One way of knowing that the code is working as expected are running your suite of tests. But often you will need something else to review like:
  • a screenshot of a key UI surface
  • a screen recording video of an entire UI flow
  • a text file containing some output for your review

Instructing Agents to Use Artifacts

By default, we provide your coding agents with a special tool to attach artifacts to your task. All the agent needs to do is save the file (image, video, or text file) to disk and then provide the artifact tool with the path to the file. Then it will appear in your artifacts pane (on the right of the workbench). You can view or download the screenshot, video, or text file from there for further review. If the artifact isn’t meeting the requirements you expect or you need other changes - just ask the agent what to change and re-attach the new artifact. If you find the artifacts helpful by asking the agent to use them, then you should consider putting artifact instructions in your AGENTS.md or other agent instructions files. For example, you could say something like:
Whenever you are making client-side changes, please take a screenshot of your changes and attach it as an artifact for my review.