Skip to content

Configuration Reference

This page documents common configuration patterns for thegent.

Environment Variables

VariablePurpose
ANTHROPIC_API_KEYClaude provider authentication
OPENAI_API_KEYOpenAI/Codex provider authentication
GOOGLE_API_KEYGemini provider authentication
THGENT_DEFAULT_ROUTINGDefault routing preference
THGENT_DEBUGEnable debug output for runtime diagnostics

Set Values with CLI

bash
thegent config set providers.myproxy.url "http://localhost:8317"
thegent config set providers.myproxy.model "claude-sonnet-4-6"
  • Keep credentials in environment or secure runtime config.
  • Use explicit provider/model in CI for deterministic behavior.
  • Set routing policy intentionally (prefer_direct, prefer_proxy, or explicit per command).

Validation

After config changes:

bash
thegent doctor
thegent run "configuration smoke test" --provider codex

Released under the MIT License.