Configuration

The daemon config file at ~/.orkai/config.yaml — embedded mode, embeddings, MCP, and review providers.

The orkai daemon reads ~/.orkai/config.yaml. On first run, orkai serve walks you through embedding setup and writes this file for you. After that, prefer orkai start for daily use and edit the file only when you need to change providers, ports, or review settings.

Three different config files

FileScopeHow it is created
~/.orkai/config.yaml Daemon — storage, embeddings, MCP, review LLMs First-run wizard (orkai serve)
.orkai.yaml One project folder — index rules, review processes orkai init, orkai review init
~/.orkai/credentials Auto-generated passwords and tokens Written by the wizard — do not edit by hand

This page covers daemon config only. For project indexing and review rules, see Projects & indexing and Review.

View and change settings

Use the CLI for common keys instead of opening the YAML file. Restart the daemon after changes (orkai stop then orkai start, or restart orkai serve if you run in the foreground).

orkai config                              # path + current embedding/annotation summary
orkai config get embedding.provider
orkai config set annotations.enabled true
orkai config help                         # list supported keys

Example (embedded mode)

After first-run setup with a local Ollama embedding model, your file looks roughly like this. Paths and passwords differ on your machine; the structure is what matters.

storage:
  mode: embedded
  dataDir: ~/.orkai/data

service:
  listen:
    tcp:
      enabled: true
      host: 127.0.0.1
      port: 7779
    unix:
      enabled: true
      path: ~/.orkai/orkai.sock
  auth:
    passwords:
      - "<auto-generated>"

embedding:
  provider: ollama          # ollama | openai | none | mock
  model: mxbai-embed-large
  dimensions: 1024
  apiBase: http://127.0.0.1:11434
  cache:
    enabled: true
    path: ~/.orkai/cache/embeddings
    maxEntries: 10000

ingest:
  queueSize: 1000
  workers: 2
  batchSize: 64
  flushIntervalMs: 500
  overflowPolicy: reject

gc:
  enabled: true
  intervalSecs: 10
  batchSize: 100
  gracePeriodSecs: 30

mcp:
  enabled: true
  host: 127.0.0.1
  port: 8787
  v2:
    enabled: true

admin:
  enabled: true
  host: 127.0.0.1
  port: 9090

Everything runs locally: SQLite and files under storage.dataDir. You do not need separate database or search services for the desktop product.

storage

KeyDescription
mode Must be embedded for the local daemon. All entity data, vectors, and files live on disk under dataDir.
dataDir Base directory (default ~/.orkai/data). Contains the SQLite database and object storage.

service

How the CLI and SDKs connect to the daemon binary protocol.

KeyDescription
listen.tcp TCP listener (default 127.0.0.1:7779). The CLI uses this unless a unix socket is available.
listen.unix Optional unix socket (default ~/.orkai/orkai.sock on macOS/Linux). Faster for local clients.
auth.passwords Bearer tokens accepted by the daemon. Populated from ~/.orkai/credentials at first run — change via the wizard or credentials file, not by guessing values here.

If the default port is busy, the daemon may pick another and record it in ~/.orkai/runtime.json. Use orkai status to see active ports.

embedding

Powers semantic search and indexing. Without a working embedding provider, search quality is limited and indexing may skip vector steps.

KeyDescription
provider ollama (local), openai (cloud), none (disabled), or mock (tests)
model Model name — e.g. mxbai-embed-large for Ollama, or an OpenAI embedding model
dimensions Vector size (default 1024). Must match the model output.
apiKey / apiBase OpenAI API key, or Ollama base URL (default http://127.0.0.1:11434)
cache On-disk cache of embedding results — speeds up re-indexing the same content

The first-run wizard sets Ollama or OpenAI based on your choice. Switch later with orkai config set embedding.provider … or by editing the YAML.

ingest

Tuning for background indexing throughput. Defaults are fine for most machines.

KeyDefaultDescription
workers2Parallel ingest workers
queueSize1000Buffered job queue capacity
batchSize64Texts per embedding batch
overflowPolicyrejectWhat to do when the queue is full: reject, drop-oldest, or block

gc

Background garbage collection for stale index entries. Enabled by default.

KeyDefaultDescription
enabledtrueRun the GC worker
intervalSecs10Seconds between scans
gracePeriodSecs30Minimum age before an entry is eligible for cleanup

mcp

MCP server your AI assistant connects to. orkai mcp-config reads the live URL and token from the running daemon — you rarely edit this block by hand.

KeyDescription
enabledTurn MCP on or off (default on)
host / portSSE listener (default 127.0.0.1:8787)
v2.enabledMCP protocol v2 tools (recommended)

See Daemon & MCP for client setup.

admin

Local HTTP endpoints for health checks and metrics. Used by orkai top and orkai status.

KeyDefaultDescription
enabledtrueExpose /healthz, /readyz, /metrics
host127.0.0.1Bind address (local only)
port9090Admin port

annotations (optional)

AI-generated purpose and insight layers attached to indexed code symbols when enabled here. The annotation pipeline runs in the background after orkai index. Off by default. See Knowledge layer for tags, enriched source, and MCP usage.

KeyDescription
enabledtrue to run the annotation pipeline on index
providerollama or openai
modelChat model for annotations (e.g. a small local coder model or gpt-4o-mini)
orkai config set annotations.enabled true
orkai config set annotations.provider ollama
orkai config set annotations.model qwen2.5-coder:7b-instruct

chat (optional — for review)

LLM providers for orkai review. Distinct from embeddings: review needs a chat model, not an embedding model. The easiest path is orkai review setup, which writes chat.providers[] for you.

chat:
  providers:
    - provider: openai
      model: gpt-4o-mini
      apiKey: sk-...
      default: true
    - provider: ollama
      model: llama3.1:8b
      apiBase: http://127.0.0.1:11434

Each review process in .orkai.yaml can select a provider by model: matching one entry’s model field. Exactly one provider should have default: true. See Review setup.

limits (advanced)

Optional guardrails for concurrent requests and rate limiting. Omit this section unless you hit capacity issues.

KeyDescription
maxConcurrentRequestsCap in-flight daemon requests
rateLimits.defaultRpsDefault requests-per-second limit

debug (advanced)

Enable Go pprof profiling for deep performance investigation. Leave disabled unless you know you need it.

KeyDefaultDescription
pprofEnabledfalseStart an HTTP pprof server
pprofPort6060pprof listen port