# Self-hosted AI agents

Run AI agents inside your own network, on a VM, Docker or Kubernetes, with the model you choose. What runs where, what leaves the building, and what stays yours.

Most agentic AI products are a service. Your tickets, records and prompts go to the vendor's cloud, the model is the vendor's, and the governance is whatever the vendor offers. That is fine for many teams and impossible for others: regulated data, customer contracts that name where data may be processed, or simply a policy that nothing about the business leaves the network.

Liyagent is built to be self-hosted first. The same release that runs at liyagent.com runs on your own infrastructure, and the hosted version exists so you can try it before you install it.

## What runs where

A Liyagent install is one server and two stores:

| Part | What it is | Where it runs |
| --- | --- | --- |
| The server | One FastAPI service with the web console, the Liya agents, the AI Gateway and the governance plane | Your VM, Docker host or Kubernetes cluster |
| PostgreSQL | Tickets, agents, policies, connections, the audit log | Yours, managed or self-run |
| Qdrant | The vector index behind knowledge answers and duplicate detection | Yours |

Install guides: [Quickstart](/docs/get-started/quickstart) on a laptop with Docker Compose, [a production VM](/docs/get-started/deploy-vm), and the [operate](/docs/operate) section for [backups](/docs/operate/backups) and [zero-downtime deploys](/docs/operate/zero-downtime-deploys).

## What leaves the network

Only what you point outward:

- **Model calls.** Every model call goes through the [AI Gateway](/docs/ai-gateway) to the [provider you configure](/docs/ai-gateway/providers): Anthropic, OpenAI, Gemini or Bedrock in their clouds, or an open model served by Ollama or vLLM on your own hardware, in which case nothing leaves at all. [Redaction](/docs/govern/redaction) strips personal data before text reaches a model, whichever you choose.
- **Connector calls.** Agents reach ServiceNow, Jira, SAP, Salesforce, Microsoft 365 and the rest over those systems' own APIs, as the person who connected, with that person's permissions. See [data handling](/docs/govern/data-handling) for what is read, kept and for how long.
- **Nothing else.** No telemetry to Liyagent. Credentials live in the install's [secrets store](/docs/connect/secrets) and are referenced by name, so a connector's configuration never carries the secret itself.

## What stays yours

- **The evidence.** The [audit log](/docs/monitor/audit-log) is a hash chain in your database. Signed exports let anyone verify a bundle without trusting the server that produced it.
- **The rules.** [Policies](/docs/govern/permissions), [guardrails](/docs/ai-gateway/guardrails) and [budgets](/docs/ai-gateway/budgets) are configuration in your install. A change is a change you made, in your history.
- **The tenants.** One install can serve several companies or departments, each with its own data and settings: [tenancy](/docs/govern/tenancy).

## Hosted or self-hosted: choosing

| | Hosted at liyagent.com | Self-hosted |
| --- | --- | --- |
| Good for | Trying it, demos, small teams without ops | Production, regulated data, data-residency commitments |
| Data | Processed in Liyagent's hosting (see the [privacy policy](/privacy)) | Stays in your network |
| Models | Any provider, your keys | Any provider, or open models on your hardware |
| Updates | Applied by Liyagent | Applied by you, with [zero downtime](/docs/operate/zero-downtime-deploys) |

Not sure which questions to ask first? [What is an agentic AI platform?](/docs/overview/agentic-ai-platform) lists the eight that matter, hosted or not.
