# Vigil Documentation
> Learn how security companies use Vigil to run guard patrols, gate access control, chat, site coverage, cameras, reports and AI agents on one platform.
Source: https://vigilsecure.net/docs/
Vigil is the system a security company runs its guarding on. Guards work on a Vigil device,
the control room works in the Vigil console, and AI agents work alongside both. This
documentation explains what Vigil is, how to set it up and how each part works. You do not
need a technical background to follow it.
## Start here
- [What is Vigil?](https://vigilsecure.net/docs/introduction/what-is-vigil.md): What Vigil does, who it is for and what it replaces.
- [How Vigil works](https://vigilsecure.net/docs/introduction/how-vigil-works.md): Follow a shift from guard sign-in to the report you share with your client.
- [Create a Vigil account](https://vigilsecure.net/docs/setup/create-an-account.md): Sign up with a code sent to your email or phone, then create your organization.
- [Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md): Ask the agent inside Vigil, or connect your own assistant with one copy-and-paste prompt.
## Understanding Vigil
One page for each part of Vigil, in the order the console shows them.
- [Feed](https://vigilsecure.net/docs/concepts/feed.md): What is happening across every site, and what needs a person.
- [Overview](https://vigilsecure.net/docs/concepts/overview.md): The live map of sites, beacons and devices.
- [Communication](https://vigilsecure.net/docs/concepts/communication.md): Chats, voice notes, calls, scans, patrols and gate entries.
- [Artifacts](https://vigilsecure.net/docs/concepts/artifacts.md): Reports published to your organization and shared by link.
- [Sites](https://vigilsecure.net/docs/concepts/sites.md): The places you are responsible for.
- [Beacons](https://vigilsecure.net/docs/concepts/beacons.md): Checkpoints a guard proves they visited.
- [Devices](https://vigilsecure.net/docs/concepts/devices.md): The handsets guards sign in on.
- [Cameras](https://vigilsecure.net/docs/concepts/cameras.md): Site cameras, connected through a gateway.
- [Skills](https://vigilsecure.net/docs/concepts/skills.md): Written procedures that agents follow.
- [Agents](https://vigilsecure.net/docs/concepts/agents.md): AI members of your organization.
- [Users](https://vigilsecure.net/docs/concepts/users.md): The people in your organization and how they join.
- [Roles and permissions](https://vigilsecure.net/docs/concepts/roles.md): What each person and agent can do.
- [Organizations](https://vigilsecure.net/docs/concepts/organizations.md): Your company's workspace, settings and usage.
- [The guard app](https://vigilsecure.net/docs/concepts/guard-app.md): What guards use on shift.
## Examples
Common monitoring scenarios and how each is built from Vigil's parts.
- [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md): Checkpoint tours on a schedule, with proof of every scan.
- [Gate access control](https://vigilsecure.net/docs/examples/gate-access-control.md): Every vehicle and visitor logged in and out.
- [Guard check-ins](https://vigilsecure.net/docs/examples/guard-check-ins.md): Know within the hour when a site has nobody on duty.
- [Automated client reports](https://vigilsecure.net/docs/examples/client-reports.md): A weekly report built from what was recorded.
- [Device fleet monitoring](https://vigilsecure.net/docs/examples/device-fleet-monitoring.md): Battery, signal and location for every device.
- [Camera monitoring](https://vigilsecure.net/docs/examples/camera-monitoring.md): Live video and frames beside patrols and chats.
- [Alarm and system alerts](https://vigilsecure.net/docs/examples/alarm-integrations.md): Alerts from other systems, in the chat where guards respond.
## Questions
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md): Short answers about accounts, guards, devices, beacons, agents, reports and your data.
## For developers
Technical reference for the people who connect Vigil to other software. You do not need any
of it to use Vigil.
- [Make your first API request](https://vigilsecure.net/docs/developers/make-your-first-api-request.md): From a new token to a working request, with curl or TypeScript.
- [The Vigil API](https://vigilsecure.net/docs/developers/api.md): The GraphQL API behind the console: tokens, permissions and errors.
- [Post into a chat with a webhook](https://vigilsecure.net/docs/developers/webhooks.md): Send alerts from an alarm panel or any other system into a chat.
## For AI assistants
This documentation is also published as plain text for AI assistants to read:
[llms.txt](https://vigilsecure.net/llms.txt) lists every page, [llms-full.txt](https://vigilsecure.net/llms-full.txt) holds all of them in
one file, and every page is available as plain text by replacing its final `/` with `.md`.
## Need a hand?
Email [admin@vigilsecure.net](mailto:admin@vigilsecure.net), or
[book a demo](https://vigilsecure.net/#demo) with the team that builds Vigil.
---
# What is Vigil?
> Vigil is the system a security company runs its guarding on. Patrols, gate access control, chat, site coverage, cameras, reports and AI agents share one place.
Source: https://vigilsecure.net/docs/introduction/what-is-vigil/
Vigil is a security operations platform: the system a private security company runs its
guarding on. It puts the work of a guarding company in one place: patrols, gate access
control, chat and voice, site coverage, cameras, reports and AI agents. Guards work on a Vigil device, the control room
works in the Vigil console, and AI agents work alongside both.
Vigil is built by Vigil Secure in South Africa and is used by security companies there.
## Who Vigil is for
Vigil is for the company that provides the guarding, and everyone in it:
- **Owners and managers**, who need to know that every site is covered and be able to prove
it to a client.
- **Control room operators and supervisors**, who follow many sites at once and need the
events that matter in front of them.
- **Guards**, who need one device for the round, the gate and reaching the control room.
Your clients do not need a Vigil account. You share finished work with them, such as a
weekly patrol report, through a link.
## What Vigil replaces
Most security companies run a shift on several separate tools. Vigil brings them together.
| Instead of | Vigil gives you | How it works |
| ------------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| A patrol wand | **Patrols** | Guards scan a [beacon](https://vigilsecure.net/docs/concepts/beacons.md) at each checkpoint. Every scan carries the time, the place and the person. |
| A paper gate register | **Gate access control** | Guards record each vehicle and person at the boom by scanning the licence disc and the driver's licence. |
| WhatsApp groups and phone calls | **Chat, voice notes and calls** | Text, voice notes with transcripts, photos and calls in [Communication](https://vigilsecure.net/docs/concepts/communication.md), kept as your company's record. |
| A paper occurrence book | **A written record** | What happens on shift is recorded as it happens, with the time and the author attached. |
| Phoning every site to check on guards | **Coverage checks** | Vigil knows who is signed in on each [device](https://vigilsecure.net/docs/concepts/devices.md) and where, and can sound a sign-in request when nobody is. |
| A separate camera app | **Cameras** | Live video and frames from your site [cameras](https://vigilsecure.net/docs/concepts/cameras.md), next to everything else. |
| Spreadsheets and typed reports | **Reports** | [Agents](https://vigilsecure.net/docs/concepts/agents.md) build reports from what was recorded and publish them as [artifacts](https://vigilsecure.net/docs/concepts/artifacts.md). |
The value is not in any single feature. It is that the patrol, the gate entry and the
conversation around them share one timeline, so you can see what happened on a site without
piecing it together from five places.
## The parts of Vigil
Vigil has three parts that your people work with, all sharing one record of what happens on
your sites.
```mermaid
flowchart TB
accTitle: The parts of Vigil
accDescr: Guards use the guard app on a Vigil device. Owners, managers and the control room use the console. Both share one record in Vigil, where AI agents work alongside them. Reports go from Vigil to your clients by link.
guards(["Guards on site"]) --- app["Guard app
on a Vigil device"]
office(["Owners, managers
and the control room"]) --- console["Console
in a browser or desktop app"]
app <--> vigil
console <--> vigil
agents["AI agents
working day and night"] <--> vigil
vigil(["Vigil
one record of every site"]):::accent
vigil --> reports["Reports
shared by link"]
reports --- clients(["Your clients"])
```
| Part | Who uses it | What it is |
| ----------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **The console** | Owners, managers, control room | Where you run your sites from. It opens in a web browser, and there is a desktop app for Windows, macOS and Linux. It shows every site, device, chat and report for your organization. |
| **The guard app** | Guards | The app on a Vigil device, a rugged Android handset your company owns. It handles sign-in, patrol scans, chat, voice notes and gate entries, and it works without signal. See [The guard app](https://vigilsecure.net/docs/concepts/guard-app.md). |
| **Agents** | Everyone | AI members of your organization. They read and send messages, follow schedules, react to events and publish reports. See [Agents](https://vigilsecure.net/docs/concepts/agents.md). |
Vigil can also be connected to other software, such as an alarm system or your own
reporting. That is covered under [Developers](https://vigilsecure.net/docs/developers/api.md), and you do not need
it to use Vigil.
## What makes Vigil different
**AI agents are members of your team, not a feature on the side.** An agent has a name,
roles and permissions like a person. It can sit in a chat with your guards, ask a device for
a sign-in, request a patrol scan, notice a missed checkpoint and write the morning report.
Every new organization starts with one, the Operations agent.
**Everything is recorded where it happens.** A scan, a voice note and a gate entry are all
messages in a chat, with a time and an author. Reports are built from that record
instead of from memory.
**It works with your own AI tools.** If you already use an AI assistant such as Claude or
Codex, you can connect it to Vigil with one copy-and-paste prompt, and have it read your
patrol data or set up a site for you. See
[Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md).
## What is being rolled out
Some parts of Vigil are switched on gradually. Pages in this documentation mark them with a
**Rolling out** note. Today these are the live [Feed](https://vigilsecure.net/docs/concepts/feed.md),
[cameras](https://vigilsecure.net/docs/concepts/cameras.md), push-to-talk radio, panic alerts and NFC tag reading on
the device, and organization-written [skills](https://vigilsecure.net/docs/concepts/skills.md) for agents.
## Get started
- [How Vigil works](https://vigilsecure.net/docs/introduction/how-vigil-works.md) follows a shift from guard sign-in
to client reporting.
- [Create a Vigil account](https://vigilsecure.net/docs/setup/create-an-account.md) takes about a minute.
- To see Vigil on your own sites first, [book a demo](https://vigilsecure.net/#demo) with the team that builds it.
---
# How Vigil works
> See how guards and control rooms use Vigil to run a shift, follow up on missed patrols and share reports with clients.
Source: https://vigilsecure.net/docs/introduction/how-vigil-works/
Your guards use Vigil on site. Your control room follows the shift from the Vigil console,
where supervisors can see who's signed in, check patrol progress and talk to guards.
## Start with one site
Add a site in the console, put a Vigil device on site and mark the checkpoints your guards
need to visit. Follow the [first site setup guide](https://vigilsecure.net/docs/setup/add-sites-beacons-and-devices.md).
## Follow a shift
At Rosebank Mall, Sipho signs in on the Vigil device when he arrives. He records deliveries
at the gate, scans each checkpoint on his patrol and sends the control room a voice note
about a broken light.
His supervisor can check which checkpoints Sipho visited and follow up on the broken light.
You can set up Vigil's AI agent to request patrols on a schedule and tell a supervisor if a
checkpoint is missed. See [guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md).
## Share a report with your client
At the end of the week, ask Vigil to prepare a report showing which patrols were completed,
which checkpoints were missed and what happened at the gate. Review the report and send your
client a link they can open in their browser without a Vigil account. See
[automated client reports](https://vigilsecure.net/docs/examples/client-reports.md).
---
# Create a Vigil account
> Sign up for Vigil with a six-digit code sent to your email or phone. There is no password, and the same steps sign you in next time.
Source: https://vigilsecure.net/docs/setup/create-an-account/
A Vigil account belongs to you as a person. It is separate from any company, so one account
can belong to several [organizations](https://vigilsecure.net/docs/concepts/organizations.md) at once.
Signing up and signing in are the same steps. Vigil sends a six-digit code to your email
address or mobile number, and the first correct code creates your account. There is no
password to choose or remember.
## Sign up or sign in
1. Choose **Sign in** on the Vigil website, or open the
[sign-in page](https://vigilsecure.net/app/sign-in) directly.
2. Under **Email or phone**, enter your work email address or your mobile number. When you
type a phone number, a country picker appears beside it.
3. Choose **Email me a code** or **Text me a code**.
4. Enter the six digits Vigil sent you and choose **Verify and sign in**.
If the code does not arrive, wait for the one-minute countdown and choose **RESEND CODE**.
To correct a typing mistake, choose **Use a different email** or **Use a different number**.
## Tell Vigil who you are
The first time you sign in, Vigil asks for your name under **Tell us who you are**. Enter
your **First name** (required) and, if you like, your **Last name**, then choose
**Continue**.
Your name appears next to what you do in Vigil: the messages you send, the people you
invite and the changes you make. Only people in your organizations see it.
## What you see next
After your first sign-in you belong to no organization yet. Vigil shows one of these:
| You see | What it means | What to do |
| -------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Set up your organization** | Nobody has invited you. | [Create your organization](https://vigilsecure.net/docs/setup/set-up-your-organization.md), or ask your company to invite the email or number you signed in with, then choose **Check again**. |
| **{Company} invited you** | A company invited this email or number. | Choose **Accept invite** to open their console, or **Decline**. |
| **Pick an organization to open its console** | You already belong to one or more organizations. | Choose **Open console** on the one you want. |
If somebody sent you an invite link, open it and sign in. Vigil accepts the invitation and
opens that organization's console for you.
## Keep your account up to date
Open the account menu in the console and choose **Account settings** to change your details.
They follow you into every organization you belong to.
- **Profile photo** and name, shown on the user list and on your team's devices.
- **Email address** and **Mobile number**, the two places Vigil can send your sign-in codes.
Changing either one needs a code sent to the new address or number first.
- **SA ID number**, where you can submit a photo of your South African ID document for
verification. Verification is still being rolled out, and guards do not need it to sign in
on a device.
- **API tokens**, the keys that let an AI assistant or other software use Vigil as you. See
[Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#step-1-create-an-access-token).
## Related
- [Set up your organization](https://vigilsecure.net/docs/setup/set-up-your-organization.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#accounts-and-signing-in)
---
# Set up your organization
> Create your security company's organization in Vigil, meet the Operations agent, and invite your team by email, SMS or a one-time link.
Source: https://vigilsecure.net/docs/setup/set-up-your-organization/
An [organization](https://vigilsecure.net/docs/concepts/organizations.md) is your security company's workspace in
Vigil. It holds your sites, beacons, devices, chats, agents and people, and nobody outside
it can see them.
## Create the organization
1. [Sign in](https://vigilsecure.net/docs/setup/create-an-account.md). If you belong to no organization yet, Vigil
shows **Set up your organization**. Otherwise choose **Create an organization** below
your list of organizations.
2. Fill in the form:
| Field | Required | Notes |
| --------------------------------- | -------- | --------------------------------------------------------- |
| **Organization photo** | No | Your logo. It appears wherever the organization is shown. |
| **Organization name** | Yes | This is the name guards see on their devices. |
| **Address** | No | Pick one of the suggestions as you type. |
| **How big is your organization?** | No | Roughly how many guards are on shift. |
3. Choose **Create organization**. The console opens on the [Feed](https://vigilsecure.net/docs/concepts/feed.md).
You can change any of these later under **Organization** in the sidebar.
## What Vigil creates for you
A new organization is not empty. It starts with:
- **You as owner.** The owner [role](https://vigilsecure.net/docs/concepts/roles.md) holds every permission.
- **Six default roles**: guard, supervisor, operator, manager, admin and owner. You can add
your own later.
- **The Operations agent**, an [AI agent](https://vigilsecure.net/docs/concepts/agents.md) that belongs to your
organization. It greets everybody who joins in a direct chat, and anyone can message it
for help with Vigil.
The Feed shows a short welcome tour until you have added your first site, beacon or device.
You can reopen it from the account menu under **Help**.
## Invite your team
You need the permission to invite people. The operator, manager, admin and owner roles have
it.
1. In the sidebar, choose **Users**, then **Invite a user**.
2. Under **Reach them by**, pick one:
| Option | What happens | Valid for |
| ---------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| **Email** | They get an email with a link. They join once they sign in with that address and accept. | 7 days |
| **Mobile** | They get an SMS with a link. They join once they sign in with that number and accept. | 7 days |
| **Link** | You get a link to send however you like, for example on WhatsApp. Whoever opens it first and signs in gets the invitation. | 15 minutes, one use |
3. Choose one or more **Roles**. You can only give roles whose permissions you hold
yourself.
4. Choose **Send invitation** or **Create link**.
Invited people appear on the **Users** page with the state **Invited** until they accept.
To cancel an invitation, choose **Withdraw invitation**.
> **Which role should I give?:** Start with **guard** for people who work on a device in the field, **operator** for your
> control room, **manager** for people who run sites and teams, and **admin** for people who
> also manage devices and roles. [Roles](https://vigilsecure.net/docs/concepts/roles.md) lists what each one can do.
## Guards do not need an invitation
A guard can add themselves the first time they sign in on a device that is linked to your
organization. They enter their South African ID number, their name and a photo, and they
join with the guard role. See [The guard app](https://vigilsecure.net/docs/concepts/guard-app.md).
## Next steps
- [Add sites, beacons and devices](https://vigilsecure.net/docs/setup/add-sites-beacons-and-devices.md)
- [Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md)
---
# Add sites, beacons and devices
> Set up a site in Vigil from start to finish. Place the site on the map, add beacons at each checkpoint, link a device and have a guard sign in.
Source: https://vigilsecure.net/docs/setup/add-sites-beacons-and-devices/
This page takes one site from nothing to a working shift: the site on the map, beacons at
its checkpoints, a device at the gate and a guard signed in. It takes about fifteen minutes.
You need a role that can create sites and beacons and link devices. Operator, manager,
admin and owner all can. Seeing devices on the map and asking an agent who is at a site
also need **See device locations**, which the admin and owner roles have.
## 1. Add the site
1. In the console, open **Overview**.
2. Search for the address, or move the map to the place.
3. Right-click the spot, or press and hold on a touch screen, and choose **Add site here**.
4. Enter a **Name**, such as `Rosebank Mall`, and a **Description**, then save.
The site appears on the map with a pin. See [Sites](https://vigilsecure.net/docs/concepts/sites.md).
## 2. Add the beacons
A beacon marks a checkpoint a guard must prove they visited. Decide where your checkpoints
are, then add one beacon for each.
**For a geofence beacon**, which needs nothing on the ground:
1. On **Overview**, right-click the checkpoint's position and choose **Add beacon here**.
2. Enter a **Name** a guard will recognise, such as `North perimeter corner`.
3. Choose the **Site**, set **Kind** to **Geofence** and enter a **Radius**. 30 to 50
metres suits most checkpoints.
**For a QR code beacon**, using a printed Vigil beacon label:
1. Fix the label at the checkpoint.
2. Standing there with your phone, open the console, choose **Infrastructure → Beacons**
and add a beacon.
3. Enter a **Name**, choose the **Site** and set **Kind** to **QR code**.
4. Choose **Scan code** and point your phone's camera at the label.
5. Check the location and save.
See [Beacons](https://vigilsecure.net/docs/concepts/beacons.md) for the kinds of beacon and when to use each.
## 3. Link a device
1. Switch on the Vigil device and connect it to mobile data or Wi-Fi.
2. On the device, choose **Let's onboard**. It shows a QR code.
3. Scan that code with your own phone's camera and sign in to Vigil, or in the console
choose **Infrastructure → Devices → Link a device**.
4. Give the device a **Name**, such as `Rosebank gate`.
The device now shows your organization's name. See [Devices](https://vigilsecure.net/docs/concepts/devices.md).
## 4. Have a guard sign in
On the device, the guard chooses **Sign in to start shift** and enters their South African
ID number. If it is their first shift, they add their name and a photo, and they join your
organization with the guard role.
Within a few minutes the device appears on the **Overview** map at the site, with the
guard's photo on it.
## 5. Run a first patrol
In the console, open **Communication**, start a chat with the **Operations** agent and
ask:
> Ask whoever is signed in at Rosebank Mall to patrol all of its beacons in the next 20
> minutes.
The guard's device sounds and shows a **Patrol** card with a **Scan** button and the list
of beacons. The agent follows the scans and tells you when the patrol is done, or which beacons
were missed. [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md) shows how to make this happen
every night.
## Next steps
- [Invite your supervisors and control room](https://vigilsecure.net/docs/setup/set-up-your-organization.md#invite-your-team)
- [Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md) to set up many sites at once
- [Examples](https://vigilsecure.net/docs/examples/guard-patrols.md) of common monitoring scenarios
---
# Use Vigil with AI
> Ask the AI agent inside Vigil in plain language, or connect your own assistant such as Claude or Codex with an access token and one copy-and-paste prompt.
Source: https://vigilsecure.net/docs/setup/use-vigil-with-ai/
Vigil is built to be run with the help of AI. You ask in plain language, and an AI assistant
looks things up or does the routine work for you: checks who is on duty, requests a patrol,
adds a list of sites, builds a client report.
There are three ways to do this. Start with the first one. It needs no setup.
| Way | What you need | Good for |
| ---------------------------------- | ------------------------------------ | ---------------------------------------------------------------------- |
| **Ask the agent inside Vigil** | Nothing. Every organization has one. | Everyday questions and jobs, and anything that should repeat by itself |
| **Connect your own AI assistant** | An access token and one prompt | Setting up many sites at once, and one-off reports at your desk |
| **Give any AI this documentation** | A link | Learning how Vigil works and planning your setup |
## Ask the agent inside Vigil
Your organization already has an AI agent called **Operations**. Open **Communication** in
the console, or **Chats** on a device, start a chat with it and ask in plain language:
- "Who is signed in at Rosebank Mall right now?"
- "Which patrols were missed last night?"
- "Ask whoever is on site at the depot to check the back gate."
- "Invite thandi@example.co.za as an operator."
It answers in the chat, by text or by voice note, and is instructed to do only what you are
allowed to do yourself. You can also create agents of your own, with standing instructions
and schedules. See [Agents](https://vigilsecure.net/docs/concepts/agents.md).
This is the right choice for anything that should keep happening when your computer is off.
## Connect your own AI assistant
If you already use an AI assistant that can work on your computer, such as Claude Code,
Codex or Cursor, it can work with your Vigil organization for you. It acts as you, with your
permissions, and it asks before it changes anything.
There are three steps, and they take about five minutes.
### Step 1: Create an access token
An access token is a key that lets your assistant into Vigil as you, so you do not have to
sign in for it each time. Vigil's screens call it an API token.
1. Sign in to the console, open the account menu and choose **Account settings**, then
**API tokens**.
2. Choose **Create token**.
3. Enter a **Name** that says what the token is for, such as `My AI assistant`.
4. Choose an **Expiration**: 7, 30, 90, 180 or 365 days. Start with a short one, such as 7
or 30 days. You can always create another.
5. Choose **Create token**.
6. Under **Your token is ready**, choose **Copy token** and keep the value somewhere safe,
such as a password manager. Vigil shows it once and cannot show it again.
### Step 2: Ask your assistant to set up Vigil for you
Open your assistant, then copy this prompt and paste it in:
```text wrap
Please set up Vigil for me. Vigil is the system my security company uses, at https://next.vigilsecure.net.
1. Install the Vigil skill from https://github.com/Tiental/vigil-skills so that you know how to work with Vigil.
2. I have a Vigil access token ready. Help me save it on this computer so that you can use it from now on. The Vigil address to save with it is https://next.vigilsecure.net/api/graphql. Do not ask me to paste the token into this chat. Show me where to put it instead.
3. Check that it works by telling me my name and which organizations I belong to in Vigil.
I am not technical. Explain each step in plain language, do as much as you can yourself, and ask me before you change anything in Vigil.
```
Your assistant then does the work:
- It installs the **Vigil skill**, a set of instructions Vigil publishes that teaches an
assistant how to work with Vigil.
- It shows you where to put the token you copied in step 1.
- It tells you your name and your organizations, which shows that the connection works.
If a step fails, tell the assistant what you see on your screen and ask it to try another
way.
### Step 3: Ask it something
Ask in plain language, and mention Vigil so the assistant knows where to look:
- "Using Vigil, list our sites and how many beacons each one has."
- "From Vigil, summarise yesterday's gate traffic at the main gate: how many vehicles in
and out, and any with an expired licence disc."
- "Add these twelve sites to Vigil from the spreadsheet in this folder."
- "Build a patrol report for Rosebank Mall for last week and publish it to Vigil."
### What your assistant can do
| Area | What your assistant can do |
| -------------------------- | ------------------------------------------------------------------------------------------------ |
| **Chats and messages** | Read and search chats, post a message, send a file or photo, ask one of your Vigil agents |
| **Devices** | See where devices are, their battery and signal, who is signed in, and what happened on a device |
| **Patrols** | Request a patrol, follow the scans, and find missed checkpoints |
| **Sign-ins and sign-outs** | Make a device ask for a sign-in, and sign a user out |
| **The gate register** | Read vehicles and people in and out, and who is still on site |
| **Reports** | Build a report, publish it as an [artifact](https://vigilsecure.net/docs/concepts/artifacts.md) and share it by link |
| **Setup** | Add sites and geofence beacons, invite people |
Your assistant works when you ask it to. For work that should repeat without you, such as a
patrol every three hours, use an [agent inside Vigil](https://vigilsecure.net/docs/concepts/agents.md). Your
assistant can help you write that agent's instructions.
### Stay in control
- **The assistant is you.** Your token gives it everything your
[roles](https://vigilsecure.net/docs/concepts/roles.md) allow, in every organization you belong to, and nothing
more. If your roles change, the token changes with them.
- **It asks before changing things.** The Vigil skill tells the assistant to get your
go-ahead before it posts a message, sends a patrol request or a device command, invites
somebody or creates a public link. Read what it proposes.
- **Changes are real.** A patrol request sounds on a guard's device. Try things out in a
test organization first.
- **Treat the token like a password.** Keep it out of chat messages, emails and
screenshots.
> **Give an assistant its own account:** For an assistant that should only read, or only work in one organization, create a separate
> Vigil account for it, invite that account with a limited role, and create the token there.
### Check, replace or cancel a token
The **API tokens** page lists each token with its state (**Active**, **Expired** or
**Revoked**), its expiry date and when it was last used.
- **When a token expires**, create a new one and ask your assistant to replace the saved
token with it, as in step 2.
- **To cut off access at once**, choose **Revoke** on the token. Everything that uses it
stops straight away, and this cannot be undone. Signing out of the console does not
revoke your tokens.
### Set it up by hand
If you are comfortable in a terminal, you can do what the prompt does yourself. You need
Node.js for the installer and Python 3 for the skill.
Install the skill:
```sh
npx skills add Tiental/vigil-skills
```
Then set two environment variables in the terminal where your assistant runs:
```sh
export VIGIL_API_URL="https://next.vigilsecure.net/api/graphql"
export VIGIL_API_TOKEN="vigil_pat_…"
```
The skill is open source and follows the open Agent Skills format.
[github.com/Tiental/vigil-skills](https://github.com/Tiental/vigil-skills) has the other
ways to install it, and [Developers](https://vigilsecure.net/docs/developers/make-your-first-api-request.md) covers
using the token in your own software.
## Give any AI this documentation
To ask an AI assistant how Vigil works, give it this documentation. For example, paste this
into ChatGPT, Claude or Gemini:
```text wrap
Read https://next.vigilsecure.net/llms-full.txt and then help me plan how to set up patrols for a shopping centre with three gates.
```
The documentation is published in three forms made for AI to read:
| Address | What it is |
| --------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [`/llms.txt`](https://vigilsecure.net/llms.txt) | A list of every documentation page with a one-line summary |
| [`/llms-full.txt`](https://vigilsecure.net/llms-full.txt) | The whole documentation in one plain-text file |
| Any page with `.md` in place of the final `/` | That page as plain text, for example [`/docs/concepts/beacons.md`](https://vigilsecure.net/docs/concepts/beacons.md) |
## Which one should I use?
- A guard or supervisor needs an answer on shift: **the agent inside Vigil**.
- Something should happen every night without you: **an agent inside Vigil**, with a
schedule in its instructions.
- You are setting up many sites, moving data in or out, or building a one-off report at
your desk: **your own assistant**.
- You are evaluating Vigil or learning it: **the documentation**.
## Related
- [Agents](https://vigilsecure.net/docs/concepts/agents.md)
- [Skills](https://vigilsecure.net/docs/concepts/skills.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#ai-agents-and-skills)
---
# Feed
> The Feed is the first page of the Vigil console, made to show what is happening across every site right now and what needs a person's attention.
Source: https://vigilsecure.net/docs/concepts/feed/
The Feed is the first page you see when you open your organization in the Vigil console. It
is made to answer one question for whoever is on duty: what is happening across our sites
right now, and what needs a person?
You find it at the top of the sidebar, and choosing the Vigil logo takes you back to it.
## What the Feed is for
A security company's shift produces a steady stream of events: patrol scans, vehicles at
the gate, voice notes, late checkpoints, devices that go quiet. Most of them need no action.
The Feed is the place where the ones that do are brought together across every site, so a
supervisor does not have to open each chat and each site in turn.
> **Rolling out:** The live Feed is being rolled out. Today the page shows **The live feed is on its way** and
> links to the two places that carry the same information now: **Open Communication** and
> **Review sites**.
## Where to look today
| To see | Go to |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| What guards and agents are saying, including beacon scans, patrol progress and gate entries | [Communication](https://vigilsecure.net/docs/concepts/communication.md) |
| Where your sites, beacons and devices are, and who is signed in | [Overview](https://vigilsecure.net/docs/concepts/overview.md) |
| What is deployed at each site | [Sites](https://vigilsecure.net/docs/concepts/sites.md) |
| Whether a device is reporting, charged and in signal | [Devices](https://vigilsecure.net/docs/concepts/devices.md) |
| A summary somebody already wrote up | [Artifacts](https://vigilsecure.net/docs/concepts/artifacts.md) |
You can also ask the Operations [agent](https://vigilsecure.net/docs/concepts/agents.md) in a chat, for example "Who
is signed in at Rosebank right now?" or "Which patrols were missed last night?". It answers
what your own role lets you see.
## The welcome tour
Until your organization has its first site, beacon or device, the Feed shows a short tour
instead:
1. **Add your first site.** Right-click anywhere on the Overview map and choose
**Add site here**.
2. **Place beacons.** Add beacons along the patrol round in the same way.
3. **Invite your team.** Supervisors use the console; guards use their devices.
To see the tour again later, open the account menu and choose **Help**.
## Related
- [Set up your organization](https://vigilsecure.net/docs/setup/set-up-your-organization.md)
- [Add sites, beacons and devices](https://vigilsecure.net/docs/setup/add-sites-beacons-and-devices.md)
---
# Overview
> The Overview is Vigil's live map. It shows your sites, beacons and devices, who is signed in on each device, and lets you add sites and beacons in place.
Source: https://vigilsecure.net/docs/concepts/overview/
The Overview is the map of your organization. It shows where your sites and beacons are,
where each device last reported from and who is signed in on it. It is also the quickest way
to add a site or a beacon, because you place it where it really is.
You find it under **Overview** in the console sidebar.
## What the map shows
Choose **Layers** to pick what is drawn. Each layer needs a permission, so people only see
what their [role](https://vigilsecure.net/docs/concepts/roles.md) allows.
| Layer | What it shows | Permission |
| ----------- | -------------------------------------------------------------------------------------- | ------------------------------------- |
| **Sites** | Every site that has a location | View sites |
| **Beacons** | Every beacon. Disabled beacons are drawn faded. | View beacons |
| **Devices** | Each linked device at its last reported position, with the photo of the signed-in user | View devices and See device locations |
Markers that sit close together are grouped into a cluster. Choose a cluster to zoom in.
Under **Map type** you can switch between **Map** and **Satellite**. Vigil remembers your
layers and map type for each organization.
## Choose a marker
Choosing a marker opens a card with the details and a link to the full page.
- **Site**: name and description, or its coordinates when it has no description.
- **Beacon**: **Enabled** or **Disabled**, and the radius if it is a geofence.
- **Device**: **Recently active** or **No report in the past hour**, the time of the last
position fix, and the signed-in user.
## How current the map is
Devices report their position about every ten minutes, and more often while they are
moving. While the **Devices** layer is on, the map refreshes every 30 seconds.
A device that stops reporting stays at its last position and is drawn faded after an hour.
That usually means it is switched off, flat or out of signal. Open the device to see its
battery and signal history.
## Search the map
The search box finds devices, users, beacons and sites by name, and street addresses. Type
at least two characters. Choosing a result moves the map to it, or opens its page when it
has no position, as for a user.
## Add a site or beacon from the map
Right-click the spot on the map, or press and hold on a touch screen. The menu shows the
coordinates and, if your role allows it:
- **Add site here**
- **Add beacon here**
The form opens with the location filled in.
## See where you are
Choose **Location** to centre the map on your own position. The button is not available in
the macOS desktop app. Your browser or phone asks for
permission the first time. Your position is only shown to you.
## Related
- [Sites](https://vigilsecure.net/docs/concepts/sites.md), [Beacons](https://vigilsecure.net/docs/concepts/beacons.md) and
[Devices](https://vigilsecure.net/docs/concepts/devices.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#devices-and-the-guard-app)
---
# Communication
> Communication is where a Vigil organization talks and keeps its record. Chats carry text, voice notes, photos, calls, beacon scans, patrols and gate entries.
Source: https://vigilsecure.net/docs/concepts/communication/
Communication is where your organization talks, and where its record is kept. A chat in
Vigil carries more than text. Beacon scans, patrol requests, vehicles and people at the gate
are all messages in a chat, each with a time and an author. That is why a patrol, a gate
entry and the conversation around them end up on one timeline.
You find it under **Communication** in the console, and under **Chats** in the guard app.
## Chats
There are two kinds of chat you create, and one Vigil creates.
| Kind | What it is |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Direct chat** | A conversation between exactly two participants: two people, or a person and an agent. It cannot be renamed or closed. |
| **Group** | A named chat with any number of people and agents. Its owners can rename it, add and remove members and archive it. |
| **Notification channel** | A private channel Vigil keeps for each agent, where it posts the agent's due schedules and fired triggers. Nobody else posts in it. |
A chat is visible only to its participants. Belonging to an organization does not let
somebody read a chat they are not in.
### Start a chat
1. In **Communication**, choose **New conversation** (the **+** button).
2. Search for a person or an [agent](https://vigilsecure.net/docs/concepts/agents.md) and choose them to open a
direct chat. If you have spoken before, the same chat reopens.
3. For a group, choose **New group**, enter a **Group name**, tick the members and choose
**Create group**.
The person who creates a group is its owner. Open the chat header to see **Channel
details**, where owners manage members, make somebody else an owner and archive the chat.
### Find and manage chats
- Filter the list by **All**, **Unread**, **Groups** or **Direct**.
- The search box finds chats by name and messages by their text.
- Right-click a chat to mute its notifications, for 15 minutes up to 24 hours, or until you
turn them back on.
- Archiving a group makes it read-only. Vigil keeps the conversation, because it may be
evidence.
## What a message can be
| Message | What it carries | Who sends it |
| ------------------------------ | --------------------------------------------------------------------------------------- | ------------------------ |
| **Text** | Plain text, with `@` mentions | Everyone |
| **Voice note** | A recording. Vigil adds a transcript so it can be read and searched. | Everyone |
| **Photo** | A picture with an optional caption | Everyone |
| **Video**, **audio**, **file** | An attachment of up to 25 MB | Console users and agents |
| **Voice call** | A live call. The message is the invitation and, afterwards, the record of who joined. | Console users |
| **Beacon scan** | Proof that a user was at a [beacon](https://vigilsecure.net/docs/concepts/beacons.md), with the time of the scan | Guards and console users |
| **Patrol request** | A list of beacons to scan within a time window, with live progress | Agents |
| **Vehicle** | A vehicle going in or out of a site: plate, licence disc, driver, passengers and reason | Guards |
| **Person** | A person going in or out on foot: identity document and reason | Guards |
### Replies, mentions and ticks
- **Reply** to a message to quote it. Choosing the quote jumps back to the original.
- Type `@` in a group to **mention** a participant. Mentioning an agent is how you ask it to
answer in a group.
- Ticks on your own messages show how far they got: a clock while sending, one tick when
sent, two ticks when delivered, and coloured ticks when read. In a group, the ticks fill in
once everybody has received or read the message.
### Voice notes
Record a voice note from the composer in the console or the guard app. Vigil transcribes it
as it is posted, so a supervisor can read what a guard said without playing it, and an agent
can act on it. An agent that is sent a voice note answers with one.
### Voice calls
In the console, choose **Start voice call** in a chat header. The call appears as a card in
the chat with **Join**. Anyone in the chat can join while it is live.
- In a direct chat, leaving ends the call for both people.
- In a group, the call goes on until one person has been alone on it for a minute, or the
person who started it chooses **End for all**.
- A call that nobody else joins ends by itself after a minute.
Calls are available in the console and the desktop app.
## Operational messages
### Beacon scans
A scan is a message that says "this user was at this beacon at this time", backed by proof:
the QR code they read, or a GPS position inside the beacon's area. Vigil checks the proof
before it accepts the scan. If the device was offline, the message keeps the time the scan
actually happened.
See [Beacons](https://vigilsecure.net/docs/concepts/beacons.md) for how guards scan.
### Patrol requests
A patrol request asks whoever reads it to scan a set of beacons, in any order, between a
start and an end time. It shows as a card with a checklist: **3 of 7 scanned**, then **All 7
scanned**. Each scan in that chat during the window ticks off its beacon.
Agents send patrol requests, on a schedule or when somebody asks them to. See
[Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md).
### Vehicles and people
At a gate, a guard records each vehicle and person going in or out. The chat shows a card
titled **Vehicle in**, **Vehicle out**, **Person in** or **Person out** with what was
captured. Photos the guard takes are posted as replies to it. When a vehicle or person leaves within 48 hours of coming in, Vigil links the exit
to their entry and shows how long they were on site. Expired licence discs and driver's licences are flagged.
See [Gate access control](https://vigilsecure.net/docs/examples/gate-access-control.md).
## Default chats
Some things start outside any chat, such as a beacon scan from the map in the guard app.
Each user has a default chat for each of these, per organization:
| Kind | What goes there |
| ---------------- | ------------------------------------------- |
| **Beacon scans** | Scans started from the map |
| **Panics** | Panic alerts |
| **Push-to-talk** | Presses of the device's push-to-talk button |
Until somebody chooses one, all three use the user's oldest chat. For a new member that is
their chat with the Operations agent. A guard changes it by long-pressing a chat in the
guard app and choosing **Send here**; an agent can change it for them.
> **Rolling out:** Scans from the map use their default chat today. Panic alerts and push-to-talk radio are
> being rolled out.
## Webhooks: let another system post into a chat
A webhook lets another system post messages into a group chat: an alarm panel, a vehicle
tracker, a monitoring tool. Vigil gives you a secret web address for the chat, and whoever
looks after the other system enters that address in its settings.
1. Open the group's **Channel details** and, under **Webhooks**, choose **New**.
2. Enter a **Name**, such as `Alarm panel`. Messages appear under this name.
3. Choose **Create webhook** and copy the **Webhook URL**. It is shown once.
4. Give the address to the person who sets up the other system, such as your alarm
installer. [Post into a chat with a webhook](https://vigilsecure.net/docs/developers/webhooks.md) tells them
exactly what to send.
Things to know about webhooks:
- The address is the only key. Anyone who has it can post into that chat, so treat it like
a password and **Revoke** it if it leaks.
- A webhook can only post text into its own chat. It cannot read anything.
See [Alarm and system alerts](https://vigilsecure.net/docs/examples/alarm-integrations.md).
## Notifications
The console asks to show browser notifications for new messages while Vigil is in the
background. On a device, a new message gives a sound and a double buzz unless the chat is
muted.
## Related
- [The guard app](https://vigilsecure.net/docs/concepts/guard-app.md)
- [Agents](https://vigilsecure.net/docs/concepts/agents.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#chats-and-messages)
---
# 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)
---
# Sites
> A site is a physical place your security company is responsible for, such as a mall, estate or warehouse. Beacons, patrols and devices are organised around sites.
Source: https://vigilsecure.net/docs/concepts/sites/
A site is a physical place your company is responsible for: a shopping centre, a
residential estate, a warehouse, a school, a client's head office. Sites are how Vigil
organises the rest of your infrastructure. Beacons are deployed to a site, patrols cover a
site, and an agent finds the devices on shift by looking near a site.
You find them under **Infrastructure → Sites** in the console.
## What a site has
| Field | Notes |
| --------------- | --------------------------------------------------------------------------------------------- |
| **Name** | Required. What your team calls the place, such as `Rosebank Mall` or `Main gate`. |
| **Description** | Optional. Anything that helps: the client's name, the access arrangement, the contact person. |
| **Location** | A point on the map. Set it by adding the site from the Overview map. |
A site's location matters. It puts the site on the [Overview](https://vigilsecure.net/docs/concepts/overview.md) map,
and it is how Vigil and your agents work out which devices are at the site.
## Add a site
The best way is from the map, because the location is set as you create it:
1. Open **Overview** and find the place. The search box takes street addresses.
2. Right-click the spot, or press and hold on a touch screen, and choose **Add site here**.
3. Enter a **Name** and a **Description**, check the location and save.
You can also choose **Infrastructure → Sites → Add site**, which asks only for the name and
description. A site added this way has no location, so prefer the map.
Adding a site needs the **Create sites** permission, which the supervisor, operator,
manager, admin and owner roles have.
## The site page
Open a site to see two tabs:
- **Details**: the name and description, a map of the site with the beacons around it, and
a record of when it was created and last updated.
- **Beacons**: the beacons deployed to this site, with their kind and state, and **Add
beacon** to register a new one here.
## Archive a site
Open the site and archive it, or select several in the list. An archived site leaves your
active sites and becomes read-only. Vigil keeps its record, because beacons and patrol
history refer to it. Turn on **Include archived** in the list to find it again.
## How sites are used
- **Beacons** are deployed to a site. See [Beacons](https://vigilsecure.net/docs/concepts/beacons.md).
- **Patrols** are requested for a site's beacons. See
[Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md).
- **Agents** check a site's coverage by finding the devices near it and who is signed in on
them. See [Guard check-ins](https://vigilsecure.net/docs/examples/guard-check-ins.md).
- **Usage** counts your sites each month. See
[Organizations](https://vigilsecure.net/docs/concepts/organizations.md).
## Related
- [Beacons](https://vigilsecure.net/docs/concepts/beacons.md)
- [Overview](https://vigilsecure.net/docs/concepts/overview.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#sites-and-beacons)
---
# Beacons
> A beacon is a checkpoint a guard proves they visited, by scanning a QR code or NFC tag or by standing inside a GPS area. Beacons are the basis of patrols.
Source: https://vigilsecure.net/docs/concepts/beacons/
A beacon is a checkpoint: a point at a site that a guard proves they visited. The proof is
either something they read at the spot, such as a QR code, or their GPS position inside an
area around it. Every proven visit is a _scan_, recorded with the time, the place and the
person.
You find them under **Infrastructure → Beacons** in the console.
## Kinds of beacon
| Kind | How a guard scans it | Good for |
| ------------ | -------------------------------------------------------------- | -------------------------------------------------------------------------- |
| **QR code** | Points the device's camera at the printed code | Doors, gates, plant rooms, anywhere you can fix a label |
| **Geofence** | Stands inside a circle around the point and checks in with GPS | Perimeter corners, parking areas, open ground where a label would not last |
| **NFC tag** | Holds the device against the tag | Places where a QR label would be photographed or damaged |
Passive QR codes and NFC tags need no power and no batteries.
Codes printed for the previous Vigil platform still identify the same beacon. Bluetooth and
Wi-Fi beacons cannot yet be registered in the console or scanned by the guard app.
> **Guard app support:** The guard app scans QR codes and geofences today. Reading NFC tags in the guard app is being
> rolled out, so use QR or geofence beacons for patrols.
## Register a beacon
1. Choose **Infrastructure → Beacons** and add a beacon, open a site's **Beacons** tab and
choose **Add beacon**, or right-click the spot on the
[Overview](https://vigilsecure.net/docs/concepts/overview.md) map and choose **Add beacon here**.
2. Fill in the form:
| Field | Notes |
| --------------- | ------------------------------------------------------------------ |
| **Name** | What a guard will see, such as `North gate` or `Generator room`. |
| **Description** | Optional. Where exactly it is, or what to check there. |
| **Site** | The site it is deployed to, or **Unassigned** to keep it in stock. |
| **Kind** | QR code, NFC tag or geofence. The kind cannot be changed later. |
| **Location** | Required. Choose **Adjust location** to place it on the map. |
3. Complete the part for its kind:
- **QR code**: choose **Scan code** and scan the Vigil code on the label. Only Vigil
beacon codes are accepted.
- **NFC tag**: choose **Scan tag** and hold the tag against the back of an Android
phone, in Chrome.
- **Geofence**: enter the **Radius (metres)**, from 5 to 10,000. The default is 50.
Registering beacons needs the **Register beacons** permission, which the supervisor,
operator, manager, admin and owner roles have.
## Manage beacons
- **Move** a beacon to another site, or back to stock, by changing its **Site**. To move
several together, select them in the list and choose **Move to site…**.
- **Disable** a beacon to leave it out of patrols without removing it, for example while a
wing is closed. **Enable** it again later.
- **Archive** a beacon that is gone for good. Vigil keeps its record because patrol history
refers to it.
The list filters by kind, state, site and placement, so you can find every unassigned
beacon or every disabled one.
## What a scan is
A scan is a message in a chat. It records:
- **Who** scanned, from the user signed in on the device.
- **Which beacon**, checked against proof. For a QR code the proof is the code itself. For a
geofence it is a GPS fix accurate to 50 metres or better that lies within the radius, allowing for the fix's accuracy.
- **When**, by the device's clock at the moment of the scan. A scan made offline keeps its
real time and is sent when the device is back online.
In the chat it reads **Scanned North gate**, with the method and, for GPS, the distance from
the centre.
### How a guard scans
In the guard app, a guard can scan in three ways:
- **From a patrol request.** The patrol card in the chat has a **Scan** button, and lists
the beacons still to scan.
- **From a chat.** Choose **+**, then **Scan beacon**. Nearby geofences show **Check in**;
**Scan QR code** opens the camera.
- **From the map.** Standing inside a geofence shows a card with **Scan**. The scan goes to
the guard's default chat for beacon scans.
The device can vibrate and play a sound when the guard walks into a beacon's area.
## Beacons and patrols
A patrol is a list of beacons to scan within a time window. A patrol request can include up
to 100 enabled QR or geofence beacons. See [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md).
## Related
- [Sites](https://vigilsecure.net/docs/concepts/sites.md)
- [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#sites-and-beacons)
---
# Devices
> A Vigil device is a company-owned Android handset that runs the guard app. Link it to your organization to see who is signed in, where it is and how it is doing.
Source: https://vigilsecure.net/docs/concepts/devices/
A device is a Vigil handset: a rugged Android phone your company owns, locked to the
[guard app](https://vigilsecure.net/docs/concepts/guard-app.md). Guards share devices. A device stays at a site or
with a vehicle, and whoever is on shift signs in on it.
You find them under **Infrastructure → Devices** in the console.
## How a device reaches you
Vigil prepares each device before you get it. The guard app is installed, the device is
locked down so it cannot be used for anything else, and it is registered with Vigil under
its serial number. What is left for you is to _link_ it to your organization.
## Link a device
You need the **Link devices** permission. The operator, manager, admin and owner roles have
it.
1. Switch the device on and connect it to the internet. It shows **This device isn't linked
to a company yet**. Choose **Let's onboard**. The device shows a QR code with its serial
number and device ID beneath it.
2. Scan the QR code with your own phone's camera and sign in to Vigil. If you belong to
several organizations, choose the one the device should join. Then choose **Link
device**.
Or, in the console, choose **Infrastructure → Devices → Link a device** and scan the
code with your computer's camera, or paste the **Device ID**.
3. Under **Handset linked**, give the device a **Name** your team will recognise, such as
`Gate 3` or `Rosebank patrol`. Without a name it is shown by its serial number.
The device moves on by itself within a few seconds and shows your organization's name and
**Sign in to start shift**.
If linking fails:
| Message | What to do |
| ------------------------------------------------------- | ------------------------------------------------------------------------------- |
| This handset has not checked in for a couple of minutes | Keep the device on its QR screen and connected to the internet, then try again. |
| This handset is linked to another organization | It has to be unlinked there first. |
| No handset has this ID | Check the ID against the device's screen, or scan the QR code instead. |
## The device list
The list shows each device with its name, serial number, when it was last seen and its
state. Search by serial number, and choose a row's menu to **Copy serial number** or
**Unlink**.
## The device page
Open a device to see its **Profile** and **Events** tabs, and a **State log** tab if your
role includes **See device locations**.
### Profile
The **Status** panel shows how the device is doing right now:
- **Signed in**: the user on shift and since when, or **Nobody**.
- **Last report**: when the device last reported. A device that is overdue shows **Silent
for** and how long.
- **Battery** and **Signal**: the charge, the network type and the signal strength.
- **Location**: the last position, how accurate it is and when it was fixed.
- **App version**: the guard app version it runs.
Below that you can rename the device and see its serial number and when it was registered
and linked.
Seeing status and location needs the **See device locations** permission. By default the
admin and owner roles have it.
### Events
A log of what happened on the device, newest first:
- A user **signed in** or **signed out**.
- The device was **linked** or **unlinked**, or the **app version changed**.
- It **started walking**, **running**, **cycling** or **moving in a vehicle**, or **stopped
moving**.
- A **charger** was connected or disconnected, with the battery level at the time.
- **Wi-Fi** was connected or disconnected.
### State log
Charts of the **battery** and **signal level** over the past 24 hours or 7 days, and a
**device track**: the device's position fixes drawn on a map. The table beneath lists each
sample with the signed-in user, battery, signal and position.
Devices report their state every ten minutes, and their position more often while they are
moving. The logs belong to the device, so its history stays with it.
## Device commands
A command is a one-off instruction sent to a device.
| Command | What the device does |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Request sign-in** | Sounds an alarm and shows **Sign In Requested** until somebody acknowledges it. A device with somebody signed in ignores it. |
| **Sign out** | Signs a named user out and returns to the sign-in screen. It does nothing if somebody else has since signed in. |
| **Set volume** | Sets the device's volume. |
| **Reboot** | Restarts the device. It refuses during a call. |
You send a command by asking an [agent](https://vigilsecure.net/docs/concepts/agents.md). Ask the Operations agent,
for example "Request a sign-in on Gate 3" or "Sign Sipho out of the Rosebank device", or
let an agent do it on a schedule. Sending commands needs the **Send device commands**
permission, which the admin and owner roles have. Developers can also send commands through
the [API](https://vigilsecure.net/docs/developers/api.md).
A command travels to the device over the internet and is held for five minutes, so a
device that is off or out of signal for longer than that does not receive it.
## Unlink a device
In the device list, open the device's menu and choose **Unlink**. This needs the **Unlink
devices** permission, which the admin and owner roles have. The device leaves your
organization straight away and loses the
name you gave it. The device stays registered with Vigil, so it can be linked again, to
your organization or another one.
## Related
- [Device fleet monitoring](https://vigilsecure.net/docs/examples/device-fleet-monitoring.md)
- [Guard check-ins](https://vigilsecure.net/docs/examples/guard-check-ins.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#devices-and-the-guard-app)
---
# Cameras
> Vigil connects to the network cameras on your sites through a small gateway program, and shows their live video and recent frames in the console.
Source: https://vigilsecure.net/docs/concepts/cameras/
Cameras bring the network cameras already on your sites into Vigil, so the control room
sees video next to patrols, chats and devices instead of in a separate app.
> **Rolling out:** Cameras is being rolled out and is switched on for each organization by Vigil. Check
> **Organization → Features** to see whether it is enabled for you, and
> [contact us](mailto:admin@vigilsecure.net) to ask for it. When it is enabled, **Cameras**
> appears under **Infrastructure** in the sidebar.
## How cameras connect: the gateway
Your cameras are never opened up to the internet. Instead you run a small program, the
_gateway_, on a computer at the site. The gateway finds the cameras on the site's network
that support ONVIF, the standard most network cameras share, and connects them to Vigil.
Setting up a gateway is a job for somebody who is comfortable installing a program on a
computer, such as the person who looks after the site's cameras or IT.
1. Open **Infrastructure → Cameras** and choose **Link gateway**. The dialog has the
gateway downloads for the machine on site: Windows, macOS, or Linux on x64 or ARM.
2. Unzip it and start it. It writes its **Gateway ID** to `data/README.md` in its folder.
3. Enter the **Gateway ID** in the **Link gateway** dialog. A gateway can be linked while
it is running and has recently been seen.
You do not add cameras by hand. The cameras a gateway finds appear in the list by
themselves. For a picture, the gateway needs each camera's username and password in its
credentials file, which stays on the gateway.
## The camera list
Each camera is a card with its latest frame, its name, the site or gateway it belongs to,
its address and a badge: **Live** or **No signal**. Search by name or address.
## Watch a camera
Open a camera to see its **View** tab.
- **Live video** plays when the camera is live. A stream runs only while somebody is
watching it, and everyone watching shares the same stream. Vigil does not record video.
- **Frames** are stills the gateway sends from the camera. The strip beneath the video
shows recent frames; choose one to review it, and **Back to live** to return.
- **Labels** shows what object detection found in a still, as boxes with a label and a
confidence.
- **Pan and tilt** controls appear while live video plays. They work on cameras that can
move.
## Related
- [Camera monitoring](https://vigilsecure.net/docs/examples/camera-monitoring.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#cameras)
---
# Skills
> A skill is a written procedure an AI agent loads when it needs it. Vigil has built-in skills for patrols and sign-ins, and your organization can write its own.
Source: https://vigilsecure.net/docs/concepts/skills/
A skill is a set of written instructions for one kind of work, with a short description of
when to use it. An [agent](https://vigilsecure.net/docs/concepts/agents.md) sees only the description until the work
calls for it, then loads the full instructions. This keeps an agent focused and lets you
teach it your company's way of doing things without rewriting its instructions.
There are three kinds of skill around Vigil.
| Kind | Who writes it | Who uses it |
| ---------------------------------- | ----------------- | ---------------------------------------------------------- |
| **Core skills** | Vigil | Every agent inside Vigil |
| **Organization skills** | Your organization | Your organization's agents |
| **Vigil skills for AI assistants** | Vigil | Your own assistant, such as Claude or Codex, outside Vigil |
## Core skills
Every agent in Vigil has these built in. Their names start with `vigil-`.
| Skill | What it teaches an agent |
| ------------------------ | ----------------------------------------------------------------------------------------------------------- |
| `vigil-communication` | How to talk to people: when to answer by text, voice note, photo or file, and which chat to post in. |
| `vigil-graphql-api` | How to look things up and make changes in Vigil. |
| `vigil-patrol-requests` | How to ask the guard at a site to patrol it, and how to follow the scans until the patrol is done or late. |
| `vigil-sign-in-requests` | How to check whether somebody is signed in on a site's devices, and how to make a device ask for a sign-in. |
| `vigil-sign-outs` | How to sign a user out of a device when their shift is over, without signing out whoever relieved them. |
| `vigil-default-chats` | How to read and change the chat a user's beacon scans and push-to-talk go to. |
| `vigil-triggers` | How to be woken when something changes in the organization. |
| `vigil-sandbox` | How the agent's private workspace works: files, commands and limits. |
You do not need to switch these on. When you tell an agent in its instructions to "patrol
Rosebank every three hours", it loads `vigil-patrol-requests` by itself.
## Organization skills
An organization skill is a procedure your company writes, such as how a shift is handed
over, what counts as an incident or how a client likes its weekly report.
You find them under **Directory → Skills**. The manager, admin and owner roles can write
them; every role can read them.
### Write a skill
1. Choose **Directory → Skills**, then **Add skill**.
2. Fill in the three fields:
| Field | Limit | Notes |
| ------------------ | ----------------- | ------------------------------------------------------------------------------------------------------------ |
| **Name** | 64 characters | Lowercase letters, numbers and hyphens, such as `shift-handover`. Names starting with `vigil-` are reserved. |
| **When to use it** | 1,024 characters | Agents see only this until they load the skill, so say exactly when it applies. |
| **Instructions** | 20,000 characters | The procedure itself. Keep it under 500 lines. Vigil's own rules still come first. |
3. Save the skill.
A skill belongs to one organization. An agent never carries one company's skills into
another.
> **Rolling out:** You can write and edit organization skills today. Choosing which agents load each skill is
> being rolled out, so agents do not use organization skills yet. Until then, put a procedure
> an agent must follow in that agent's **Instructions**.
### Archive a skill
Open the skill and archive it. Agents stop using it, and its name becomes free for a new
skill. Archived skills stay listed for reference when you turn on **Include archived**.
## Vigil skills for your own AI assistant
Vigil also publishes a skill for AI assistants that run outside Vigil, on your own
computer. With it, an assistant such as Claude Code or Codex knows how to work with your
organization: how to find a site, read last night's scans, request a patrol or post in a
chat.
See [Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#connect-your-own-ai-assistant).
## Related
- [Agents](https://vigilsecure.net/docs/concepts/agents.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#ai-agents-and-skills)
---
# Agents
> An agent is an AI member of your Vigil organization. It has a name, instructions and roles, chats with your team, runs on schedules and reacts to events.
Source: https://vigilsecure.net/docs/concepts/agents/
An agent is an AI member of your organization. Like a person, it has a name, a photo,
[roles](https://vigilsecure.net/docs/concepts/roles.md) and a place in your chats. Unlike a person, it follows
standing instructions you write, works at any hour and can look things up and make changes
in Vigil directly.
You find agents under **Directory → Agents** in the console.
## What agents are for
Agents take on the checking, chasing and writing that a control room does all shift:
- Answer questions from guards and managers in a chat, by text or voice note.
- Ask the guard at a site to walk a patrol, then follow the scans as they come in.
- Check whether somebody is signed in on a site's device, and sound a sign-in request when
nobody is.
- Sign a guard out when their shift is over.
- Notice changes, such as a person joining or a beacon being moved, and act on them.
- Build a report from what was recorded and publish it as an
[artifact](https://vigilsecure.net/docs/concepts/artifacts.md).
## The Operations agent
Every organization starts with one agent, called **Operations**. Vigil creates and
maintains it:
- It holds the owner role, so it can do anything in your organization.
- It is instructed to do for a person only what that person is allowed to do themselves. If you ask for
something you lack the permission for, it tells you which permission is needed.
- It greets every new member, in a direct chat, the first time they join.
- You can change its name, description and photo. You cannot change its instructions or
roles, or remove it. In the agent list it carries the badge **Default**.
Anyone in the organization can message it, from the console or from a device, to ask how
something works, look something up or make a change.
## Create an agent
You need the permission to create agents. The manager, admin and owner roles have it.
1. Choose **Directory → Agents**, then **Add agent**.
2. Fill in the form:
| Field | Required | Notes |
| ---------------- | -------- | ----------------------------------------------------------------------------- |
| **Agent photo** | No | Upload a picture. You can pick a built-in bot on the agent's page afterwards. |
| **Name** | Yes | What people see in chats, such as `Night desk`. |
| **Description** | No | One line on what the agent is for. |
| **Instructions** | Yes | Its persona, its responsibilities and how it should respond. |
3. Choose **Add agent**.
4. Open the **Permissions** tab and choose **Edit roles**. A new agent has no roles, so it
can do nothing in your organization until you give it some. You can only grant
permissions you hold yourself.
### Write good instructions
Instructions are plain language. Say who the agent is, what it is responsible for, when it
should act without being asked, and who it should tell. For example:
```text
You are the night desk for Rosebank Mall.
Every hour from 18:00 to 06:00, check that somebody is signed in on the Rosebank
devices. If nobody is, request a sign-in on the nearest device.
At 22:00, 01:00 and 04:00, ask the signed-in guard to patrol all the Rosebank beacons
within 30 minutes. If a patrol is late or missed, tell Thandi Nkosi in her chat.
At 06:00, post a short summary of the night in the "Rosebank managers" chat.
```
Instructions describe the job. They do not start it. After you save them, message the agent
once, for example "Set up your schedules from your instructions", and check its
**Schedules** tab. See [Schedules](#schedules).
## How an agent is woken
An agent does nothing until something wakes it. Each time it wakes it does one _run_.
| What happens | Does the agent wake? |
| -------------------------------------------------------- | -------------------- |
| A person sends a message in a direct chat with the agent | Yes |
| A person mentions the agent with `@` in a group chat | Yes |
| A person posts in a group chat without mentioning it | No |
| One of the agent's schedules falls due | Yes |
| One of the agent's triggers fires | Yes |
| Another agent, a device or a webhook posts a message | No |
When several messages arrive close together, for example when a device comes back online,
the agent waits a few seconds and answers them together in one run.
## What an agent can do in a run
- **Post messages**: text, voice notes, photos and files, in the chat that woke it or any
other chat it belongs to. It can open a direct chat with a person.
- **Look things up and make changes in Vigil**, within its own roles and only in your
organization.
- **Use Vigil's core skills**, which teach it how to request patrols and sign-ins, sign
users out, manage default chats and set triggers. See [Skills](https://vigilsecure.net/docs/concepts/skills.md).
- **Work with files** in a private workspace. It can look at a photo sent in the chat, read
the transcript of a voice note, keep notes between runs, and create files to send, such as
a spreadsheet.
- **Show progress**. While it works, the chat shows a short status line, such as
"Checking tonight's patrols".
An agent answers in the form you used: text for text, a voice note for a voice note.
> **Roles are the real limit:** An agent is told to refuse requests from people who lack the permission themselves, but its
> own roles are what Vigil enforces. Give an agent only the roles its job needs.
## Schedules
A schedule wakes an agent at set times with a task, such as "every weekday at 08:00, post
yesterday's patrol summary". Each schedule has its times, a time zone and the task.
The agent sets and clears its own schedules, and it can only do that while it is running.
To add one, ask the agent in a chat: "Every weekday at 08:00, post yesterday's patrol
summary in the managers' chat", or "Set up the schedules your instructions describe". The
**Schedules** tab of the agent lists each task, its schedule and when it is next due. An
agent can have up to 20.
## Triggers
A trigger wakes an agent when something changes in your organization. It names one event,
optionally the specific records to watch, and the task to do. As with schedules, the agent
sets its own triggers when a person asks it to in a chat. An agent can have up to 20.
| Area | Events an agent can listen for |
| ----------------- | ------------------------------------------------------------------ |
| People | A person joined, had their roles changed, or left |
| Invitations | Sent, claimed, accepted, declined or cancelled |
| Sites | Created, changed or archived |
| Beacons | Registered, changed, archived, assigned to a site or taken off one |
| Devices | Linked, unlinked or renamed |
| Agents and skills | Created, changed or archived |
| Roles | Created, changed or deleted |
| Artifacts | Created, changed, archived, shared by link or unshared |
| Cameras | A gateway was linked, or a new camera was discovered |
| Organization | Details or settings changed |
An agent needs permission to read the kind of record it is watching. Its own changes never
fire its triggers.
Triggers cover changes to your setup. Things that happen during a shift, such as a beacon
scan or a vehicle at the gate, are [messages in a chat](https://vigilsecure.net/docs/concepts/communication.md). In
its direct chat with a guard, each of them wakes the agent. In a group they do not, but the
agent can read them the next time it runs.
## Runs
The **Runs** tab lists each time the agent ran: when it started, who or what woke it, the
message, the status, the number of attempts, how long it took and how much AI work it used,
counted in tokens.
Opening a run shows the message it was given, the earlier conversation, and every step the
agent took, including each tool it called and what came back. Choose **Export** to download
the run as a Markdown file.
Run history can include the content of chats you are not in, so it has its own permission,
**View agent runs**. By default only the admin and owner roles have it.
## Remove an agent
Open the agent and choose **Remove from organization**. The agent loses access straight
away. Its profile and its messages are kept.
## Related
- [Skills](https://vigilsecure.net/docs/concepts/skills.md)
- [Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#ai-agents-and-skills)
---
# Users
> A user is a person in your Vigil organization, from guards to owners. Invite users by email, SMS or link, give them roles, and remove them when they leave.
Source: https://vigilsecure.net/docs/concepts/users/
A user is a person. In Vigil a person has one account, and that account can belong to any
number of [organizations](https://vigilsecure.net/docs/concepts/organizations.md). What a person can do in your
organization is decided by the [roles](https://vigilsecure.net/docs/concepts/roles.md) you give them there.
"Guard" is a role, not a different kind of account. A guard, a supervisor and an owner are
all users.
You find them under **Directory → Users** in the console.
## The user list
The list shows everyone who is in your organization and everyone who has been invited but
has not joined yet.
- Each row shows the person's name, how they sign in (their email, or **Signs in by ID
number** for a guard who joined on a device), their roles and a state: **Member** or
**Invited**.
- Filter by **Members** or **Invited**, search by name and sort by name or by when they
joined.
Seeing the list needs the **View members** permission, which every default role has.
## How people join
| Way | Who it suits | How it works |
| ------------------------------ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Invitation by email or SMS** | Managers, supervisors, control room | You send it from **Invite a user**. They sign in with that address or number and accept. Valid for 7 days. |
| **Invite link** | Somebody standing next to you, or a contact on WhatsApp | You create a link and send it yourself. It works once, for 15 minutes. |
| **Sign-in on a device** | Guards | The guard enters their South African ID number on a device linked to your organization, adds their name and photo, and joins with the guard role. |
[Set up your organization](https://vigilsecure.net/docs/setup/set-up-your-organization.md) walks through sending
invitations.
## A user's page
Open a user to see two tabs:
- **Profile**: when they joined and how they sign in.
- **Permissions**: their roles, and the full list of permissions those roles add up to.
### Change somebody's roles
1. Open the user and choose the **Permissions** tab, then **Edit roles**.
2. Select the roles they should have. Roles you clear are removed when you save.
3. Choose **Save roles**.
Two rules protect you from mistakes:
- You can only give permissions you hold yourself.
- You can only change the roles of somebody whose permissions you hold in full. A manager
cannot edit an owner.
Changing roles needs the **Change member roles** permission, which the operator, manager,
admin and owner roles have. The change takes effect on the person's next action.
## Remove a user
Open the user and choose **Remove from organization**. They lose access to its sites, chats
and everything else in it straight away. What they wrote stays, with their name on it. To
come back, somebody has to invite them again.
People can also leave by themselves, from the list of organizations they see after signing
in. The last owner cannot leave until somebody else is an owner.
## What a user controls themselves
Each person manages their own account under **Account settings**: their name and photo,
the email address and mobile number their sign-in codes go to, their South African ID
document, and their [access tokens](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#step-1-create-an-access-token).
These follow them into every organization. An organization cannot change them.
## Users and agents
[Agents](https://vigilsecure.net/docs/concepts/agents.md) are members of your organization too, with roles of their
own, but they are listed separately under **Directory → Agents**. In chats, people and
agents appear side by side.
## Related
- [Roles and permissions](https://vigilsecure.net/docs/concepts/roles.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#people-and-roles)
---
# Roles and permissions
> Roles decide what each person and agent can do in a Vigil organization. Vigil has six default roles, from guard to owner, and you can create your own.
Source: https://vigilsecure.net/docs/concepts/roles/
A role is a named set of permissions. You give roles to
[users](https://vigilsecure.net/docs/concepts/users.md) and to [agents](https://vigilsecure.net/docs/concepts/agents.md), and the roles add up
to what each one can see and do in your organization.
You find them under **Directory → Roles** in the console. Choose a role to see everything
it allows and who holds it.
## Default roles
Every organization has these six roles. They cannot be changed or deleted.
| Role | Made for | In short |
| -------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| **guard** | People working on a device in the field | Reads sites, beacons, devices, people and agents; starts chats |
| **supervisor** | Shift and site supervisors | Everything a guard can, plus managing sites and beacons and reading artifacts |
| **operator** | The control room | Plus inviting and removing people, linking devices and gateways, and managing chats |
| **manager** | Operations managers | Plus creating and editing agents and skills, and publishing and sharing artifacts |
| **admin** | Administrators | Plus creating roles, reading agent runs, seeing device locations, and sending device commands |
| **owner** | The people accountable for the company's account | Everything, including editing and deleting the organization |
Each role includes everything the role above it in the table can do.
### What each default role can do
| Area | guard | supervisor | operator | manager | admin | owner |
| ---------------------------------------------------------------------------- | ----- | ---------- | -------- | ------- | ----- | ----- |
| View people, roles, agents and skills | Yes | Yes | Yes | Yes | Yes | Yes |
| View sites, beacons and devices | Yes | Yes | Yes | Yes | Yes | Yes |
| Start chats | Yes | Yes | Yes | Yes | Yes | Yes |
| Create, edit and archive sites and beacons | | Yes | Yes | Yes | Yes | Yes |
| View artifacts | | Yes | Yes | Yes | Yes | Yes |
| Invite people, change their roles, remove them | | | Yes | Yes | Yes | Yes |
| Link and rename devices; link camera gateways | | | Yes | Yes | Yes | Yes |
| Manage chats they are in without being an owner, and moderate messages there | | | Yes | Yes | Yes | Yes |
| Create, edit and remove agents and skills | | | | Yes | Yes | Yes |
| Publish, edit, archive and share artifacts | | | | Yes | Yes | Yes |
| Create, edit and delete roles | | | | | Yes | Yes |
| View agent runs and agent spend | | | | | Yes | Yes |
| See device locations, battery and signal | | | | | Yes | Yes |
| Send device commands; unlink devices | | | | | Yes | Yes |
| Edit or delete the organization | | | | | | Yes |
| Send email from the organization | | | | | | Yes |
The person who creates an organization is its first owner.
## Custom roles
When the default roles do not fit, create your own. A common case is a control room
operator who also needs to see device locations, without the rest of what an admin can do.
1. Choose **Directory → Roles**, then **New role**.
2. Enter a **Role name**, such as `Control room`. Under **Start from**, choose **Blank** or
an existing role to copy its permissions.
3. Tick the **Permissions** the role should have. Choose **Details** to read what each one
allows.
4. Review and choose **Create role**.
You can edit, duplicate and delete custom roles. A change applies to everyone who holds the
role. A role cannot be deleted while a person, an agent or a pending invitation still uses
it.
Creating and editing roles needs the admin or owner role, and you can only put permissions
in a role that you hold yourself.
## Permissions
Permissions are grouped the way the console shows them.
### People and access
| Permission | Allows |
| ----------------------------------- | --------------------------------------------------------- |
| Send invitations | Invite people by email, phone number or a single-use link |
| Cancel invitations | Withdraw an invitation |
| View members | See the organization's members and their roles |
| Change member roles | Change the roles a member holds |
| Remove members | Remove people from the organization |
| View, create, edit and delete roles | Manage roles, limited to permissions you hold |
### Operations
| Permission | Allows |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| View, create, edit and remove agents | Manage agents, their instructions and their roles |
| View agent runs | See each time an agent ran, what woke it, what it did, and what agents cost. This includes the content of chats the viewer is not in. |
| View, write, edit and archive agent skills | Manage your organization's skills |
| View, create, edit and archive sites | Manage sites |
| View, register, edit, assign and archive beacons | Manage beacons and move them between sites |
| View devices | See the devices linked to the organization |
| Link, rename and unlink devices | Bring devices in, name them and release them |
| Send device commands | Send a device a command, such as a sign-in request |
| See device locations | See where devices are on the map, their battery and signal, and which are near a site |
| Link gateways | Link a camera gateway |
### Communication
| Permission | Allows |
| ------------------------- | ---------------------------------------------------------------------------------------- |
| Create channels | Start a chat |
| Edit and archive channels | Rename or close a group without being its owner |
| Manage channel members | Add and remove members of a group without being its owner |
| Moderate messages | Take down another person's message |
| Send emails | Send email from the organization to any address, once Vigil has switched email on for it |
### Artifacts
| Permission | Allows |
| ----------------------------------- | --------------------------------------------------------------------- |
| View artifacts | Open the organization's artifacts |
| Publish, edit and archive artifacts | Manage artifacts |
| Share artifacts by public link | Create and revoke links that let anyone holding them open an artifact |
### Organization
| Permission | Allows |
| -------------------- | -------------------------------------------------------- |
| Edit organization | Change the name, logo, website, address and company size |
| Archive organization | Delete the organization for everybody |
## How permissions are applied
- A person or agent with several roles has every permission in any of them.
- Permissions apply inside one organization. Somebody who is an owner in one company has no
access to another unless they are a member there too.
- Chats have their own access. Being an owner does not let you read a chat you are not in,
and the chat permissions apply only to chats you are in.
- An [access token](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#step-1-create-an-access-token), the key an AI assistant or other software uses, has exactly
the permissions of the person who created it.
- Nobody can give away more than they have. This holds for invitations, role changes and
custom roles.
## Related
- [Users](https://vigilsecure.net/docs/concepts/users.md)
- [Agents](https://vigilsecure.net/docs/concepts/agents.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#people-and-roles)
---
# Organizations
> An organization is a security company's private workspace in Vigil. It holds the company's people, sites, devices, chats and agents, and its settings and usage.
Source: https://vigilsecure.net/docs/concepts/organizations/
An organization is one security company's workspace in Vigil. Everything you set up belongs
to it: your [users](https://vigilsecure.net/docs/concepts/users.md) and their [roles](https://vigilsecure.net/docs/concepts/roles.md), your
[sites](https://vigilsecure.net/docs/concepts/sites.md), [beacons](https://vigilsecure.net/docs/concepts/beacons.md) and
[devices](https://vigilsecure.net/docs/concepts/devices.md), your [chats](https://vigilsecure.net/docs/concepts/communication.md),
[agents](https://vigilsecure.net/docs/concepts/agents.md) and [artifacts](https://vigilsecure.net/docs/concepts/artifacts.md).
An organization is a hard boundary. Nothing in it is visible to another organization, and
every permission is checked against membership of the organization the data belongs to.
Its settings are under **Directory → Organization** in the console.
## One company, one organization
Create one organization for your company, and model your clients as
[sites](https://vigilsecure.net/docs/concepts/sites.md) inside it. A person can belong to several organizations and
switch between them from the organization switcher at the bottom of the sidebar, which is
useful for a group with separate operating companies.
To create one, see [Set up your organization](https://vigilsecure.net/docs/setup/set-up-your-organization.md).
## General
The **General** tab holds how your organization appears across Vigil:
- **Organization photo**: your logo.
- **Name**: shown in the console and on your guards' devices.
- **Website**, **Address** and **Company size**: optional.
Changing these needs the **Edit organization** permission, which the owner role has.
## Features
The **Features** tab lists optional parts of Vigil and whether each is enabled for your
organization. Features that are still being rolled out are switched on by Vigil.
[Cameras](https://vigilsecure.net/docs/concepts/cameras.md) is one of them.
## Usage
The **Usage** tab shows what your organization used in a month and what it costs. Choose
**This month** or **Last month**.
| Panel | What it shows |
| ------------------ | ------------------------------------------------------------------------------------------------------------ |
| **Agent spend** | The total spend and number of runs, and the same for each agent with its share. Failed runs are not charged. |
| **Infrastructure** | The number of sites, beacons, devices and cameras, the monthly price of each, and the cost. |
| **Total** | Agent spend plus a month of the infrastructure. |
Agent spend is based on the amount of text an agent reads and writes while it works, at
the same rate whichever AI model is used. Infrastructure is charged for a full month at the
current price.
What you see depends on your role. Agent spend needs the **View agent runs** permission,
each infrastructure row needs permission to view that kind of record, and the total is shown
only to people who can view all of them, which by default means admins and owners. The
cameras row appears when the cameras feature is enabled. For pricing, contact
[admin@vigilsecure.net](mailto:admin@vigilsecure.net).
## Search the organization
Choose the search button in the sidebar, or press Ctrl+K (⌘K on a Mac), to search sites,
beacons, devices, users, agents and roles by name, and to jump to a page or an action such
as **Add site** or **Invite a user**. You only see results your role lets you read.
## Leave or delete an organization
- **Leave**: from the list of organizations you see after signing in, choose **Leave
organization**. You lose access straight away; what you wrote stays. The last owner cannot
leave until somebody else holds the owner role.
- **Delete**: on the **Advanced** tab, an owner can choose **Delete organization**. Everybody
loses access at once, its agents stop running, its invitations stop working and its
devices can no longer reach it. Vigil keeps its messages, sites and history instead of
erasing them, but the organization cannot be brought back from the console.
To hand a company over, give somebody else the owner role first, then leave.
## Related
- [Set up your organization](https://vigilsecure.net/docs/setup/set-up-your-organization.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#your-company-and-your-data)
---
# The guard app
> The guard app runs on Vigil devices. Guards use it to sign in for a shift, scan beacons on patrol, chat, send voice notes and photos, and log gate traffic.
Source: https://vigilsecure.net/docs/concepts/guard-app/
The guard app is what a guard uses on shift. It runs on a
[Vigil device](https://vigilsecure.net/docs/concepts/devices.md), a rugged Android handset your company owns, and it
is the only thing the device runs. A guard needs no email address, no password and no
training on the console.
The app has three tabs: **Chats**, **Map** and **Profile**.
## Start a shift
A device that is linked to your organization shows your company's name and logo and the
button **Sign in to start shift**.
1. The guard chooses **Sign in to start shift**.
2. They enter their 13-digit South African ID number on the keypad.
3. They choose **Start shift**.
Sign-in works without signal, because the device already holds your organization's users.
### A guard's first shift
If the device does not know the ID number, it shows **We don't know this ID yet** and
**Create a new user**. The guard enters their first and last name and takes a photo of
their face. They join your organization with the guard role and can start working at once.
You do not have to invite guards beforehand.
One person is signed in on a device at a time. To end a shift the guard opens **Profile**
and chooses **Sign out & end shift**.
### When nobody is signed in
An agent can send the device a sign-in request. The device sounds an alarm and
shows **Sign In Requested** until somebody chooses **Acknowledge** and signs in. See
[Guard check-ins](https://vigilsecure.net/docs/examples/guard-check-ins.md).
## Chats
The **Chats** tab lists the guard's chats. A guard can start a direct chat with any person
or agent in the organization and takes part in the groups they have been added to.
In a chat, a guard can send:
- **Text**
- A **voice note**: tap the microphone, speak, send. Vigil adds a transcript.
- A **photo**, taken with the camera
- A **beacon scan**
- A **vehicle** or a **person** at the gate
Ticks show whether a message was sent, delivered and read. A new message gives a sound and
a double buzz.
## Patrols
A patrol reaches the guard as a card in a chat, titled **Patrol**, with how many beacons
are scanned and when it ends. The card has a **Scan** button, and **Show 7 beacons** lists
each beacon and whether it has been scanned.
- For a **QR code** beacon, the guard points the camera at the code.
- For a **geofence** beacon, the guard walks into its area and checks in.
Each scan ticks off its beacon. The card shows **3 of 7 scanned**, then **All 7 scanned**.
See [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md).
## The gate: vehicles and people
From a chat, the guard chooses **+**, then **Vehicle** or **Person**, and **In** or **Out**.
- **Vehicle**: scan the licence disc on the windscreen, which fills in the plate, make,
model and expiry. Scan the driver's ID card or driver's licence. Add passengers, a reason
for the visit and photos of the load, plate or damage.
- **Person**: scan their ID card or driver's licence, add a reason and a photo.
Where there is no barcode, the guard can type the plate, or type a passport or other
document number. When a vehicle that came in earlier leaves, the driver and passengers are
filled in from the entry. See [Gate access control](https://vigilsecure.net/docs/examples/gate-access-control.md).
## Map
The **Map** tab shows your organization's sites and beacons and the guard's own position.
The map is stored on the device, so it works without signal. A device downloads its map
over Wi-Fi.
Standing inside a geofence beacon shows a card with **Scan**. The scan goes to the guard's
default chat for beacon scans. The device can vibrate and play a sound when the guard walks
into a beacon's area; both can be switched off on **Profile**.
## Working without signal
Guards often work where coverage is poor. The app is built for it:
- Sign-in, reading chats, the map, text, voice notes, photos, scans and gate entries all
work offline.
- What a guard sends is kept on the device and sent when the connection returns.
- A beacon scan keeps the time it was really made, so a patrol walked without signal still
counts. Other messages sent offline, such as a gate entry or a voice note, are timed when
they reach Vigil.
## What the device reports
While the app runs, the device reports its battery, signal and position every ten minutes,
and its position more often while it is moving. It also records when a user signs in or
out, when it is put on or taken off a charger, and when it joins or leaves Wi-Fi. You see
all of this on the [device's page](https://vigilsecure.net/docs/concepts/devices.md) in the console.
The device shows a permanent **Tracking location** notification while it does this.
## A locked-down device
A Vigil device is set up as a single-purpose tool. Guards cannot install apps or leave the
guard app. The app updates itself. A recovery screen, protected by a code, lets a
technician fix a device in the field.
## Related
- [Devices](https://vigilsecure.net/docs/concepts/devices.md)
- [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#devices-and-the-guard-app)
---
# Guard patrols and checkpoint tours
> How to run guard patrols in Vigil. Beacons mark the checkpoints, an agent requests each patrol on a schedule, and every scan is proof with a time and a name.
Source: https://vigilsecure.net/docs/examples/guard-patrols/
**The scenario.** A client wants proof that a guard walks the property every three hours
through the night: every gate, every door, the generator room and the perimeter corners.
You want to know about a missed round while it can still be fixed, not when the client
complains.
## How Vigil represents it
| The real world | In Vigil |
| ------------------------------- | ------------------------------------------------------------------------------------------- |
| The property | A [site](https://vigilsecure.net/docs/concepts/sites.md) |
| Each checkpoint on the round | A [beacon](https://vigilsecure.net/docs/concepts/beacons.md) deployed to that site |
| The guard on duty | The [user](https://vigilsecure.net/docs/concepts/users.md) signed in on the site's [device](https://vigilsecure.net/docs/concepts/devices.md) |
| "Walk the round now" | A patrol request message, sent by an [agent](https://vigilsecure.net/docs/concepts/agents.md) |
| The guard reaching a checkpoint | A beacon scan message |
| The round, done or missed | The patrol request's progress: scanned beacons out of the total, inside its time window |
| "Every three hours" | The agent's schedule |
| The proof for the client | An [artifact](https://vigilsecure.net/docs/concepts/artifacts.md) built from the scans |
## Set it up
### 1. Add the site and its beacons
Add the site from the [Overview](https://vigilsecure.net/docs/concepts/overview.md) map, then add a beacon at each
checkpoint. Use a **QR code** beacon where you can fix a label, and a **geofence** beacon
for open ground. Give each beacon the name a guard would use: `North gate`, `Generator
room`, `Parking level 2`.
### 2. Put a device on the site
[Link a device](https://vigilsecure.net/docs/concepts/devices.md#link-a-device) and leave it at the site. The guard
on shift signs in on it with their ID number.
### 3. Give an agent the job
[Create an agent](https://vigilsecure.net/docs/concepts/agents.md#create-an-agent) and write the patrol into its
instructions:
```text
You run the patrols at Rosebank Mall.
Every three hours from 18:00 to 06:00, ask the guard signed in at Rosebank Mall to
patrol all of the site's beacons, and give them 30 minutes.
Five minutes after each window closes, check the patrol. If beacons are missing, tell
the guard which ones, and tell Thandi Nkosi in her chat.
If nobody is signed in at the site, request a sign-in on the site's device first.
```
The agent needs to read sites, beacons and devices, see device locations, send device
commands and start chats. The admin role covers this, or create a
[custom role](https://vigilsecure.net/docs/concepts/roles.md#custom-roles) with only those permissions.
Then message the agent once to start it: "Set up your schedules from your instructions."
Schedules are created by the agent itself, so nothing happens until you ask. Check the
agent's **Schedules** tab to see them.
## What happens on a shift
1. **21:00.** The agent's schedule falls due. It finds the Rosebank beacons, sees that Sipho
is signed in on the site's device, and posts a patrol request in its chat with him:
seven beacons, to be done by 21:30.
2. Sipho's device sounds. The chat shows a **Patrol** card: **0 of 7 scanned · Ends 21:30**.
3. He walks the round. At each checkpoint he chooses **Scan** and reads the QR code, or
checks in at the geofence. Each scan ticks off its beacon.
4. **21:24.** The card reads **All 7 scanned**. The agent thanks him. While a patrol is on
track the agent stays quiet, so the guard is not interrupted.
5. **00:00.** The next request goes out. This time two beacons are still open when the
window closes at 00:30.
6. **00:35.** The agent's check falls due. It tells Sipho which beacons were missed and
messages Thandi.
An agent is woken by a scan or by its schedule, not by a window closing. That is why the
instructions ask for a check after each window. Without one, a missed patrol is reported
at the agent's next run.
If Sipho walks through an area with no signal, his scans are kept on the device with their
real times and sent when he is back in coverage. A scan made inside the window still counts.
## What counts as done
A scan fills its place on the patrol when all of these hold:
- The beacon is on the patrol and has not been scanned for it yet.
- The scan was made inside the patrol's time window.
- The patrol request is the latest one in that chat.
Any other scan, such as a second scan of the same beacon or one made after the window
closed, stays in the chat as an ordinary scan and does not count towards the patrol.
To have a single checkpoint checked, the agent sends a patrol with one beacon. On the device
it reads **Scan a beacon**.
## Report on it
Ask an agent for the record:
> Publish a report of this week's patrols at Rosebank Mall for the client. One row per
> patrol: start time, guard, beacons scanned out of the total, and how long it took. List
> every missed beacon at the end.
The agent publishes it as an artifact, which you can
[share with the client by link](https://vigilsecure.net/docs/concepts/artifacts.md#share-an-artifact-with-a-client).
## Variations
- **Different rounds.** Name the beacons: "the perimeter beacons at 22:00 and 04:00, all
beacons at 01:00".
- **Ad hoc.** In a chat with the agent: "Ask whoever is at Rosebank to check the generator
room now."
- **Several sites.** One agent can run the patrols for every site. Say so in its
instructions.
- **No new agent.** Ask the Operations agent in a chat to run the patrols. Its instructions
cannot be edited, but it keeps schedules like any other agent.
## Related
- [Guard check-ins](https://vigilsecure.net/docs/examples/guard-check-ins.md)
- [Automated client reports](https://vigilsecure.net/docs/examples/client-reports.md)
---
# Gate access control for vehicles and visitors
> How to log every vehicle and visitor at a gate with Vigil. Guards scan the licence disc and driver's licence, and each entry is matched to its exit.
Source: https://vigilsecure.net/docs/examples/gate-access-control/
**The scenario.** A guard at the boom of an estate or a business park has to log every
vehicle and visitor that goes in and out. The paper register is slow, hard to read and
impossible to search when the client asks who was on site last Tuesday night.
## How Vigil represents it
| The real world | In Vigil |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| The gate | A group chat, such as `Rosebank main gate`, with the gate guards, their supervisor and an agent |
| The guard at the boom | The user signed in on the gate's [device](https://vigilsecure.net/docs/concepts/devices.md) |
| A vehicle arriving or leaving | A **vehicle** message with a direction: in or out |
| A pedestrian arriving or leaving | A **person** message with a direction: in or out |
| The licence disc, ID card or driver's licence | Scanned by the device's camera into the message |
| The register | The chat itself, in order, with a time and a guard's name on every entry |
| "How long were they here?" | The link Vigil makes between an exit and its entry |
## Set it up
1. [Link a device](https://vigilsecure.net/docs/concepts/devices.md#link-a-device) and name it after the gate.
2. In **Communication**, create a group for the gate. Add the supervisors who should see
the traffic, and an agent if you want summaries or alerts. Add the agent when you create
the group.
3. The guards who work the gate are added to the group. They open it on the device at the
start of their shift.
One chat per gate keeps each gate's register separate and in order.
## What happens at the gate
### A vehicle comes in
1. The guard opens the gate chat, chooses **+**, then **Vehicle**, and leaves the direction
on **In**.
2. **Scan licence disc.** The guard holds the device against the windscreen. The barcode on
the disc fills in the plate, make, model, colour and the disc's expiry date.
3. **Scan driver's ID or licence.** The barcode on a South African ID card or driver's
licence fills in the driver's details.
4. If there are passengers, the guard sets how many and can scan their documents too.
5. The guard enters the **Reason for visit**, such as `Delivery for unit 14`, and can take
photos of the load, the plate or existing damage.
6. **Send vehicle in.**
The chat shows a **Vehicle in** card with the plate, the driver, the number of passengers
and the reason. An expired licence disc or driver's licence is flagged on the card.
### The vehicle leaves
The guard chooses **Vehicle**, switches to **Out** and scans the disc. Vigil finds the
entry for that plate, if it was within the past 48 hours, and fills in the driver and
passengers from it, so the guard only confirms. The **Vehicle out** card shows when the vehicle came in and how long it was on
site.
### A person on foot
The guard chooses **Person**, scans their ID card or driver's licence, adds a reason and a
photo, and sends it. Leaving works the same way as for a vehicle.
### When there is nothing to scan
A foreign vehicle, a damaged disc or a visitor with a passport can be typed instead:
**Type the plate instead**, or a passport or other document number. The card marks typed
details as **Typed, not scanned**, so you can tell them from scanned ones.
## Use the record
Because every entry is stored as details, not only as words, an agent can answer questions
and build reports from it:
- "Which vehicles are on site right now?"
- "Was CA 123-456 here last week, and for how long each time?"
- "Publish a report of all contractor visits in November, with entry and exit times."
- "Tell me in the managers' chat when a vehicle with an expired disc comes in."
An agent in the gate chat can read the register, but an entry does not wake it: in a group
an agent is woken only when somebody mentions it. For alerts, ask the agent to review the
gate chat on a schedule, such as every fifteen minutes.
## Privacy
Gate records hold personal information about visitors. In Vigil they are visible only to
the participants of the gate chat and to agents in it. Add only the people who need them,
and share reports with a client through an artifact's
[share link](https://vigilsecure.net/docs/concepts/artifacts.md#share-an-artifact-with-a-client), which you can
expire and revoke.
## Related
- [Communication](https://vigilsecure.net/docs/concepts/communication.md)
- [The guard app](https://vigilsecure.net/docs/concepts/guard-app.md)
---
# Guard check-ins and site coverage
> How to make sure every site has a guard on duty with Vigil. An agent checks who is signed in, sounds a sign-in request when nobody is, and escalates.
Source: https://vigilsecure.net/docs/examples/guard-check-ins/
**The scenario.** A site must have a guard on duty from 18:00 to 06:00. You want to know
within the hour if a guard has not arrived, has left early, or has gone quiet, without a
supervisor phoning every site.
## How Vigil represents it
| The real world | In Vigil |
| ------------------------------------- | ------------------------------------------------------------------------------------------------- |
| The post | A [site](https://vigilsecure.net/docs/concepts/sites.md) with a location |
| "A guard is on duty" | A [user](https://vigilsecure.net/docs/concepts/users.md) is signed in on a [device](https://vigilsecure.net/docs/concepts/devices.md) near the site |
| The hourly check | An [agent](https://vigilsecure.net/docs/concepts/agents.md) with a schedule |
| "Is anybody there?" | A **sign-in request**, a device command that sounds an alarm on the device |
| "Nobody answered" | A message from the agent to a supervisor |
| A shift that ended without a sign-out | A **sign-out** command |
| The proof | The device's event log: every sign-in and sign-out with its time |
There is no roster to maintain. Coverage is read from what is true on the ground: a device
at the site with somebody signed in on it.
## Set it up
1. Give each site a location, by adding it from the map. The agent finds a site's devices
by looking for devices within a few hundred metres of it.
2. [Link a device](https://vigilsecure.net/docs/concepts/devices.md#link-a-device) for each site and keep it there.
3. Create an agent with instructions like these:
```text
You watch the night-shift coverage of all our sites.
Every hour on the hour from 18:00 to 06:00, check each site. If somebody is signed in
on a device at the site, do nothing. If nobody is, request a sign-in on the nearest
device.
If a site has had nobody signed in for two checks in a row, tell Thandi Nkosi in her
chat: the site, the device and since when.
At 06:30, sign out anybody who signed in before 19:00 and is still signed in.
```
4. Give the agent a role that can view sites and devices, see device locations and send
device commands. The admin role has these, or create a
[custom role](https://vigilsecure.net/docs/concepts/roles.md#custom-roles) with only them plus **Create
channels**, so it can message people.
5. Message the agent once to start it: "Set up your schedules from your instructions."
Schedules are created by the agent itself, so nothing happens until you ask. Check the
agent's **Schedules** tab to see them.
## What happens on a shift
1. **18:00.** The agent checks every site. At Rosebank Mall, Sipho signed in at 17:52. It
does nothing.
2. At the depot, nobody is signed in. The agent sends a sign-in request to the depot's
device. The device sounds an alarm and shows **Sign In Requested**.
3. Lindiwe, who had arrived but not signed in, taps **Acknowledge** and signs in with her
ID number.
4. **19:00.** The agent checks again. The depot is covered. The clinic has had nobody
signed in at 18:00 and at 19:00, so the agent messages Thandi: "Bruntville Clinic: nobody
signed in since 18:00. Sign-in requested on Clinic gate twice, no answer."
5. **06:30.** Sipho went home without signing out. The agent signs him out, so the day
guard's sign-in is the one that counts.
A sign-in request never interrupts a working guard: a device with somebody signed in
ignores it.
## What you can see afterwards
- On each device's **Events** tab: every sign-in and sign-out, with the time.
- On the **State log** tab: where the device was through the night, and its battery and
signal.
- From an agent: "Publish a coverage report for November: for each site and night, when
the first guard signed in and when the last signed out."
## Limits to know about
- A sign-in request travels to the device over the internet. A device that is off, flat or
out of signal for more than five minutes does not receive it. The agent's escalation to a
person covers that case.
- Devices report their position about every ten minutes. A device that has just arrived at
a site may take a few minutes to count as being there.
## Variations
- **Welfare checks.** For lone workers, have the agent message the guard on the hour, and
check at ten past whether they replied.
- **Named devices.** For a large estate, name the site's devices in the agent's
instructions instead of relying on distance.
## Related
- [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md)
- [Device fleet monitoring](https://vigilsecure.net/docs/examples/device-fleet-monitoring.md)
---
# Automated client reports
> How to send clients a regular security report with Vigil. An agent builds the report from recorded patrols and events, publishes it and you share a link.
Source: https://vigilsecure.net/docs/examples/client-reports/
**The scenario.** Every Monday your clients expect a report on the past week: were the
patrols done, what came through the gate, what went wrong. Today a manager spends Monday
morning assembling them from registers and spreadsheets.
## How Vigil represents it
| The real world | In Vigil |
| -------------------------------- | ------------------------------------------------------------------------------------------------ |
| The evidence | Messages already recorded in chats: beacon scans, patrol requests, vehicles, people, voice notes |
| The person who writes the report | An [agent](https://vigilsecure.net/docs/concepts/agents.md) |
| "Every Monday at 07:00" | The agent's schedule |
| The report | An [artifact](https://vigilsecure.net/docs/concepts/artifacts.md): a self-contained page |
| Sending it to the client | A **share link**, which opens that one report without a Vigil account |
| House style | The agent's instructions, or an organization [skill](https://vigilsecure.net/docs/concepts/skills.md) |
The report is built from what was recorded when it happened, so nobody has to remember or
retype anything.
## Set it up
1. Make sure the agent can see the evidence. An agent reads the chats it is in. If your
patrols are requested by the same agent, it already has them. Include it when you create
each gate chat whose traffic belongs in a report, because the console cannot yet add an
agent to a chat that already exists.
2. Give the agent a role that can publish artifacts. The manager role can. For the
coverage section it also needs **See device locations**, which the admin role has.
3. Write the report into its instructions:
```text
Every Monday at 07:00, publish a weekly report for each site, covering Monday to
Sunday of the week before.
Each report has:
- A heading with our company name, the site, the client and the dates.
- Patrols: one row per patrol with the start time, the guard, beacons scanned out of
the total and the duration. Then every missed beacon.
- Coverage: for each night, when the first guard signed in and the last signed out.
- Gate: vehicles and people in and out per day, and any expired licence discs.
- Incidents: anything guards reported by text or voice note that needs the client's
attention, in one or two sentences each.
Write plainly. Do not include identity numbers. Times are South African time.
When the reports are published, tell me in our chat.
```
4. Message the agent once to start it: "Set up your schedules from your instructions."
Schedules are created by the agent itself, so nothing happens until you ask. Check the
agent's **Schedules** tab to see them.
## What happens each week
1. **Monday 07:00.** The agent's schedule falls due. For each site it reads the week's
patrol requests, scans, sign-ins and gate entries, and builds a page.
2. It publishes each page as an artifact titled, for example, `Rosebank Mall: 30 November
to 6 December`, and tells you in your chat.
3. You open **Artifacts**, read the report, and choose **Share**. You label the link `Acme
Property, weekly`, set it to expire in 30 days and send it to the client.
4. The client opens the link in a browser. They need no account and see only that report.
If you spot a mistake, ask the agent to correct and republish the report. The link the
client already has shows the corrected version.
## One-off reports
You do not need a schedule to get a report. Ask in a chat:
> Publish a report on the incident at the depot on Saturday night: the timeline from the
> gate chat and the guards' voice notes, and the patrols before and after.
Or build one at your own desk with
[your own AI assistant](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#connect-your-own-ai-assistant), which
can publish artifacts too.
## Keep client data safe
- A share link is public to whoever holds it. Send it only to the client, give it an
expiry and revoke it when the contract ends.
- Leave personal details out of client reports unless the client needs them. Say so in the
agent's instructions.
- Review a new report format yourself for the first few weeks before you rely on it.
## Related
- [Artifacts](https://vigilsecure.net/docs/concepts/artifacts.md)
- [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md)
- [Gate access control](https://vigilsecure.net/docs/examples/gate-access-control.md)
---
# Device fleet monitoring
> How to keep a fleet of guard devices working with Vigil. Track battery, signal, charging and location for every device, and have an agent flag problems.
Source: https://vigilsecure.net/docs/examples/device-fleet-monitoring/
**The scenario.** You have forty devices across twenty sites. A device that is flat, lost
or left in a drawer means a guard with no patrols and no way to reach the control room, and
you usually find out too late.
## How Vigil represents it
| The real world | In Vigil |
| --------------------------------------- | -------------------------------------------------------------------------------------- |
| A handset | A [device](https://vigilsecure.net/docs/concepts/devices.md), identified by its serial number and named by you |
| "Is it working?" | The device's **status**: last report, battery, signal, location and app version |
| What happened to it | The device's **event log**: sign-ins, charger on and off, Wi-Fi, movement, app updates |
| How it has been doing | The device's **state log**: battery and signal charts and its track on a map |
| The daily check | An [agent](https://vigilsecure.net/docs/concepts/agents.md) with a schedule |
| "Tell me when a device leaves or joins" | An agent **trigger** on device linked and unlinked |
Every device reports its battery, signal and position every ten minutes, and records events
as they happen, with no action from the guard.
## Check a device yourself
Open **Infrastructure → Devices** and choose a device.
- **Status** shows the signed-in user, battery, signal and location now. A device that has
missed its reports shows **Silent for** and how long.
- **Events** answers "when was it last on a charger?" and "who had it on Tuesday night?".
- **State log** shows the battery draining and charging over the past 24 hours or 7 days,
and where the device went.
The [Overview](https://vigilsecure.net/docs/concepts/overview.md) map shows every device at once. Devices that have
not reported in the past hour are drawn faded.
## Have an agent watch the fleet
Give an agent the job, with a role that can view devices and see device locations:
```text
Every day at 17:00, before the night shift, check all our devices and tell me in our chat
about any that:
- have not reported for more than an hour,
- have a battery below 30% and are not on a charger,
- are more than a kilometre from every site,
- are running an older app version than the rest.
List them by name with the problem and the last time they reported. If everything is
fine, say so in one line.
When a device is linked to or unlinked from our organization, tell me.
```
Then message the agent once: "Set up your schedule and triggers from your instructions."
The first part becomes a schedule and the last line a trigger, which wakes the agent when
the change happens. Both are created by the agent itself, so nothing happens until you ask.
## What it looks like
**17:00.** The agent posts in your chat:
> 3 of 40 devices need attention before tonight.
> Depot gate: silent since 09:12, last battery 4%.
> Clinic patrol: battery 22%, not charging.
> Mall gate 2: 6 km from any site, last seen on the N3 at 16:40.
You phone the depot about the charger, and ask the agent a follow-up: "Who was signed in on
Mall gate 2 when it left the mall?"
## Good habits
- **Name every device** after where it lives: `Rosebank gate`, `Depot patrol`. A serial
number means nothing at two in the morning.
- **Keep devices on site** with a charger at the post. The event log shows whether they are
being charged.
- **Unlink devices you retire or send for repair**, so they do not show as silent.
- **Limit who can see locations.** The **See device locations** permission is separate from
viewing devices, and by default only admins and owners have it.
## Related
- [Devices](https://vigilsecure.net/docs/concepts/devices.md)
- [Guard check-ins](https://vigilsecure.net/docs/examples/guard-check-ins.md)
---
# Camera monitoring
> How to bring a site's CCTV cameras into Vigil. A gateway on site connects the cameras, and the control room watches live video and frames beside patrols.
Source: https://vigilsecure.net/docs/examples/camera-monitoring/
**The scenario.** A client's site already has network cameras. The control room wants to
look at them from the same place it follows patrols and talks to guards, and to be able to
send the guard on site to check what a camera shows.
> **Rolling out:** [Cameras](https://vigilsecure.net/docs/concepts/cameras.md) is being rolled out and is switched on for each
> organization by Vigil. Check **Organization → Features**, and
> [contact us](mailto:admin@vigilsecure.net) to have it enabled.
## How Vigil represents it
| The real world | In Vigil |
| ----------------------------------- | ---------------------------------------------------------------- |
| The site's camera network | A **gateway**: a small program on a computer at the site |
| Each camera | A **camera**, discovered by the gateway |
| Looking at a camera now | A **live stream**, started when somebody opens the camera |
| What the camera saw recently | **Frames**: stills sent by the gateway |
| "There is a person in this picture" | **Labels** from object detection on a frame |
| Sending somebody to look | A message or a patrol request to the guard signed in at the site |
## Set it up
1. In the console, open **Infrastructure → Cameras** and choose **Link gateway**. The
dialog has the gateway downloads for Windows, macOS and Linux.
2. Unzip and start the gateway on a computer at the site that can reach the cameras. It
writes its **Gateway ID** to `data/README.md` in its folder. Enter that ID in the
**Link gateway** dialog.
3. Add each camera's username and password to the gateway's credentials file, on that
computer. The credentials stay on site.
4. The cameras the gateway finds appear in the console by themselves. Each shows **Live**
or **No signal**.
Steps 2 and 3 are a job for whoever looks after the site's cameras or computers. The
computer and the cameras must be on the same network. Nothing has to be opened on the
site's firewall, because the gateway only connects out to Vigil.
## What the control room does
1. An operator opens **Cameras** and sees a card for each camera with its latest frame.
2. They open the camera at the back fence. Live video starts. If the camera can move, they
pan and tilt it.
3. They scroll back through the frames and turn on **Labels** to see what was detected in
each still.
4. Something looks wrong. In **Communication** they message the guard signed in at the
site, or ask an agent: "Ask whoever is at the depot to check the back fence now." (Asking
an agent who is at a site needs **See device locations**.) The
guard gets a one-beacon patrol and scans the checkpoint when they are there.
The camera, the request and the guard's scan are then on record together.
## What to know
- **Video is not recorded.** A live stream runs only while somebody is watching. Vigil
keeps recent frames, not footage. Keep your existing recorder for evidence.
- **Bandwidth.** A stream uses the site's upload connection only while it is being watched,
and everyone watching shares one stream.
- **Privacy.** Cameras are visible to the members of your organization. Decide who needs
them, and tell the client which cameras you connect.
## Related
- [Cameras](https://vigilsecure.net/docs/concepts/cameras.md)
- [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md)
---
# Alarm and third-party system alerts
> How to bring alerts from alarm panels, trackers and other systems into Vigil with a webhook, so they land in the same chat as the guards who respond.
Source: https://vigilsecure.net/docs/examples/alarm-integrations/
**The scenario.** Your sites have other systems that raise alerts: an alarm panel, an
electric fence monitor, a vehicle tracker, a fridge sensor. Each has its own app or sends
an email nobody reads at night. You want those alerts to arrive where the control room and
the guards already are.
## How Vigil represents it
| The real world | In Vigil |
| ---------------------------- | -------------------------------------------------------------------------------------------------- |
| The place alerts should land | A group chat, such as `Rosebank alarms`, with the control room, the site's supervisor and an agent |
| The other system | A **webhook** on that chat: a secret web address the system sends its alerts to |
| An alert | A message in the chat, shown under the webhook's name |
| Deciding what to do about it | The people in the chat, or an [agent](https://vigilsecure.net/docs/concepts/agents.md) |
| Sending somebody to check | A message or patrol request to the guard on site |
## Set it up
1. In **Communication**, create a group for the alerts and add the people who respond.
2. Open the group's **Channel details** and, under **Webhooks**, choose **New**. Name it
after the system, such as `Alarm panel`, and copy the **Webhook URL**. It is shown once.
3. Give the address to whoever looks after the other system: your alarm installer, the
supplier or your IT person. They enter it where the system sends its alerts.
[Post into a chat with a webhook](https://vigilsecure.net/docs/developers/webhooks.md) tells them exactly what to
send.
4. Ask them to send a test alert. It appears in the chat straight away.
Most alarm receivers, monitoring platforms and automation tools can send a webhook. For a
system that can only send email or SMS, an automation service can turn the email into a
webhook.
## What happens when an alert arrives
1. **02:14.** The panel posts to the webhook. The message appears in `Rosebank alarms` as
**Alarm panel**: "ALARM Zone 4 (loading bay) at Rosebank Mall, 02:14".
2. The operator on duty sees it in the console, with a notification.
3. They mention the agent in the same chat: "@Operations ask the guard at Rosebank to check
the loading bay."
4. The agent finds who is signed in at Rosebank and sends them a one-beacon patrol for the
loading bay. Finding who is at a site needs the **See device locations** permission,
which the agent is told to check on the person asking, so give your control room a role
that includes it. The guard walks there and scans the beacon, and adds a voice note: "All
clear, a pallet fell over."
5. The alert, the request, the scan and the voice note are on one timeline.
## Let an agent triage
A message from a webhook does not wake an agent by itself. That is deliberate: it stops an
outside system from driving an agent directly. There are two ways to involve one:
- **A person mentions the agent**, as above. A person stays in the loop for every response.
- **The agent checks on a schedule.** Include the agent when you create the chat and ask
it: "Every five
minutes between 18:00 and 06:00, read the new alerts in Rosebank alarms. For any alarm at
a site, ask the guard signed in there to check the zone and tell the control room chat."
## Keep it safe
- The webhook address is the only key. Anyone who has it can post into that chat, so treat
it like a password and send it only to the person who needs it.
- Use one webhook for each system. If an address leaks, **Revoke** that webhook and create
a new one without disturbing the others.
- A webhook can only post text into its own chat. It cannot read anything.
- A webhook accepts up to 30 alerts a minute.
## Going the other way
To send what happens in Vigil to another system, for example to open a ticket when a patrol
is missed, a developer can read it through the [Vigil API](https://vigilsecure.net/docs/developers/api.md).
## Related
- [Communication: webhooks](https://vigilsecure.net/docs/concepts/communication.md#webhooks-let-another-system-post-into-a-chat)
- [Post into a chat with a webhook](https://vigilsecure.net/docs/developers/webhooks.md)
---
# Frequently asked questions
> Short answers to common questions about Vigil, covering accounts, guards, devices, beacons, patrols, chats, AI agents, reports, cameras and your company's data.
Source: https://vigilsecure.net/docs/faq/
Short answers to the questions security companies ask most often. Each answer links to the
page that explains it in full. If yours is not here, email
[admin@vigilsecure.net](mailto:admin@vigilsecure.net).
## Accounts and signing in
### Do I need a password?
No. Vigil only uses one-time codes, sent to your email address or mobile number. Anyone who
can read your work email or your SMS messages can sign in as you, so keep those accounts
secure. See [Create a Vigil account](https://vigilsecure.net/docs/setup/create-an-account.md).
### Can I use Vigil in two browser windows?
Vigil runs in one window at a time. If you open a second one, it shows **Vigil is open in
another window**; choose **Use here** to move to it.
### How do guards sign in?
On a Vigil device, a guard enters their 13-digit South African ID number. They need no
email address and no password. See [The guard app](https://vigilsecure.net/docs/concepts/guard-app.md).
### Do my clients need a Vigil account?
No. You share finished work with a client, such as a weekly patrol report, through a link
that opens in any browser. See
[Artifacts](https://vigilsecure.net/docs/concepts/artifacts.md#share-an-artifact-with-a-client).
## Your company and your data
### Is our data shared with other companies on Vigil?
No. Each organization's data is separate. A person who belongs to two organizations sees
each one on its own and cannot move data between them. See
[Organizations](https://vigilsecure.net/docs/concepts/organizations.md).
### Can one person belong to two security companies?
Yes. They sign in once and choose which organization to open. Their roles are separate in
each, and neither company can see the other's data.
### Can we have a separate organization for testing?
Yes. Anyone can create another organization and use it to try things out.
## People and roles
### Do guards need an invitation?
No. A guard can join the first time they sign in on a device that is linked to your
organization. They enter their ID number, their name and a photo, and they join with the
guard role. See [Users](https://vigilsecure.net/docs/concepts/users.md#how-people-join).
### Which role should I give somebody?
Start with **guard** for people who work on a device in the field, **operator** for your
control room, **manager** for people who run sites and teams, and **admin** for people who
also manage devices and roles. [Roles and permissions](https://vigilsecure.net/docs/concepts/roles.md) lists what
each one can do.
### Which role should an agent have?
The smallest one that covers its job. An agent that requests patrols and sign-ins needs to
read sites, beacons and devices, see device locations, send device commands and start chats.
A [custom role](https://vigilsecure.net/docs/concepts/roles.md#custom-roles) with only those permissions is safer
than admin.
### Can I rename the default roles?
No. Create a custom role with the name you want, starting from the default role it should
copy.
## Sites and beacons
### Should a large estate be one site or several?
Use one site for each place you report on separately. An estate with one client and one
guard team is one site with many beacons. Two buildings with separate contracts are two
sites. See [Sites](https://vigilsecure.net/docs/concepts/sites.md).
### Are guards assigned to a site?
Not directly. A guard signs in on a [device](https://vigilsecure.net/docs/concepts/devices.md), and the device's
position shows which site they are at. This means a relief guard needs no setup: they sign
in on the site's device and the work reaches them.
### How many beacons does a site need?
One for each point you want proof of. Start with the places a client asks about: gates,
doors, plant rooms and perimeter corners. See [Beacons](https://vigilsecure.net/docs/concepts/beacons.md).
### Can a guard fake a scan?
Vigil checks every scan against proof and records it under the signed-in user. A QR code
could be photographed and scanned from the photo later, so where that matters, use a
geofence beacon, which needs the device to be at the place.
### Where can I see a beacon's scan history?
Scans appear in the chat they were posted in and on the patrol card they belong to. Ask an
agent for a summary, such as "When was the generator room last scanned?".
## Devices and the guard app
### Can guards use their own phones?
No. The guard app is installed on Vigil devices, which Vigil prepares and locks down for the
job. Supervisors and managers use the console, which works on any computer or phone. See
[Devices](https://vigilsecure.net/docs/concepts/devices.md).
### What happens when a device has no signal?
The guard app keeps working. Sign-in, chats, scans, voice notes and photos work without
signal and are sent when the connection returns. Beacon scans keep the time they were really
made. See [The guard app](https://vigilsecure.net/docs/concepts/guard-app.md#working-without-signal).
### What if two guards share a device?
They take turns. The first signs out and the second signs in with their own ID number.
Everything each of them does is recorded under their own name.
### Can guards call each other?
Guards talk through text and voice notes. Voice calls are available in the console.
Push-to-talk radio on the device is being rolled out.
### Who can see where a device is?
Only people whose role includes **See device locations**, and agents with the same
permission. By default the admin and owner roles have it.
### Why is a device missing from the map?
A device appears once it is linked to your organization and has reported a position. Check
that the **Devices** layer is on and that your role includes **See device locations**. See
[Overview](https://vigilsecure.net/docs/concepts/overview.md).
### Can I see people on the map?
The map shows devices, not people. A person appears through the device they are signed in
on.
## Chats and messages
### Do guards need the console?
No. Guards read and send messages in the guard app on their device.
### Can messages be deleted?
A message can be taken down by its author, by an owner of the chat or by somebody with the
**Moderate messages** permission. Its record and its place in the conversation stay, because
it may be evidence, and its replies remain. The console has no button for this yet; today
it is done through the [API](https://vigilsecure.net/docs/developers/api.md).
## AI agents and skills
### Can an agent read every chat?
No. An agent reads the chats it is a participant in, like a person. Add an agent to a group
if you want it to follow that group, and mention it when you want an answer. Its roles
decide what else it can look up in your organization. See [Agents](https://vigilsecure.net/docs/concepts/agents.md).
### Can an agent act in more than one organization?
An agent you create belongs to your organization. Its roles, schedules, triggers and files
are kept per organization.
### What does an agent cost?
Agents are charged by the work they do. **Organization → Usage** shows the spend and the
number of runs for each agent. See [Organizations](https://vigilsecure.net/docs/concepts/organizations.md#usage).
### What is the difference between instructions and a skill?
Instructions say who an agent is and what it is responsible for. The agent reads them every
time it works. A [skill](https://vigilsecure.net/docs/concepts/skills.md) is a procedure for one task, read only when
that task comes up, and it can be shared by several agents.
### Can a skill run code?
The skills your organization writes are text only. Vigil's own built-in skills include small
programs that agents run in their private workspace.
### Do I need to be technical to use AI with Vigil?
No. The agent inside Vigil needs no setup: you message it in a chat. To connect an assistant
of your own, you create an access token and paste one prompt. See
[Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md).
## Reports
### Can a client see our other reports or data through a share link?
No. A share link opens one page. It gives no access to the console, to other artifacts or to
the data behind the report.
### Can I put our own branding on a report?
Yes. A report is a page your agent writes, so tell the agent what it should look like: your
company name, your logo, the client's name and the sections you want. See
[Automated client reports](https://vigilsecure.net/docs/examples/client-reports.md).
## Cameras
### Does Vigil store our footage?
No. Live video is streamed on demand and is not recorded. Vigil keeps recent still frames
from each camera. See [Cameras](https://vigilsecure.net/docs/concepts/cameras.md).
### Which cameras work?
Network (IP) cameras that support ONVIF, the standard most of them share, on the same
network as the gateway. Some cameras need ONVIF switched on in their own settings first.
[Contact us](mailto:admin@vigilsecure.net) with the makes and models you have and we will
confirm.
---
# Make your first API request
> Call the Vigil GraphQL API with a personal access token, using curl or TypeScript, and check that the token identifies you.
Source: https://vigilsecure.net/docs/developers/make-your-first-api-request/
The Vigil API is a GraphQL API at `/api/graphql`, on the same host as your Vigil console.
This page takes you from a new token to a working request.
## 1. Create a personal access token
In the console, open **Account settings → API tokens**, choose **Create token** and copy
the value when it is shown. [Create an access token](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#step-1-create-an-access-token) has the steps.
Keep the token in an environment variable or a secret store on a server or your own
computer. Do not put it in JavaScript that runs in a browser, and do not commit it to source
control.
## 2. Set your environment
`VIGIL_API_URL` is the address of your Vigil console with `/api/graphql` in place of
`/app`.
```sh
export VIGIL_API_URL="https://next.vigilsecure.net/api/graphql"
export VIGIL_API_TOKEN="vigil_pat_…"
```
The [Vigil skill](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#set-it-up-by-hand) for AI assistants uses
the same two variables.
## 3. Ask Vigil who you are
```sh
curl --fail-with-body "$VIGIL_API_URL" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VIGIL_API_TOKEN" \
--data '{"query":"query { identity { id displayName } }"}'
```
A successful response has your account's ID and name under `data.identity`:
```json
{ "data": { "identity": { "id": "…", "displayName": "Thandi Nkosi" } } }
```
If `identity` is `null`, the token is wrong, expired or revoked, or it belongs to a
different Vigil environment.
A GraphQL request can return HTTP 200 and still carry errors. Always check the `errors`
array in the response as well as the HTTP status.
## The same request in TypeScript
Run this on a server or as a local script, with the same two environment variables:
```ts
const url = process.env.VIGIL_API_URL;
const token = process.env.VIGIL_API_TOKEN;
if (!url || !token) throw new Error("Set VIGIL_API_URL and VIGIL_API_TOKEN");
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({ query: "query { identity { id displayName } }" }),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
if (result.errors?.length) throw new Error(JSON.stringify(result.errors));
if (!result.data?.identity) throw new Error("Token was not authenticated");
console.log(result.data.identity);
```
## Explore the rest of the API
The endpoint supports GraphQL introspection, so any GraphQL client can list the available
queries, mutations and subscriptions with their arguments. Opening `/api/graphql` in a
browser shows an interactive explorer.
[The Vigil API](https://vigilsecure.net/docs/developers/api.md) explains permissions, token expiry and
troubleshooting. If you would rather describe what you want in plain language, see
[Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md).
---
# The Vigil API
> Technical reference for the Vigil GraphQL API at /api/graphql. It can do what the console does, uses personal access tokens and follows your roles.
Source: https://vigilsecure.net/docs/developers/api/
Vigil has one API, and the console, the guard app and Vigil's own agents all use it. It is
a GraphQL API, so a client asks for exactly the fields it needs, and the API describes
itself to any GraphQL tool.
Use it to connect Vigil to other systems or to pull data into your own reports. This page is
written for developers. If you would rather describe what you want in plain language, see
[Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md).
## Endpoint
| | |
| -------------------- | -------------------------------------------------------------------------------- |
| **GraphQL endpoint** | `/api/graphql`, on the same host as your Vigil console |
| **Requests** | `POST` with a JSON body of `query` and `variables` |
| **Live updates** | GraphQL subscriptions over WebSocket on the same path |
| **Schema** | Introspection is enabled. Opening `/api/graphql` in a browser shows an explorer. |
| **File transfers** | REST operations for uploads and downloads, described at `/api/docs` |
## Authentication
Create a personal access token in the console under **Account settings → API tokens**.
[Create an access token](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#step-1-create-an-access-token) has the steps. Send it in the `Authorization` header,
over HTTPS:
```http
Authorization: Bearer vigil_pat_…
```
- A token is `vigil_pat_` followed by 64 letters and digits. Vigil shows it once.
- A token acts as the person who created it, in every organization they belong to. It has
no scopes of its own.
- A token cannot create, list or revoke tokens. Only a signed-in person can.
- For an integration that should only read, or only work in one organization, create a
separate Vigil account for it, invite that account with a limited role and create the
token there.
## Permissions
A request can do exactly what its token's owner can do:
- The owner's [roles](https://vigilsecure.net/docs/concepts/roles.md) in an organization decide what the request can
read and change there.
- A change to those roles applies from the next request.
- Chats are visible only to their participants, through the API as in the console.
A field you may not read comes back as `null` or with a `FORBIDDEN` error.
## How the API is organised
**Queries** start from a few roots:
| Root | What it holds |
| ----------------------------------- | ----------------------------------------------------------------------------------- |
| `identity` | The caller: who the token belongs to |
| `directory { organization(id: …) }` | One organization's data: sites, beacons, devices, members, agents, roles, artifacts |
| `communication` | Chats and messages |
| `infrastructure` | Single devices, beacons and cameras by ID |
**Mutations** are grouped by area, for example `communication { message { post(…) } }` to
post a message and `infrastructure { device { command(…) } }` to send a device command.
Do not guess field names. Ask the schema, which is always current:
```sh
curl "$VIGIL_API_URL" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VIGIL_API_TOKEN" \
--data '{"query":"{ __schema { queryType { fields { name description } } } }"}'
```
### Example: list your organizations' sites
```graphql
query ($org: UUID!) {
directory {
organization(id: $org) {
name
sites {
items {
id
name
latitude
longitude
}
}
}
}
}
```
[Make your first API request](https://vigilsecure.net/docs/developers/make-your-first-api-request.md) shows how to send a
query with curl or TypeScript.
## Errors
A GraphQL response can carry errors with HTTP status 200. Check the `errors` array of every
response as well as the status.
| Code | Meaning |
| ----------------- | ------------------------------------------------------------------------- |
| `UNAUTHENTICATED` | The token is missing, wrong, expired or revoked |
| `FORBIDDEN` | The token's owner lacks the permission for this field |
| `NOT_FOUND` | The record does not exist, is archived or belongs to another organization |
| `BAD_USER_INPUT` | The input is invalid; the message says what to fix |
## Token expiry and rotation
Tokens expire after 90 days unless you choose another period, up to 365 days. Expiry and
revocation are checked on every request. The **API tokens** page lists each token with its
state, the first characters of its value, its expiry date and when it was last used.
To rotate a token, create a new one, switch your integration over and check that it works,
then choose **Revoke** on the old one. Revoking takes effect straight away and cannot be
undone. Signing out of the console does not revoke tokens.
## Posting from other systems without a token
To let another system post messages into one chat, use a
[webhook](https://vigilsecure.net/docs/developers/webhooks.md). It needs no token and can do nothing else.
## Troubleshooting
- **`identity` is `null`.** Check the header, the token's expiry and that you are calling
the same Vigil host the token was created on.
- **Permission errors.** Check the token owner's roles in that organization.
- **A browser client acts as the wrong person.** A signed-in console session in the same
browser takes precedence over a token. Call the API from a server or a script.
- **Never log token values.**
## Related
- [Make your first API request](https://vigilsecure.net/docs/developers/make-your-first-api-request.md)
- [Post into a chat with a webhook](https://vigilsecure.net/docs/developers/webhooks.md)
- [Use Vigil with AI](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md)
---
# Post into a chat with a webhook
> Send alerts from an alarm panel, a tracker or any other system into a Vigil chat with a webhook. One HTTP POST with a JSON body, and no token is needed.
Source: https://vigilsecure.net/docs/developers/webhooks/
A webhook is a secret URL on a group chat. Any system that can send an HTTP request can post
a message through it: an alarm panel, a vehicle tracker, a monitoring tool. It needs no
[access token](https://vigilsecure.net/docs/developers/api.md#authentication) and can do nothing except post into
that one chat.
## Create a webhook
Somebody who owns the group chat creates the webhook in the console:
1. Open the group's **Channel details** and, under **Webhooks**, choose **New**.
2. Enter a **Name**, such as `Alarm panel`. Messages appear under this name.
3. Choose **Create webhook** and copy the **Webhook URL**. It is shown once.
## Post a message
Send an HTTP `POST` with a JSON body to the URL:
```sh
curl -X POST "$WEBHOOK_URL" \
-H "Content-Type: application/json" \
--data '{"content": "Zone 4 alarm at Rosebank Mall, 02:14"}'
```
| | |
| --------------- | ---------------------------------------- |
| **Body** | `{ "content": "…" }` |
| **`content`** | Plain text of up to 8,000 characters |
| **Success** | HTTP 204, and the message is in the chat |
| **Rate limit** | 30 posts a minute for each webhook |
| **Credentials** | None. The URL itself is the only secret. |
For a system that can only send email or SMS, use an automation service that turns the
email into a webhook.
## Keep it safe
- Anyone who has the URL can post into that chat. Store it as a secret in the other system.
- Use one webhook for each system. If a URL leaks, **Revoke** that webhook in **Channel
details** and create a new one without disturbing the others.
- A webhook can only post text into its own chat. It cannot read anything.
## Webhooks and agents
A message from a webhook does not wake an [agent](https://vigilsecure.net/docs/concepts/agents.md) by itself. That is
deliberate: it stops an outside system from driving an agent directly. A person in the chat
can mention the agent, or the agent can read new alerts on a schedule.
[Alarm and system alerts](https://vigilsecure.net/docs/examples/alarm-integrations.md) shows both.
## Going the other way
To send what happens in Vigil to another system, for example to open a ticket when a patrol
is missed, read it from that system through the [Vigil API](https://vigilsecure.net/docs/developers/api.md).
## Related
- [Communication](https://vigilsecure.net/docs/concepts/communication.md#webhooks-let-another-system-post-into-a-chat)
- [Alarm and system alerts](https://vigilsecure.net/docs/examples/alarm-integrations.md)