Skip to content

Configuration

Configuration

Kernova.config.json

Every Kernova project has a configuration file at its root:

{
"name": "my-app",
"version": "0.1.0",
"runtime": {
"environment": "development",
"debug": true
},
"memory": {
"provider": "local",
"layers": {
"working": { "maxItems": 50 },
"session": { "ttlSeconds": 3600 },
"longterm": { "provider": "local" }
}
},
"models": {
"default": {
"provider": "openai",
"model": "gpt-4o"
},
"fallback": {
"provider": "anthropic",
"model": "claude-sonnet-5-5"
}
},
"providers": [],
"budget": {
"maxTokens": 1000000,
"maxCostUsd": 50.00,
"requestsPerMinute": 60,
"maxTokensPerIntent": 10000
},
"studio": {
"port": 4200,
"requireAuth": false
}
}

Configuration Fields

runtime

FieldTypeDefaultDescription
environmentstring"development"development, staging, or production
debugbooleanfalseEnable debug logging

models

FieldTypeDescription
default.providerstringDefault model provider ID
default.modelstringDefault model name
fallback.providerstringFallback provider if default fails
fallback.modelstringFallback model name

providers (custom)

Add any OpenAI-compatible provider:

{
"providers": [
{
"id": "my-provider",
"name": "My Custom LLM",
"adapter": "openai",
"baseUrl": "https://api.example.com/v1",
"apiKeyEnv": "MY_API_KEY",
"defaultModel": "my-model",
"timeoutMs": 30000
}
]
}

Adapter types: openai, anthropic, gemini, ollama, custom

budget

FieldTypeDefaultDescription
maxTokensnumberunlimitedTotal token cap
maxCostUsdnumberunlimitedUSD spending cap
requestsPerMinutenumberunlimitedGlobal rate limit
maxTokensPerIntentnumberunlimitedPer-intent token limit

studio

FieldTypeDefaultDescription
portnumber4200Studio HTTP port
requireAuthbooleanfalseRequire API key for API access
tlsCertstring—Path to TLS certificate
tlsKeystring—Path to TLS private key

Environment Variables

Model Provider Keys

VariableProvider
OPENAI_API_KEYOpenAI (GPT-4o)
ANTHROPIC_API_KEYAnthropic (Claude)
GEMINI_API_KEYGoogle Gemini
DEEPSEEK_API_KEYDeepSeek
GROQ_API_KEYGroq
MISTRAL_API_KEYMistral AI
TOGETHER_API_KEYTogether AI
OPENROUTER_API_KEYOpenRouter
XAI_API_KEYxAI (Grok)
COHERE_API_KEYCohere
FIREWORKS_API_KEYFireworks AI
PERPLEXITY_API_KEYPerplexity
CEREBRAS_API_KEYCerebras
SAMBANOVA_API_KEYSambaNova

Runtime Variables

VariableDescriptionDefault
PORTStudio/API port4200
Kernova_DATA_DIRPersistence directory./Kernova-data
Kernova_AUTHRequire auth in productiontrue
NODE_ENVEnvironment modedevelopment

Data Directory

Kernova stores SQLite databases in ./Kernova-data/:

Kernova-data/
Kernova.db ← Events, memories, API keys, identities
Kernova.db-wal ← Write-ahead log (performance)
Kernova.db-shm ← Shared memory (performance)

Override the location:

new KernovaKernel({ dataDir: '/custom/path' });

Disable persistence entirely:

new KernovaKernel({ ephemeral: true });

TypeScript Configuration

Kernova uses ESM modules. Your tsconfig.json should include:

{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true
}
}