NenjoNenjo Docs
Harness

Worker Config

Local configuration, environment variables, directories, capabilities, model keys, and tool settings for nenjo run.

Worker Config

nenjo run loads config from .nenjo/config.toml, then applies environment variable and CLI overrides.

By default .nenjo is ~/.nenjo. You can point the worker somewhere else with --nenjo-dir or NENJO_DIR.

Local Directories

PathPurpose
.nenjo/config.tomlSerialized worker config
.nenjo/workspaceProject worktrees, synced repositories, and task workspaces
.nenjo/stateMemory, sessions, session content, and crypto state
.nenjo/manifestsCached bootstrap manifest resources
.nenjo/gitconfigWorker-specific git config when GITHUB_TOKEN is set
.nenjo/git-credential-helper.shWorker-specific GitHub token helper when GITHUB_TOKEN is set

The state directory is the important backup target for local worker-generated state.

Required Identity

The worker requires a Nenjo API key:

export NENJO_API_KEY="..."
nenjo run

The key can also be stored as api_key in .nenjo/config.toml.

CLI and Environment Overrides

SettingCLI flagEnvironment variableDefault
Backend API URL--backend-urlNENJO_API_URLhttps://api.nenjo.ai
NATS URL--nats-urlNATS_URLBootstrap value, then tls://nats.nenjo.ai
Log level--log-levelRUST_LOGinfo
Show log target--log-targetNENJO_LOG_TARGETfalse
Config directory--nenjo-dirNENJO_DIR~/.nenjo
Worker capabilities--capabilitiesNENJO_CAPABILITIESAll capabilities
Harness display name--harness-nameNENJO_HARNESS_NAMEunset
Harness labels--harness-labelsNENJO_HARNESS_LABELSnone

Most workers should not set NATS_URL. The bootstrap response supplies the event bus settings when available.

Model Provider Keys

Model keys can be stored in [model_provider_api_keys] or supplied by environment variables. Environment variables win.

ProviderEnvironment variable
OpenAIOPENAI_API_KEY
AnthropicANTHROPIC_API_KEY
OpenRouterOPENROUTER_API_KEY
OllamaOLLAMA_API_KEY
GroqGROQ_API_KEY
VeniceVENICE_API_KEY
MistralMISTRAL_API_KEY
DeepSeekDEEPSEEK_API_KEY
xAIXAI_API_KEY
TogetherTOGETHER_API_KEY
FireworksFIREWORKS_API_KEY
PerplexityPERPLEXITY_API_KEY
CohereCOHERE_API_KEY
MoonshotMOONSHOT_API_KEY
GLMGLM_API_KEY
MinimaxMINIMAX_API_KEY
Google/GeminiGOOGLE_AI_API_KEY or GEMINI_API_KEY
OpenAI-compatibleOPENAI_COMPATIBLE_API_KEY

For OpenAI-compatible providers, the manifest can use a tagged provider name such as openai-compatible:sambanova. The worker first looks for a config key named sambanova, then SAMBANOVA_API_KEY, then the generic OpenAI-compatible key.

Capabilities

Capabilities limit which command families this worker handles.

nenjo run --capabilities chat,task,repo

Valid values are chat, task, cron, manifest, repo, and ping. If no capabilities are configured, the worker runs in full mode and handles all of them.

Tool Config

These sections control optional built-in tools:

Config sectionDefaultPurpose
[web_search]enabled with DuckDuckGoAdds web search; can use Brave with brave_api_key
[web_fetch]disabledAdds web page fetching with allowed and blocked domains
[http_request]disabledAdds general HTTP requests with allowed domains
[browser]disabledAdds browser open and screenshot tools
[memory]markdownSelects the memory backend
[git]unsetSets git author, committer, and optional SSH signing key for worker git operations

Web fetch and HTTP request both have response-size and timeout settings. Domain filters are applied before requests are made.

Autonomy and Reliability

[autonomy] controls the application-level safety policy for local actions. Defaults keep work inside the workspace, block high-risk commands, require approval for medium-risk shell commands, and include a blocklist for destructive or system-level commands.

[reliability] controls model retry behavior:

SettingDefault
max_retries2
backoff_ms500
fallback_providersnone
model_fallbacksnone

The worker's provider registry wraps created model clients with the reliability layer.

Security and Audit

[security.sandbox] can auto-detect or explicitly choose a sandbox backend: auto, landlock, firejail, bubblewrap, docker, or none.

[security.audit] defaults to enabled and writes audit.log under the .nenjo directory. Audit events can also be HMAC-signed when configured.

Example

api_key = "..."
harness_name = "local-dev"
harness_labels = ["macbook", "repo-work"]
capabilities = ["chat", "task", "repo", "manifest"]

[model_provider_api_keys]
anthropic = "..."
openai = "..."

[web_search]
enabled = true
provider = "duckduckgo"
max_results = 5
timeout_secs = 15

[web]
allow_private_hosts = false

[web_fetch]
enabled = true
allowed_hosts = ["docs.rs", "github.com"]
blocked_hosts = []

[git]
user_name = "Nenjo Worker"
user_email = "worker@example.com"

On this page