Skip to main content

Config resolution

ntrp resolves configuration in this order, highest priority first:
  1. Environment variablesNTRP_* prefix or standard provider key names
  2. .env files — loaded from ~/.ntrp/.env and ./.env when developing from source or running Docker Compose
  3. Settings file~/.ntrp/settings.json
  4. Auto-detection — models and integrations inferred from available keys/tokens

LLM providers

Set at least one provider API key, or connect OpenAI Codex with browser sign-in from the desktop client.
ProviderSetupTypical chat modelEmbedding model
AnthropicANTHROPIC_API_KEYClaude
OpenAI APIOPENAI_API_KEYGPTtext-embedding-3-small
OpenAI CodexBrowser sign-in in desktop onboarding/settingsOpenAI account models
GoogleGEMINI_API_KEYGeminigemini-embedding-001
OpenRouter/customDesktop settings or custom model configProvider modeldepends
Claude Pro/Max OAuth is not supported. ntrp will not integrate it until Anthropic officially allows third-party applications to use subscription-based OAuth.
Override auto-detection with explicit model IDs:
export NTRP_CHAT_MODEL=claude-sonnet-4-6
export NTRP_RESEARCH_MODEL=claude-sonnet-4-6
export NTRP_WORKFLOW_MODEL=claude-sonnet-4-6
export NTRP_MEMORY_MODEL=claude-haiku-4-5
export NTRP_EMBEDDING_MODEL=text-embedding-3-small
Embedding is optional. Without it, vector search is disabled but ntrp still works with full-text search.

Server

VariableDefaultDescription
NTRP_HOST127.0.0.1Server bind address
NTRP_PORT6877Server port

Features

VariableDefaultDescription
NTRP_MEMORYtrueEnable persistent memory
NTRP_CONSOLIDATION_INTERVAL30Minutes between consolidation runs
NTRP_GOOGLEfalseEnable Google integrations, including Gmail and Calendar tools
NTRP_GMAIL_DAYS30Days of Gmail history to index
NTRP_DEFERRED_TOOLStrueHide infrequent integration/action tool schemas until loaded

Optional integrations

VariableDescription
EXA_API_KEYExa.ai API key for web search when WEB_SEARCH=exa
WEB_SEARCHWeb provider mode: auto, exa, ddgs, or none
SLACK_BOT_TOKENSlack bot token (xoxb-...)
SLACK_USER_TOKENSlack user token (xoxp-...)
TELEGRAM_BOT_TOKENTelegram notifications
For Google, Slack, and MCP, prefer the desktop setup assistants in Settings → Integrations and Settings → MCP.

Agent behavior

VariableDefaultDescription
NTRP_MAX_DEPTH8Max agentic recursion depth
NTRP_REASONING_EFFORTunsetOptional model-specific reasoning effort
NTRP_COMPRESSION_THRESHOLDapp defaultToken threshold for context compaction
NTRP_MAX_MESSAGESapp defaultMessage-count threshold for compaction
Deferred tools reduce prompt size and improve cache stability. Gmail, calendar, Slack, automation, background-task, notification, directive, file-write, and MCP tools are loaded on demand. Always-visible tools include local file reads, web search/fetch, research, skills, current time, and load_tools itself.

Authentication

On first ntrp-server serve, an API key is generated and printed. The server stores only a salted SHA-256 hash — the plaintext key is never persisted.
ntrp-server serve --reset-key
Desktop clients store the key locally and encrypt it with OS-backed storage when supported.

Settings file

~/.ntrp/settings.json stores persisted configuration. Fields set here act as defaults that environment variables can override.
{
  "chat_model": "claude-sonnet-4-6",
  "research_model": "claude-sonnet-4-6",
  "workflow_model": "claude-sonnet-4-6",
  "memory_model": "claude-haiku-4-5",
  "embedding_model": "text-embedding-3-small",
  "api_key_hash": "a1b2c3:..."
}

Custom models

See Custom Models for registering OpenRouter, Ollama, vLLM, or any OpenAI-compatible endpoint.