Skip to main content

Getting Started

This guide walks you through installing, configuring, and running Vectra for the first time.

Prerequisites

RequirementVersion
.NET SDK10.0 or later
A supported databaseSQLite (default) or PostgreSQL
A supported cacheIn-Memory (default) or Redis

Installation

Clone the Repository

git clone https://github.com/cortexiumlabs/vectra.git
cd vectra

Restore & Build

dotnet restore
dotnet build

Running Vectra

Vectra is driven by a CLI entry-point. The simplest way to start the gateway is:

dotnet run --project src/Vectra

To check the current version:

dotnet run --project src/Vectra -- --version

Minimal Configuration

Vectra is configured through standard ASP.NET Core appsettings.json / environment variables. A minimal working configuration looks like:

appsettings.json
{
"System": {
"Server": {
"Http": { "Port": 7080 }
},
"Storage": {
"Database": {
"DefaultProvider": "Sqlite",
"Providers": {
"Sqlite": { "ConnectionString": "Data Source=vectra.db" }
}
},
"Cache": {
"DefaultProvider": "Memory"
}
}
},
"Security": {
"AgentAuth": {
"Provider": "SelfSigned"
}
},
"Policy": {
"Enabled": true,
"DefaultProvider": "Internal",
"Providers": {
"Internal": { "Directory": "./policies" }
}
},
"HumanInTheLoop": {
"Enabled": true,
"Threshold": 0.8,
"TimeoutSeconds": 3600,
"MaxPendingRequests": 100
}
}

Running via Docker

If you prefer to run Vectra as a container, pre-built Dockerfiles are available in the .docker/ directory.

Build:

docker build \
-f .docker/Dockerfile.linux \
--build-arg APP_VERSION=1.0.0 \
-t vectra:1.0.0 \
.

Run:

docker run -d \
--name vectra \
-p 7080:7080 \
-e System__Storage__Database__Providers__Sqlite__ConnectionString="Data Source=/data/vectra.db" \
-e Policy__Providers__Internal__Directory="/policies" \
-v $(pwd)/data:/data \
-v $(pwd)/policies:/policies \
vectra:1.0.0

Once running, Vectra is available at http://localhost:7080. The /health endpoint confirms it is up:

curl http://localhost:7080/health
# {"status":"Healthy","healthCheckDuration":"00:00:00.0023456"}

For the full Docker reference — HTTPS, Docker Compose with Redis and Seq, volume mounts, and environment variable mappings — see the Docker guide.

First Request Flow

  1. Register an agentPOST /agents
  2. Obtain a JWT tokenPOST /tokens
  3. Proxy a requestGET /proxy/https://api.example.com/data with Authorization: Bearer <token>

Vectra will authenticate the agent, evaluate its policy, compute a risk score, and either forward the request or intercept it for human review.

Next Steps