# Telemetry to Liyagent

An optional heartbeat that tells Liyagent your instance is running, its release and its health, with exactly what it sends and how to turn it on.

Your instance can send Liyagent a small heartbeat every 15 minutes. Liyagent's support team then sees your release, whether the instance is healthy, and problems such as failing backups or a rising error rate, often before you raise a ticket.

It is **off unless you turn it on**. Nothing is collected or sent while it is off.

## What is sent

Counts, totals and settings flags only. The protocol has no free-text field, and the receiving end refuses any field it does not list, so tickets, prompts, conversations, names and addresses cannot be sent even by mistake.

| Group | Fields |
| --- | --- |
| Instance | Release, stage (production, test, development, demo), self-hosted or hosted, region, runtime |
| Usage | Calls, errors and model spend today and this month, and the monthly budget |
| Estate | People, workspaces, agents, connectors and approvals waiting |
| Security | Whether single sign-on is set up, how many owners, whether the address is HTTPS |
| Backups | Where backups are found, when the last one ran, whether it worked and was verified, how long they are kept |

Settings > Telemetry shows the exact JSON the next heartbeat carries, built by the same code that sends it.

## What you get back

Each heartbeat's answer tells your instance how Liyagent sees it: a health score from 0 to 100 with the reasons behind it (for example a release behind, no single sign-on, no backup found), the newest release, and any open alerts. Settings > Telemetry shows it under **How Liyagent sees this instance**, so your team sees exactly what Liyagent's support team sees.

Workspaces Liyagent hosts for you on liyagent.com need no setup: they are reported without a heartbeat, and your administrators see the same view for their workspace in Settings > Telemetry.

## Turn it on

1. Ask Liyagent for an install key for your organisation. It starts `lyk_` and is valid for 30 days.
2. Set these in your environment file, then restart:

| Setting | Value |
| --- | --- |
| `TICKETIQ_TELEMETRY_ENABLED` | `true` |
| `TICKETIQ_TELEMETRY_INSTALL_KEY` | The install key, or a `secret://` reference to it |
| `TICKETIQ_TELEMETRY_DEPLOYMENT` | `self-hosted` (the default) or `hosted` |

The instance exchanges the key once for its own signing secret, kept sealed in your database. Each heartbeat is signed with it (HMAC-SHA256), carries a timestamp, and is refused if replayed. Outbound traffic goes only to `https://liyagent.com` over HTTPS, through the instance's egress controls.

To stop, set `TICKETIQ_TELEMETRY_ENABLED=false`. Liyagent can also retire the instance on its side, after which its heartbeats are refused.
