githubEdit

wrenchConfiguring the Conserver

A Complete Guide

The Conserver is configured through two mechanisms:

  1. Environment Variables - Server-level settings (Redis, API keys, paths)

  2. YAML Configuration File - Processing configuration (chains, links, storage)

Environment Variables

Set these in your .env file or system environment.

Core Settings

Variable
Description
Default

REDIS_URL

Redis connection URL

redis://localhost

CONSERVER_CONFIG_FILE

Path to YAML config file

./example_config.yml

HOSTNAME

Server hostname

http://localhost:8000

ENV

Environment name (dev/staging/prod)

dev

LOG_LEVEL

Logging level

DEBUG

API Settings

Variable
Description
Default

CONSERVER_API_TOKEN

Main API authentication token

(none)

CONSERVER_API_TOKEN_FILE

Path to file with API tokens (one per line)

(none)

CONSERVER_HEADER_NAME

HTTP header name for API token

x-conserver-api-token

API_ROOT_PATH

API URL prefix

/api

Redis/Caching Settings

Variable
Description
Default

VCON_REDIS_EXPIRY

Cache TTL for vCons in Redis (seconds)

3600 (1 hour)

VCON_INDEX_EXPIRY

Search index TTL (seconds)

86400 (24 hours)

VCON_SORTED_SET_NAME

Name of Redis sorted set for vCons

vcons

VCON_SORTED_FORCE_RESET

Reset sorted set on startup

true

TICK_INTERVAL

Processing loop interval (ms)

5000

External Service API Keys

Variable
Description

OPENAI_API_KEY

OpenAI API key

DEEPGRAM_KEY

Deepgram speech-to-text API key

Example .env File


YAML Configuration File

The YAML configuration file defines processing chains, links, storage backends, and authentication. The Conserver looks for the path specified in CONSERVER_CONFIG_FILE (default: ./example_config.yml).

Configuration File Structure


Section Reference

ingress_auth

Configures API keys for external partner access to the /vcon/external-ingress endpoint.

Each key grants access only to its designated ingress list. Partners cannot access other API endpoints.


imports

Dynamically imports Python packages at runtime. Useful for:

  • Installing missing dependencies automatically

  • Using external link/storage packages

  • Managing version requirements

The Conserver will automatically install missing packages when first referenced.


Links are the processing units of the conserver. Each link is a module that performs a specific operation on a vCon. See Standard Links for built-in options.

Each link configuration needs:

  • A unique name (e.g., 'deepgram', 'analyze')

  • The module path that implements the link functionality

  • An options dictionary containing the link's specific configuration


storages

Storages define where vCons are saved after processing. See Storage for all backends.

Each storage needs:

  • A unique name

  • The storage module implementation

  • Connection and authentication options specific to the storage type


tracers

Defines tracer modules for auditing and compliance tracking.


chains

Chains are where you define your processing workflows. They connect links together and specify where the results should be stored:

A chain configuration includes:

  • The links to execute, in order

  • Input lists (ingress_lists) where new vCons arrive

  • Storage locations for the processed vCons

  • Output lists (egress_lists) for downstream processing

  • An enabled flag and optional timeout

Chain Processing Flow:

  1. vCon UUID arrives in an ingress list

  2. Links execute sequentially (any can stop processing by returning None)

  3. vCon is stored in all configured storage backends

  4. UUID is added to egress lists

  5. If processing fails, UUID moves to DLQ ({ingress_list}:dlq)


followers

Followers allow one conserver to monitor and process vCons from another conserver for federated deployments:

Each follower needs:

  • The URL of the remote conserver

  • Authentication credentials

  • The remote list to monitor (egress_list)

  • The local list to populate (follower_ingress_list)

  • Polling configuration (interval and batch size)


Complete Example


Environment Variable Substitution

The configuration supports environment variable substitution using ${VAR_NAME} syntax:

This allows sensitive values to be kept in environment variables rather than the config file.


Configuration Best Practices

  1. Use meaningful names for your chains, links, and storage configurations to make the system easier to understand and maintain.

  2. Organize links logically - arrange links in order where each step builds on the previous ones.

  3. Use multiple storage backends when needed - for example, storing in both S3 for long-term storage and Postgres for quick querying.

  4. Configure appropriate timeouts for your chains based on the expected processing time of your links.

  5. Use environment variables for sensitive values like API keys and passwords.

  6. Use the follower configuration when you need to process vCons across multiple conserver instances.


Hot Reloading

The configuration file is loaded at startup and can be updated via the API endpoint /config. Changes take effect immediately for new vCon processing:

Remember that the conserver uses Redis as its working storage, so all the lists referenced in ingress_lists and egress_lists are Redis lists.

Last updated

Was this helpful?