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
| File | Scope | How 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
| Key | Description |
|---|---|
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.
| Key | Description |
|---|---|
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.
| Key | Description |
|---|---|
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.
| Key | Default | Description |
|---|---|---|
workers | 2 | Parallel ingest workers |
queueSize | 1000 | Buffered job queue capacity |
batchSize | 64 | Texts per embedding batch |
overflowPolicy | reject | What to do when the queue is full: reject, drop-oldest, or block |
gc
Background garbage collection for stale index entries. Enabled by default.
| Key | Default | Description |
|---|---|---|
enabled | true | Run the GC worker |
intervalSecs | 10 | Seconds between scans |
gracePeriodSecs | 30 | Minimum 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.
| Key | Description |
|---|---|
enabled | Turn MCP on or off (default on) |
host / port | SSE listener (default 127.0.0.1:8787) |
v2.enabled | MCP 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.
| Key | Default | Description |
|---|---|---|
enabled | true | Expose /healthz, /readyz, /metrics |
host | 127.0.0.1 | Bind address (local only) |
port | 9090 | Admin 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.
| Key | Description |
|---|---|
enabled | true to run the annotation pipeline on index |
provider | ollama or openai |
model | Chat 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.
| Key | Description |
|---|---|
maxConcurrentRequests | Cap in-flight daemon requests |
rateLimits.defaultRps | Default requests-per-second limit |
debug (advanced)
Enable Go pprof profiling for deep performance investigation. Leave disabled unless you know you need it.
| Key | Default | Description |
|---|---|---|
pprofEnabled | false | Start an HTTP pprof server |
pprofPort | 6060 | pprof listen port |