Configuration

Environment variables and on-disk paths agentty reads.

agentty is configured through flags, environment variables, and two on-disk paths. There is no sprawling config file to learn.

Environment variables

VariableEffect
ANTHROPIC_API_KEYClaude API key used when no -k flag is passed. Second-highest priority in credential resolution.
CLAUDE_CODE_OAUTH_TOKENOAuth token from the env (reuses Claude Code's token) — below API key but above on-disk creds. No refresh token.
OPENAI_API_KEYKey for --provider openai, and the fallback key for every other OpenAI-compatible provider.
GROQ_API_KEY / OPENROUTER_API_KEY / TOGETHER_API_KEY / CEREBRAS_API_KEYProvider-specific keys, checked before OPENAIAPIKEY for that provider. Ollama needs none.
AGENTTY_SOCKS_PROXYRoute all TCP through this SOCKS5 proxy host:port (set automatically by airgap mode).
AGENTTY_API_HOSTOverride the API host (host[:port]) — dial a different upstream while keeping TLS pinning.
AGENTTY_OAUTH_HOSTOverride the OAuth host (host[:port]).
AGENTTY_INSECURESet to 1 to skip TLS peer verification. Last-resort only — never ship it.
AGENTTY_AIRGAP_SSHExtra flags injected into the ssh invocation for airgap (laptop side).
AGENTTY_CLIPBOARD_CMDShell command that writes image bytes to stdout — used for Ctrl+V image paste over SSH.
AGENTTY_MCP_CONFIGExplicit path to an mcp.json, overriding the project/user lookup.
AGENTTY_MCP_ALLOW_PROJECTSet truthy to trust a project-local .agentty/mcp.json (gated off by default).
AGENTTY_DOCS_DIRFolder of documents to index for the search_docs RAG tool (defaults to ./docs).
AGENTTY_EMBED_MODEL / AGENTTY_OLLAMA_HOSTEmbedding model + Ollama host for the local search_docs RAG pipeline.
AGENTTY_DEBUG_API / AGENTTY_DEBUG_FILESet AGENTTYDEBUGAPI=1 to dump streaming provider events to AGENTTYDEBUGFILE.
SSL_CERT_FILE / SSL_CERT_DIR / CURL_CA_BUNDLEOverride the TLS root store agentty trusts (standard OpenSSL vars).

On-disk paths

Credentials live under XDG config; everything else lives under ~/.agentty.

  • ~/.config/agentty/credentials.json — Claude OAuth token or API key, mode 0600 (honours $XDG_CONFIG_HOME).
  • ~/.agentty/settings.json — persisted provider, model, per-provider models, reasoning effort, favourite models, permission profile, and in-app-pasted provider keys.
  • ~/.agentty/threads/<id>.json — one JSON file per thread (flat, keyed by thread id).
  • ~/.agentty/memory.jsonl — user-scope remember facts (cross-workspace); <project>/.agentty/memory.jsonl holds project-scope facts.
  • ~/.agentty/skills/, ~/.agents/skills/, ~/.claude/skills/ — personal Agent Skills; the same three dirs under <project>/ shadow them.
  • ~/.agentty/mcp.json (trusted) and <project>/.agentty/mcp.json (gated behind AGENTTY_MCP_ALLOW_PROJECT) — MCP servers to connect on startup. AGENTTY_MCP_CONFIG overrides both.

CLAUDE.md guidance

On the Claude backend, agentty appends up to three user-authored guidance files to the system prompt (each capped at 64 KiB, mtime-cached):

  • ~/CLAUDE.md — user tier (every workspace).
  • <project>/CLAUDE.md — project tier.
  • <project>/CLAUDE.local.md — local tier (gitignore it for personal notes).

Persisted settings

--provider, -m/--model, the reasoning effort tier, favourited models, and your permission profile are written to ~/.agentty/settings.json whenever you change them in-app — so the next launch resumes exactly where you left off. There is nothing to hand-edit; the picker (^P / ^/) and S-Tab manage it.

Choosing a workspace

By default the launch directory is the workspace. Override without cd:

agentty --workspace ~/code/other-project
agentty --workspace /          # opt out of the boundary entirely

TLS trust store

agentty picks up the system trust store at startup. Behind a TLS-terminating corporate proxy, install the proxy's CA into the system store (update-ca-certificates / update-ca-trust). See Corporate Proxies.