> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inviolet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the gateway

> Three install paths — npm SDK, Docker, or Vercel Edge.

The Inviolet gateway is the choke point every LLM tool call passes through.
Install one of three ways depending on where your application lives.

## Option 1 — npm SDK (simplest)

Guard tool calls from your existing app with the `Inviolet` client. No
infrastructure changes.

```bash theme={"dark"}
npm install @inviolet/agent-sdk-core
```

```ts theme={"dark"}
import { Inviolet } from "@inviolet/agent-sdk-core"

const inviolet = new Inviolet({
  gatewayUrl: process.env.INVIOLET_GATEWAY_URL!,
  apiKey: process.env.INVIOLET_API_KEY!,
  agentId: "my-app",
})
// Mint a mandate, then guard each tool call — see the Quickstart.
```

If your agent uses a framework, install its wrapper instead
([Anthropic](/sdks/anthropic), [OpenAI](/sdks/openai),
[LangChain](/sdks/langchain), and more) — the same `Inviolet` client underneath.

Best for: serverless apps, Next.js, single-team prototypes.

## Option 2 — Docker (self-hosted)

```bash theme={"dark"}
docker run -d \
  -e INVIOLET_API_KEY=${INVIOLET_API_KEY} \
  -p 8080:8080 \
  ghcr.io/craig-fire/inviolet-gateway:latest
```

Point your application at `http://localhost:8080` instead of the LLM
provider's API URL.

Best for: regulated environments, on-prem, self-hosted Kubernetes.

## Option 3 — Vercel Edge

Deploy the gateway as an edge function alongside your Next.js app.

```ts theme={"dark"}
// app/api/llm/route.ts
import { invioletEdge } from "@inviolet/edge"
export const runtime = "edge"
export const POST = invioletEdge({ apiKey: process.env.INVIOLET_API_KEY! })
```

Best for: existing Vercel-hosted apps that want zero new infrastructure.

## Verify install

After install, make any LLM tool call. Within 30 seconds it should appear at
[app.inviolet.ai/decision-feed](https://app.inviolet.ai/decision-feed).

## Read next

* **[Connect your first data source](/guides/connect-your-first-data-source)**
* **[Quickstart](/quickstart)** for the end-to-end walkthrough
