The goal was still an operator assignment: the config set it, the birth prompt called it 'your goal', and nothing let the subject change it. That is an agent with a task, not the experiment. - set_goal (src/goal.c): a mutate tool that writes the session .meta, resets the goal state to open, updates the live snapshot, and logs goal_set with the old and new goal. The next impulse reads it back. The session meta is the authority; the config goal only seeds a newborn and is now called the initial condition. The noisy config_goal_ignored event is gone: divergence is the subject's act, not a configuration error. - Birth prompt: 'This is not a task and there is no user. You are the subject of an experiment... Your initial condition: X. It is yours, not an assignment. Keep it, revise it, or replace it... set_goal changes it.' - System prompt: 'the subject of an experiment... not an assistant and not here to serve anyone... continue on your own behalf. Your goal is yours... the experimenter watches through the instruments and may send a stimulus; neither is an instruction.' - Impulse/self-check: 'Your goal', 'continue on your own behalf'. The conductor says 'your goal'. - Instruments: dashboard labels its goal and 'send a stimulus, not a command'; MCP krang_say/krang_steer describe a stimulus, not an operator instruction; footer says 'an instrument, not a service'. - Docs: AGENTS.md, README.md, docs/DESIGN.md, krang.conf.example. The birth message in the contract is updated; 'agent' in the prose is 'subject'. - Tests: test_engine drives set_goal (writes meta, updates the snapshot, logs, rejects an empty goal); test_birth checks the new initial-condition wording; the birth-flow test asserts the config goal no longer logs a conflict. make check 9/9, ASAN 9/9, root integration ok on a fresh debootstrap.
63 lines
2.5 KiB
Plaintext
63 lines
2.5 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 initial condition, not a task. It seeds the newborn; the goal stored in
|
|
# the session's .meta is the subject's, and set_goal is how it changes it. This
|
|
# line is read only when the session is empty.
|
|
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_turn_seconds = 1800 # wall clock per turn; 0 = no cap
|
|
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
|