Skip to content
OpenScienceDocs

Configuration

Save repeatable model, instruction, skill, and tool settings.

Use Customize for everyday settings. Configuration files are useful when you want to review settings as text or share a project setup.

File locations

ScopeLocation
Your account on this machine~/.config/openscience/openscience.json or openscience.jsonc.
Projectopenscience.json or openscience.jsonc in the project.
Project customization folder.openscience/ for agents, commands, skills, and related configuration.

The resolved global location can differ with your platform or environment. Run openscience debug paths to find it.

JSONC permits comments and trailing commas. Use one main config file per scope to avoid conflicting settings spread across both formats.

A small project configuration

{
  "instructions": ["methods/protocol.md"],
  "skills": {
    "paths": ["./skills"]
  },
  "command": {
    "check-data": {
      "description": "Inspect data quality before analysis",
      "template": "Inspect $ARGUMENTS for missing values, duplicate rows, units, and label consistency. Keep the input unchanged."
    }
  }
}

Use /check-data data/samples.csv in the workspace, or openscience run --command check-data "data/samples.csv".

Common settings

KeyPurpose
modelDefault model in provider/model form.
small_modelModel for smaller helper tasks such as title generation.
default_agentDefault primary agent; Research is the normal default.
providerProvider connections, custom endpoints, and model overrides.
instructionsAdditional instruction files or patterns.
skills.pathsExtra skill directories.
skills.disabledSkills excluded from discovery without uninstalling.
commandReusable named prompt templates.
mcpExternal tool connections.
pluginPlugin packages or local module URLs.
permissionAction rules such as ask, allow, and deny.
agent.<name>Per-agent model, variant, skills (categories for a specialist's domain index), prompt, permission. A rule that names a tool offers it to that agent without a skill.
subagent_depthHow many levels of workers may nest; default 1 (only the lead dispatches).
harnessSwitches for the harness units, all on by default: redirect, deliverables, acceptance, unattended, review, budget, cost (or { "max_usd": n } for a soft spend ceiling), headless-policy, durable-jobs, workers.
compactionauto (default true), prune (default true), recentImages, and the experimental pruneInputs: when an old tool call is pruned, also shorten its long string arguments (a patch body, a script) to a preview in what the model re-reads; the stored call stays complete (default false).
server.portPort for the local workspace or server.
autoupdateUpdate preference: true, false, or "notify".

Provider and model identifiers must match the configured catalog. Use openscience models --flat to find them.

Harness units

Each unit delivers one piece of context at a precise point in the loop and can be switched off with "harness": { "<unit>": false }:

UnitWhat it does
redirectWhen the same tool failure repeats three times (or the model loops on text), inject one strategy-change message instead of stopping; a second trip stops the turn.
deliverablesWhen the first request names its output files, check each named file before the turn ends (present, non-empty, parses, no NaN/Inf, no placeholder text) and list the failures once; two rounds at most. Files listed under a destination ("save to results/: a.csv, b.tsv") are looked for there.
acceptanceWhen the first request states its own verification (a recognised build or test command such as lake build, pytest -q tests/, cargo test, a check.sh; tokens forbidden under a path such as sorry under src/), run the command and grep the path before the turn ends and continue the turn with the grader's own output when they fail; three rounds at most. The command runs through the session's bash tool under the same permission rule and card a model-typed command gets, inside the same sandbox; one the rules do not permit is reported as not run.
unattendedUnder autonomous autonomy (openscience run --auto-approve, or the Autonomous setting), a final answer that asks the user to upload, provide, confirm or choose is answered once: proceed on the inputs as supplied, state the assumption, deliver; a turn that asked before calling any tool is told to stop instead when the message asked for no work.
reviewWhen the deliverable is a written report, read it once in a fresh context (the internal reader agent) against the request before the turn ends, and continue the turn once with what the report does not address.
budgetShow CPUs and memory (from the container's cgroup) and, with a deadline, the time budget and elapsed time in the environment block; remind at 50% and 85%; ask to continue when time remains and deliverables fail.
costShow spend so far beside the time budget; an optional soft ceiling adds a wrap-up reminder, never a hard stop.
headless-policyIn openscience run --auto-approve, continue past denied tool calls and answer questions with their recommended option.
durable-jobsKeep tool hints consistent with what is offered: the truncation hint suggests a worker only when delegation is on.
workersStream child-session events in headless runs and roll their usage into done.

Scope and overrides

Global configuration supplies defaults; project configuration can override project-specific settings. Options are combined, so adding a project setting does not mean every global setting is removed.

Legacy configuration files in ~/.synsc/ and ~/.openscience/ load before the canonical user configuration and project files. An explicit OPENSCIENCE_CONFIG_DIR isolates configuration discovery from these legacy home folders. OPENSCIENCE_CONFIG_CONTENT overrides file-based settings, including project customization folders; administrator policy still applies last.

Some executable project customizations require approval before they become active, and administrator policy can restrict available settings. If a value seems ignored, check the setting in Customize and the applicable project or administrator configuration.

Use explicit per-run flags such as --model when you need to override a default for a single terminal request.

Reference a secret

Supported configuration strings can reference an environment variable:

{
  "provider": {
    "my-provider": {
      "options": {
        "apiKey": "{env:MY_PROVIDER_API_KEY}"
      }
    }
  }
}

This snippet shows secret substitution for an existing provider. It does not define a complete custom provider. See Custom providers.

Use a connection form or environment reference instead of committing a real key. A variable must be available to the process that starts OpenScience.

Check changes

After editing configuration, reopen the project or restart the app if the setting does not refresh automatically. Use openscience doctor to check setup and read any configuration error for the file and field that need correction.

For project rules, use Project instructions. For external tools, use Connectors.