Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ntrp.io/llms.txt

Use this file to discover all available pages before exploring further.

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 (project directory)
  3. Settings file~/.ntrp/settings.json (persisted via TUI settings)
  4. Auto-detection — models resolved from available provider keys

LLM providers

Set at least one provider API key, or connect the OpenAI Codex provider with browser sign-in from the TUI. ntrp auto-selects models based on what’s available.
ProviderSetupChat modelMemory modelEmbedding model
AnthropicANTHROPIC_API_KEYclaude-sonnet-4-6claude-sonnet-4-6
OpenAI APIOPENAI_API_KEYgpt-5.2gpt-5.2text-embedding-3-small
OpenAI CodexBrowser sign-in in /connect or /settingsopenai-codex/gpt-5.5openai-codex/gpt-5.4-mini
GoogleGEMINI_API_KEYgemini-3.1-pro-previewgemini-3-flash-previewgemini-embedding-001
Claude Pro/Max OAuth is not supported. We will not integrate it until Anthropic officially allows third-party applications to use subscription-based OAuth.
OpenAI Codex uses OpenAI browser sign-in, not an API key. Tokens are stored locally in ~/.ntrp/openai-codex-auth.json with 0600 permissions and refreshed automatically.
Override auto-detection with explicit model IDs:
export NTRP_CHAT_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_DREAMSfalseEnable cross-domain dream generation
NTRP_CONSOLIDATION_INTERVAL30Minutes between consolidation runs (builtin automation)
NTRP_GMAILfalseEnable Gmail integration
NTRP_GMAIL_DAYS30Days of email history to index
NTRP_CALENDARfalseEnable Google Calendar

Optional integrations

VariableDescription
EXA_API_KEYExa.ai API key for web search (required only when WEB_SEARCH=exa)
WEB_SEARCHWeb provider mode: auto (default), exa, ddgs, or none
TELEGRAM_BOT_TOKENTelegram notifications

Agent behavior

VariableDefaultDescription
NTRP_MAX_DEPTH8Max agentic recursion depth
NTRP_REASONING_EFFORTunsetOptional model-specific reasoning effort, e.g. low, medium, high, xhigh, or whatever the selected model advertises
NTRP_DEFERRED_TOOLStrueHide infrequent integration/action tool schemas until the agent loads them with load_tools
Deferred tools reduce prompt size and improve cache stability. Gmail, calendar, Slack, automation, background-task, notification, directive, and MCP tools are loaded on demand. Always-visible tools include shell/file access, memory recall/write tools, 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.
# Generate a new key
ntrp-server serve --reset-key
The TUI client stores the key in your OS keychain (macOS Keychain, Linux libsecret). Fallback: ~/.ntrp/settings.json.
VariableDescription
NTRP_WEBHOOK_TOKENSeparate token for webhook endpoints (email notifications)

Custom models

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

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",
  "memory_model": "claude-sonnet-4-6",
  "embedding_model": "text-embedding-3-small",
  "api_key_hash": "a1b2c3:..."
}