Skip to main content

Configuration

Riverbeam has no configuration file. A few components read environment variables; everything else is set in code when you build the pipeline.

Environment variables​

VariableRead byDefaultPurpose
BEAM_API_KEYOpenAiCompatible::from_env, knowledge factorynoneAPI key for chat and embedding endpoints. NVIDIA_API_KEY is read when it is unset.
BEAM_API_BASE_URLOpenAiCompatible::from_env, knowledge factoryhttps://integrate.api.nvidia.com/v1OpenAI-compatible base URL
BEAM_MODELOpenAiCompatible::from_envdeepseek-ai/deepseek-v4-pro-0813Chat model
BEAM_DATABASE_URLKnowledge factorynonePostgres for pgvector. DATABASE_URL is read when it is unset.
KNOWLEDGE_EMBEDDERKnowledge factoryautoopenai, nvidia, mock or hash
KNOWLEDGE_VECTOR_STOREKnowledge factorypgvectorpgvector or inmemory
KNOWLEDGE_EMBEDDING_DIMKnowledge factorythe argument you passEmbedding width; pgvector needs 1536
KNOWLEDGE_EMBEDDER_MODELKnowledge factoryper embedderEmbedding model

The knowledge variables are explained in Knowledge.

Fallback names​

When the primary variable is unset, these older names are also read, in this order. Make sure none of them is set by accident in your environment, because they change behaviour silently:

PrimaryFallbacks
BEAM_API_KEYGFS_BEAM_API_KEY, then NVIDIA_API_KEY
BEAM_API_BASE_URLGFS_BEAM_BASE_URL
BEAM_MODELGFS_BEAM_MODEL
BEAM_DATABASE_URL (knowledge factory)DATABASE_URL, then FLRS_DATABASE_URL, then BEAM_SQL_DB_DSN

An empty BEAM_API_KEY counts as set: the fallbacks are not read, and the factory and OpenAiCompatible::from_env behave as if there were no key.

The library does not read these, but the examples on this site and the repository's tests use them. Use the same names in your processes:

VariableDefault in the examplesPurpose
NATS_URLnats://127.0.0.1:4222NATS server for workers, worker clients, and stream transports
BEAM_BIND_ADDR0.0.0.0:8080HTTP listen address of an API process

Pass the same BEAM_DATABASE_URL to PgBeamStore::connect and the riverbase_task tracker, so all components share one database. Setting it, together with NATS_URL, also enables the repository's database and NATS tests.

Never commit API keys. Set them in the environment or a secret store.

Settings in code​

SettingWhereDefault
BeamConfigRiverBeam::new(config)See Invoke pipeline
Task subject prefixNatsWorkerServer::with_prefix, NatsWorkerClient::connect_with_prefixbeam (subjects beam.task.{task})
NATS request timeoutasync_nats::ConnectOptions::request_timeout, then NatsWorkerClient::new10 seconds (async-nats default)
Worker concurrencyNatsWorkerServer::with_concurrency16
Stream subject prefixNatsTransport::with_prefixbeam.stream
Delta mergingStreamConfig in BeamStream::with_configoff
Security policySecurityPolicy in SecurityManager::new50 steps, 128 000 tokens, recursion 10, 30 s
Usage planUsagePlan in RiverBeam::set_usageunlimited
Authorization rowsBeamPolicyAuthorizer::from_csvnone; see Authorization
Model listload_models_from_yamlsee Model routing
Domain namespaceBeamDomainBundle::with_namespaceflrs.beam