Configuration

Alfred keeps project config, model assignment, and profile overrides separate. Project config stays in .alfred/config.json; user-owned model assignment lives in ~/.alfred/models.json.

Initialize a workspace

From your project root:

guided installer
curl -fsSL https://raw.githubusercontent.com/GOI17/main/install.sh | sh

The TUI previews suite config, model defaults, and harness artifacts before writing. It only applies files after explicit approval.

Schema

.alfred/config.json
{
  "schema": "alfred.config/v1",
  "tenant": "my-project",
  "profile": "coding",

  "policy": {
    "default": "deny",
    "protected_paths": [".ai/", ".opencode/", "harnesses/"],
    "destructive_commands": ["rm -rf", "git reset --hard"],
    "approval": "human"
  },

  "memory": {
    "hosting": "coding",
    "store": "sqlite",
    "path": "~/.alfred/tenants/my-project.sqlite"
  },

  "evals": {
    "baseline": ".ai/evals/baselines/main.json",
    "gates": ".ai/evals/regression-gates.json",
    "auto_compare": true
  },

  "harnesses": {
    "primary": "opencode",
    "targets": ["opencode", "codex", "pi"]
  }
}

Model assignment

You own your model. Alfred does not hardcode a provider or model name in agent specs. The installer previews ~/.alfred/models.json with per-agent primary models and a global fallback chain. Individual agents may also define fallbacks, but the current installer-generated defaults use the global chain.

~/.alfred/models.json
{
  "*": {
    "primary": "ollama/qwen2.5-coder:7b",
    "fallbacks": ["openai/gpt-4.1-mini", "anthropic/claude-sonnet-4"]
  },
  "orchestrator": { "primary": "anthropic/claude-sonnet-4" },
  "developer": { "primary": "anthropic/claude-sonnet-4" },
  "fallbacks": ["ollama/qwen2.5-coder:7b", "openai/gpt-4.1-mini", "anthropic/claude-sonnet-4"]
}
Tip. Profile overlays can specialize work/personal machines, while harness adapters translate user-owned bindings into their native config without changing agent specs.

Context compaction

Alfred triggers local-first context compaction around 35% of detected model context. Local heuristics run first; provider-assisted summaries require approval and emit provider_request_reduced.

Policy

policy.default is always "deny". Every protected path, every destructive command, and every permission change requires a human approval trace event.

Add a path or command to escalate the gate, never to lower it. Alfred will not let a subagent remove protected_paths even if the prompt asks nicely.

Memory hosting

Three modes, chosen at init time:

ModeStoreUse case
coding SQLite Local dev, single user, no network.
web Postgres Memory shared with ChatGPT / Claude / Gemini.
self-hosted Postgres + TLS Production, multi-machine, HTTPS.

Switching modes is a one-shot migration handled by Alfred Memory tooling. Alfred emits a trace event for every row moved.

Environment variables

Sensitive values never live in config.json. Use env vars; Alfred reads them at startup.

env
# Required
export ALFRED_TENANT=my-project
export ALFRED_API_KEY=alk_...

# Optional
export ALFRED_MEMORY_DB=postgres://user:pass@host/db?sslmode=require
export ALFRED_CONSOLE_URL=https://alfred-console.example.com
export ALFRED_LOG_LEVEL=info

Validate the config

validate
node scripts/validate-policies.mjs
node --test packages/core/test/kernel.test.mjs
Next step: Agents & subagents to meet the panel — or Evals & baselines to wire your first regression suite.