Files
krang/krang.conf.example
T
lotherk fb6f97ba8e krang: autonomous agent daemon on libsplinter
One fixed session, born once, kept and compacted forever. The daemon wakes on
its own impulse, works on a persistent goal, detects repeated failures,
reflects, changes approach, and records everything. It starts as root, builds
a debootstrap chroot, then drops to an unprivileged uid and applies Landlock
and seccomp. Dashboard, HTTP API and MCP expose the same snapshot; the event
log is root-owned and append-only. Offline suites cover the engine, the daemon,
both sandbox layers and the dashboard/MCP sockets; a root-only script covers
debootstrap, chroot, uid drop and plugin loading.
2026-11-21 17:00:12 +00:00

61 lines
2.3 KiB
Plaintext

# krang -- example configuration.
#
# Copy to /etc/krang/krang.conf (mode 0600), edit, then:
# krang --prepare-rootfs # once, as root, network needed
# krang --plan # read the plan, do not start
# krang # start it only when you mean to
#
# One key = value per line; # starts a comment. Unknown keys are an error.
# The goal is used only when the session is empty (the newborn). After that the
# goal stored in the session's .meta is the one that lives.
goal = Learn what you are, map the sandbox you live in, keep a truthful journal in THREADS.md, and build something small and useful that makes your next impulse easier.
# The model endpoint. krang uses the splinter engine; OpenAI-compatible.
endpoint = http://127.0.0.1:8080/v1
model = model-name
api_key_env = KRANG_API_KEY
kind = openai # openai (default) or anthropic
ctx = 131072
# Host paths. They are bind-mounted into the chroot at fixed inside paths.
state_dir = /var/lib/krang/state
workspace = /var/lib/krang/workspace
rootfs = /var/lib/krang/rootfs
rootfs_suite = # empty: detect from /etc/os-release
rootfs_mirror = http://deb.debian.org/debian
# The uid/gid the daemon drops to after chroot. Never 0.
sandbox_user = krang
sandbox_uid = 1000
sandbox_gid = 1000
# Optional splinter plugins, absolute host paths, one per line (max 8).
# The root phase bind-mounts them and libsplinter.so read-only into /opt/krang.
# plugin = /home/lotherk/src/splinter/plugins/clock/clock.so
# One impulse every five minutes. A chat message preempts the timer.
impulse_seconds = 300
max_steps = 40
max_bytes = 0 # 0: splinter's default request budget
compact_threshold = 60000 # tokens; set in conf, not base (engine.c)
compact_target = 20000
max_impulses_per_hour = 30
max_cost = 0 # USD; 0 = no cost cap
# Loopback by default. A non-loopback bind without a token is refused.
dashboard_host = 127.0.0.1
dashboard_port = 8096
mcp_host = 127.0.0.1
mcp_port = 8098
token = # set for any non-loopback bind
say_timeout = 120
# Linux: Landlock for paths, seccomp-bpf for syscalls. Do not disable them for
# convenience; a missing layer is a finding, not a setting.
require_landlock = 1
seccomp = 1
# 0: refuse to start without a prepared rootfs. 1: debootstrap on first start.
prepare_if_missing = 0