Configuration

noetic.config.ts schema, discovery order, environment variables, and the built-in command and tool registries.

Discovery

The CLI looks for a config file in this order and uses the first one it finds:

  1. ./noetic.config.ts
  2. ./.noetic/config.ts
  3. ~/.config/noetic/config.ts
  4. ~/.noetic/config.ts

If none of those exist, the CLI falls back to CLI-arg defaults: model: 'anthropic/claude-sonnet-4', maxTurns: 50, and the API key from NOETIC_API_KEY or OPENROUTER_API_KEY.

Schema

import type { AgentConfig } from '@noetic/cli';

export default {
  // Required
  model: 'anthropic/claude-sonnet-4',
  apiKey: process.env.NOETIC_API_KEY!,
  cwd: process.cwd(),
  maxTurns: 100,

  // Optional
  systemPrompt: 'You are a senior TypeScript engineer working on this codebase.',
  systemPromptMode: 'compose',
  trustProjectEmbeddedCommands: false,
  plugins: [],
  tools: { include: [], exclude: [], tasks: true },
  memory: [],
  ui: { doublePressWindowMs: 800 },
  history: { maxItems: 200 },
  shell: { useRtk: true },
  worktree: { /* see Hooks */ },
  agents: {
    explore: { model: '~moonshotai/kimi-latest' },
    verification: {
      model: 'openai/gpt-5.5',
      tools: ['read', 'grep', 'find', 'ls', 'bash', 'browser'],
    },
  },
} satisfies AgentConfig;

Required fields

FieldTypeNotes
modelstringOpenRouter model slug (e.g. anthropic/claude-sonnet-4, openai/gpt-4o).
apiKeystringOpenRouter API key. Don't hard-code — pull from process.env.NOETIC_API_KEY or process.env.OPENROUTER_API_KEY.
cwdstringWorking directory the agent operates in. Usually process.cwd().
maxTurnsnumber (positive int)Maximum LLM turns per session before the harness halts.

Optional fields

FieldTypeDefaultNotes
systemPromptstringCustom system prompt. See systemPromptMode for how it combines with built-ins.
systemPromptMode'compose' | 'replace''compose'compose replaces only the intro section; cyber-risk, doing-tasks, tone/style, and env-info sections are still appended. replace fully replaces the built-in prompt.
trustProjectEmbeddedCommandsbooleanfalseIf true, project-origin AGENT.md and rules files execute !command lines at session start. User-origin files (~/...) always execute commands. Off by default for supply-chain safety.
pluginsPluginSpec[][]See Plugins.
tools.includestring[]Whitelist of tool names. When set, only these register.
tools.excludestring[]Blacklist of tool names. Applied after include.
tools.tasksbooleantrueRegister the built-in task_* tools. Set false to opt out entirely.
memorystring[]Identifiers for additional memory layers to install (advanced).
worktreeWorktreeConfigSub-agent isolation config — see Hooks.
ui.doublePressWindowMsint 100–5000800Window in ms within which a second Ctrl+C / Ctrl+D press triggers a graceful exit.
history.maxItemsint 2–10000Cap on trailing items projected to the LLM each turn. Storage is untouched — this is a read-side projection only. When unset, history is uncapped.
shell.useRtkbooleantrueWrap every command run by the bash tool through rtk rewrite for token-efficient output. When true (the default) rtk is required on PATH — startup fails fast with install instructions if it is missing. Set false to opt out and run raw sh -c instead. Install rtk via brew install rtk, cargo install --git https://github.com/rtk-ai/rtk, or the upstream install.sh.
agentsRecord<string, AgentOverride>Per-sub-agent overrides keyed by agent-type (e.g. explore, plan, verification). Each override beats the matching SKILL.md frontmatter. Surfaced via the /config TUI editor.

AgentOverride

FieldTypeNotes
modelstringOpenRouter model id. Beats SKILL.md agent-model (including inherit).
instructionsstringExtra instructions. Default mode appends after the SKILL.md body; switch via instructionsMode.
instructionsMode'append' | 'replace'Default 'append'. 'replace' swaps the SKILL.md body out entirely.
toolsstring[]Replaces the SKILL.md allowed-tools allow-list. [] means "no tools".

The built-in sub-agents that ship with the CLI:

TypeDefault modelToolsNotes
explore~moonshotai/kimi-latestread, grep, find, lsFast read-only research. Specify thoroughness (quick / medium / very thorough) when invoking.
planinheritread, grep, find, lsRead-only architect. Returns a step-by-step plan and critical files.
general-purposeinheritfull parent poolDefault fallback for non-trivial multi-step tasks.
verificationopenai/gpt-5.5read, grep, find, ls, bash, interactive_terminal, browserAdversarial reviewer. Runs builds, tests, and probes; returns VERDICT: PASS | FAIL | PARTIAL. Backgrounded by default.

Environment variables

VariablePurpose
NOETIC_API_KEYPrimary key. Falls back to OPENROUTER_API_KEY if unset.
OPENROUTER_API_KEYRecognised as an alias when NOETIC_API_KEY is missing.

CLI flags --api-key, --model, --cwd, --max-turns, -c / --continue, -r / --resume, --session-id, --fork-session, --no-session-persistence, and -n / --name override the equivalent config values for a single run.

Built-in slash commands

All built-in commands are available to every session. Plugin commands appear after built-ins (a plugin can't shadow /help or /context).

CommandWhat it does
/clearClear history and start a fresh session
/configView and edit agent configuration
/contextShow context window breakdown by memory layer (from last run)
/diff-reviewOpen a diff review window with branch / per-commit / all-files scopes
/initInitialize CLAUDE.md (and optional skills/hooks) with codebase documentation
/modeToggle agent mode between act and planning
/modelSelect the active OpenRouter model
/planEnter plan mode (alias for /mode plan)
/renameSet a custom title for this session
/resumeReload a prior session (opens picker, or loads by UUID)
/sessionShow metadata for the current session
/skillsList available skills
/tagTag or untag this session
/tasksOpen the kanban board view (see also noetic tasks CLI)
/agent-ciLaunch a tracked agent-ci review for the current worktree
/agent-readinessAudit your repo for AI-agent readiness

User-invocable skills and plugin-contributed commands also appear as /skill-name and /plugin-command.

Built-in tools

The harness ships with a default tool pool. Filter with tools.include / tools.exclude in config.

ToolDescription
readRead file contents with line offsets
writeCreate or overwrite files
editApply diff-based edits
bashExecute shell commands (with security validation)
grepSearch file contents
findFind files by pattern
lsList directory contents
lspLanguage-server operations (hover, references, definition)
interactive_terminalDrive a TUI program through pilotty (spawn / snapshot / key / type / wait-for / kill)
agentSpawn a sub-agent (teammate) sync, background, or named+addressable; optional isolation: 'worktree'
send_messageWrite a message to a named teammate's inbound queue
check_agentPoll status / result / error of a previously-launched teammate by agentId
AskUserQuestionPause mid-turn to pose 1–4 multiple-choice questions; only registered when running under the TUI

In plan mode (/mode plan or /plan), the read-only subset is registered (no write, edit, bash, mutating interactive_terminal actions, or sub-agent spawning that produces edits).

Pass tools: { include: ['read', 'grep', 'find'] } to a custom session for a tighter sandbox, or tools: { exclude: ['bash'] } to drop a single capability.

On this page