Config resolution
ntrp resolves configuration in this order, highest priority first:
- Environment variables —
NTRP_* prefix or standard provider key names
.env files — loaded from ~/.ntrp/.env and ./.env when developing from source or running Docker Compose
- Settings file —
~/.ntrp/settings.json
- 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.
| Provider | Setup | Typical chat model | Embedding model |
|---|
| Anthropic | ANTHROPIC_API_KEY | Claude | — |
| OpenAI API | OPENAI_API_KEY | GPT | text-embedding-3-small |
| OpenAI Codex | Browser sign-in in desktop onboarding/settings | OpenAI account models | — |
| Google | GEMINI_API_KEY | Gemini | gemini-embedding-001 |
| OpenRouter/custom | Desktop settings or custom model config | Provider model | depends |
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
| Variable | Default | Description |
|---|
NTRP_HOST | 127.0.0.1 | Server bind address |
NTRP_PORT | 6877 | Server port |
Features
| Variable | Default | Description |
|---|
NTRP_MEMORY | true | Enable persistent memory |
NTRP_CONSOLIDATION_INTERVAL | 30 | Minutes between consolidation runs |
NTRP_GOOGLE | false | Enable Google integrations, including Gmail and Calendar tools |
NTRP_GMAIL_DAYS | 30 | Days of Gmail history to index |
NTRP_DEFERRED_TOOLS | true | Hide infrequent integration/action tool schemas until loaded |
Optional integrations
| Variable | Description |
|---|
EXA_API_KEY | Exa.ai API key for web search when WEB_SEARCH=exa |
WEB_SEARCH | Web provider mode: auto, exa, ddgs, or none |
SLACK_BOT_TOKEN | Slack bot token (xoxb-...) |
SLACK_USER_TOKEN | Slack user token (xoxp-...) |
TELEGRAM_BOT_TOKEN | Telegram notifications |
For Google, Slack, and MCP, prefer the desktop setup assistants in Settings → Integrations and Settings → MCP.
Agent behavior
| Variable | Default | Description |
|---|
NTRP_MAX_DEPTH | 8 | Max agentic recursion depth |
NTRP_REASONING_EFFORT | unset | Optional model-specific reasoning effort |
NTRP_COMPRESSION_THRESHOLD | app default | Token threshold for context compaction |
NTRP_MAX_MESSAGES | app default | Message-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.