Skip to main content
Bifrost persists two types of data — config (providers, virtual keys, governance rules) and logs (request/response records). Each has its own store. A vector store is required for semantic caching.
StorePurposeBackends
config_storeProvider configs, virtual keys, governance rulesSQLite, PostgreSQL
logs_storeRequest/response logs shown in UISQLite, PostgreSQL + optional S3/GCS offload
vector_storeSemantic response cachingWeaviate, Redis, Valkey, Qdrant, Pinecone
If you use PostgreSQL for any store, the target database must be UTF8 encoded. See PostgreSQL UTF8 Requirement.

config_store

When config_store is disabled (or absent), all configuration is loaded from config.json at startup only — the Web UI is disabled and changes require a restart. See Two Configuration Modes.

SQLite (Default)

Simplest setup — no external database required. Bifrost stores configuration in a local SQLite file.
{
  "config_store": {
    "enabled": true,
    "type": "sqlite",
    "config": {
      "path": "./config.db"
    }
  }
}
FieldDescription
config.pathPath to the SQLite file (relative to app-dir, or absolute)

logs_store

SQLite

{
  "logs_store": {
    "enabled": true,
    "type": "sqlite",
    "config": {
      "path": "./logs.db"
    }
  }
}

Log Retention

Set retention_days to automatically purge old log entries. 0 disables retention-based cleanup.
{
  "logs_store": {
    "enabled": true,
    "type": "postgres",
    "config": { "...": "..." },
    "retention_days": 90
  }
}

Object Storage for Logs

Offload large request/response payloads from the database to S3 or GCS. The database retains only lightweight index records; payloads are fetched on demand.
{
  "logs_store": {
    "enabled": true,
    "type": "postgres",
    "config": { "...": "..." },
    "object_storage": {
      "type": "s3",
      "bucket": "env.S3_BUCKET",
      "prefix": "bifrost",
      "compress": true,
      "region": "us-east-1",
      "access_key_id": "env.S3_ACCESS_KEY_ID",
      "secret_access_key": "env.S3_SECRET_ACCESS_KEY"
    }
  }
}
IAM role (instance profile / IRSA) — omit access_key_id and secret_access_key:
{
  "object_storage": {
    "type": "s3",
    "bucket": "bifrost-logs",
    "region": "us-east-1",
    "compress": true,
    "role_arn": "arn:aws:iam::123456789012:role/BifrostS3Role"
  }
}
FieldDescription
bucketS3 bucket name (supports env. prefix)
prefixKey prefix for stored objects (default: "bifrost")
compressEnable gzip compression (default: false)
regionAWS region
access_key_idAWS access key ID (omit for default credential chain)
secret_access_keyAWS secret access key
session_tokenSTS temporary credentials session token
role_arnIAM role ARN for STS AssumeRole
endpointCustom endpoint for MinIO / Cloudflare R2
force_path_styleUse path-style URLs (required for MinIO, default: false)

vector_store

A vector store is required for semantic caching. Choose from Weaviate, Redis/Valkey, Qdrant, or Pinecone.
{
  "vector_store": {
    "enabled": true,
    "type": "weaviate",
    "config": {
      "scheme": "http",
      "host": "localhost:8080",
      "api_key": "env.WEAVIATE_API_KEY",
      "grpc_config": {
        "host": "localhost:50051",
        "secured": false
      }
    }
  }
}
FieldRequiredDescription
schemeYes"http" or "https"
hostYesWeaviate server host and port
api_keyNoWeaviate API key (supports env. prefix)
grpc_config.hostNogRPC host for faster vector operations
grpc_config.securedNoUse TLS for gRPC connection

Mixed Backend Example

Run the config store on PostgreSQL (for UI) while keeping logs on SQLite (simpler, cheaper for append-heavy workloads):
{
  "$schema": "https://www.getbifrost.ai/schema",
  "encryption_key": "env.BIFROST_ENCRYPTION_KEY",

  "config_store": {
    "enabled": true,
    "type": "postgres",
    "config": {
      "host": "env.PG_HOST",
      "port": "5432",
      "user": "env.PG_USER",
      "password": "env.PG_PASSWORD",
      "db_name": "bifrost",
      "ssl_mode": "require"
    }
  },

  "logs_store": {
    "enabled": true,
    "type": "sqlite",
    "config": {
      "path": "./logs.db"
    }
  }
}

Full Storage Example

{
  "$schema": "https://www.getbifrost.ai/schema",
  "encryption_key": "env.BIFROST_ENCRYPTION_KEY",

  "config_store": {
    "enabled": true,
    "type": "postgres",
    "config": {
      "host": "env.PG_HOST",
      "port": "5432",
      "user": "env.PG_USER",
      "password": "env.PG_PASSWORD",
      "db_name": "bifrost",
      "ssl_mode": "require",
      "max_idle_conns": 5,
      "max_open_conns": 50
    }
  },

  "logs_store": {
    "enabled": true,
    "type": "postgres",
    "config": {
      "host": "env.PG_HOST",
      "port": "5432",
      "user": "env.PG_USER",
      "password": "env.PG_PASSWORD",
      "db_name": "bifrost",
      "ssl_mode": "require",
      "max_idle_conns": 10,
      "max_open_conns": 100
    },
    "retention_days": 90,
    "object_storage": {
      "type": "s3",
      "bucket": "env.S3_BUCKET",
      "region": "us-east-1",
      "compress": true,
      "access_key_id": "env.S3_ACCESS_KEY_ID",
      "secret_access_key": "env.S3_SECRET_ACCESS_KEY"
    }
  },

  "vector_store": {
    "enabled": true,
    "type": "weaviate",
    "config": {
      "scheme": "http",
      "host": "weaviate:8080"
    }
  }
}