Skip to content

Configuration

Christian Pojoni edited this page Apr 27, 2026 · 1 revision

Configuration

Core config type

KartaConfig contains:

  • storage
  • llm
  • read
  • write
  • dream
  • episode
  • forget
  • reranker

Defaults are embedded and suitable for local research runs.

Storage

Default:

[storage]
data_dir = ".karta"
lance_uri = null

Runtime env override used by server:

export KARTA_LANCE_URI=/path/or/remote/lance

If lance_uri is unset, LanceDB defaults under {data_dir}/lance.

LLM providers

Default model ref:

[llm.default]
provider = "openai"
model = "gpt-4o-mini"
base_url = null

Per-operation override keys include examples like:

  • write.attributes
  • write.linking
  • write.evolve
  • read.synthesize
  • dream.deduction
  • dream.abduction

Example:

[llm.overrides."dream.abduction"]
provider = "openai"
model = "gpt-4o"

OpenAI-compatible env

export OPENAI_API_KEY=...
export OPENAI_API_BASE=https://your-compatible-endpoint/v1   # optional
export KARTA_EMBEDDING_MODEL=text-embedding-3-small          # optional

Azure OpenAI env

export AZURE_OPENAI_API_KEY=...
export AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
export AZURE_OPENAI_CHAT_MODEL=gpt-4o-mini
export AZURE_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
export AZURE_OPENAI_API_VERSION=2025-04-01-preview

Reranker

Jina reranker is enabled when configured and JINA_API_KEY exists:

export JINA_API_KEY=...

Typical config:

[reranker]
enabled = true
abstention_threshold = 0.1

Read config highlights

Defaults include:

  • recency_weight = 0.15
  • recency_half_life_days = 30.0
  • graph_weight = 0.05
  • max_hop_depth = 2
  • abstention_threshold = 0.20
  • episode_retrieval_enabled = true
  • fact_retrieval_enabled = true

ACTIVATE

ACTIVATE is disabled by default unless config or env enables it.

export KARTA_ACTIVATE_ENABLED=true

Key knobs:

  • act_r_decay_d
  • act_r_min_activation
  • hebbian_weight_step
  • hebbian_max_weight
  • hebbian_neighbors_per_anchor
  • rrf_k
  • pas_window
  • trace_sample_rate
  • per-query-mode channel_weights

Server env

Required:

export KARTA_BASE_URL=https://your-host
export KARTA_COOKIE_SECRET=$(openssl rand -base64 64 | tr '+/' '-_' | tr -d '=')
export GOOGLE_CLIENT_ID=...
export GOOGLE_CLIENT_SECRET=...
export GITHUB_CLIENT_ID=...
export GITHUB_CLIENT_SECRET=...

Optional:

export KARTA_HOST=0.0.0.0
export KARTA_PORT=3000
export KARTA_AUTH_DB_PATH=karta-auth.db
export KARTA_REGISTRATION_TOKEN=...
export KARTA_ALLOWED_ORIGINS=https://your-host,https://other-origin
export RUST_LOG=karta_server=info,tower_http=info

Never commit .env or secrets.

Clone this wiki locally