# Artifacts

> An artifact is a finished page, such as a patrol report, that an agent or person publishes to your Vigil organization and can share with a client by link.

Source: https://vigilsecure.net/docs/concepts/artifacts/

An artifact is a finished page published to your organization. The most common kind is a
report: last night's patrols at a site, a week of gate entries, a month of device
problems. Reports are the first kind of artifact, not the only one. Anything that is best
read as a page instead of a chat message can be one.

You find them under **Artifacts** in the console sidebar.

## What an artifact is

An artifact has a title, an optional summary, the person or agent who published it, and the
page itself. The page is self-contained: its text, tables, charts and images are all inside
it, and it loads nothing from elsewhere on the internet. That keeps what you share
predictable and private.

Most artifacts are written by [agents](https://vigilsecure.net/docs/concepts/agents.md). An agent reads what was
recorded in Vigil, builds the page and publishes it, on a schedule or when somebody asks.
Your own [AI assistant](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md) can publish artifacts too.

## Read artifacts

The **Artifacts** page shows a card for each artifact with its title, summary, when it was
published and by whom. You can search by title, sort by **Published**, **Updated** or
**Title**, and turn on **Include archived**.

Open an artifact to read it in the console, or choose **Open in new tab**.

Everyone whose role includes **View artifacts** sees every artifact in the organization. By
default that is every role except guard.

## Share an artifact with a client

A share link lets somebody outside your organization open one artifact without a Vigil
account. It is how you send a weekly report to a client.

1. Open the artifact and choose **Share**.
2. Under **Who is it for?**, enter a label such as `Acme Mall, weekly`. The label is for
   your own records.
3. Under **Expires after**, choose 7, 30 or 90 days.
4. Choose **Create link**, then **Copy link** and send it.

Things to know about share links:

- Anyone who has the link can open the page, so send it only to the people it is for.
- The link always shows the latest version of the artifact.
- It stops working when it expires, when you choose **Revoke**, or when the artifact is
  archived.
- **Active links** on the same dialog lists every link, who created it and when it expires.

Creating and revoking links needs the **Share artifacts by public link** permission. By
default the manager, admin and owner roles have it.

## Publish an artifact

Ask an agent. For example, in a chat with the Operations agent:

> Publish a report of last night's patrols at Rosebank Mall: each patrol, when it started,
> which beacons were scanned and by whom, and anything that was missed.

To get a report regularly, ask an agent to schedule it: "Every Monday at 07:00, publish a
patrol report for the past week for each site."

Publishing needs the **Publish artifacts** permission, which the manager, admin and owner
roles have. Give it to any agent that writes reports.

For developers: through the [API](https://vigilsecure.net/docs/developers/api.md), an artifact is a title of up to
200 characters, an optional summary and an HTML page of up to 2 MB.

## Archive an artifact

Open the artifact and choose **Archive**. It leaves the list, and its share links stop
working. Vigil keeps the page, so you can still find it with **Include archived**.

## Related

- [Automated client reports](https://vigilsecure.net/docs/examples/client-reports.md)
- [Agents](https://vigilsecure.net/docs/concepts/agents.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#reports)
