Expand description
One seat over the habitats. It does not own them.
Cards are read-only. Remember/Prefer POST /v1/atoms and never extract
on write. Consensus is a different crate, then the tracker verb. Policyd
is argv law: this process does not reload a pack as a check.
Structs§
- Consensus
Step - Event
- One dated event on an issue’s timeline, from whichever store holds it.
- Habitat
- One habitat and whether it answers.
- Harness
- One agent runner, as the seat’s own configuration describes it. The seat
ships no runner’s name: the file at
harnesses_pathnames them, one table each, andonboardanddoctorread it. - Harnesses
- The whole file:
[[harness]]tables. - Hook
Call - What the runner’s hook hands the seat: the event, and the text worth asking the pack about. From a tool call, the command about to run; from a prompt, the prompt.
- Persona
- A voter with a view of its own: a persona.
anchorin[0, 1]is how far it moves off its ballot in a settle; 0 never moves, 1 is a plain DeGroot voter.entitiesare the domains it speaks to. - Prediction
- One voter’s forecast on one issue: what share the others give each option, or the option it expects to win.
- Rule
- Argv law kept in the pack: a glob over the command line, a verdict, and
the reason a reader sees when it fires.
denystops the action at the runner and underljos policy;askhands it to the person. - Said
- What a habitat printed, kept for a caller that has to hand it on. A non-zero exit is an error carrying stderr.
- Step
- One step an onboarding took, or would take.
- Trust
- One row of the influence graph:
fromlistens totowithweight.aboutscopes the row to the domains it speaks to: a row with none applies everywhere, a row with some applies when one of them meets the issue at hand (its title, or the entities of the island it activates).
Constants§
- BROAD_
EPSILON - The confidence bound a
broadissue settles under: voters within this L1 distance of each other’s opinion listen to each other. - BROAD_
TAG - The tag on an issue that asks for bounded confidence: a panel for a broad audience is allowed to settle into clusters, and the settle says how far apart they are, where a single-position model would average them away. Without it the anchored model runs.
- CARD_
NAMES - Working-core files this seat will print. Nothing else, and never write.
- CORRECTION_
CUES - Phrases a person uses when the agent has forgotten something it was told. A prompt that opens this way is a preference or a lesson the pack does not hold yet, and the moment to write it is now, before the work that follows.
- HARNESSES_
EXAMPLE - An example of the file, with placeholder names.
ljos onboard --exampleprints it; the two shapes are a registering command and a config file. - HOOK_
EVENTS - The events the memory hook fires on when a runner’s table names none:
the prompt, which carries the task in the person’s words. A tool call
carries the command about to run and is a cue too; a runner asks for it
with
hook_events. The default came out of a panel of this seat’s personas: a turn issues many shell commands and one prompt. - HOOK_
MATCHERS - The events the hook knows a matcher for; any other event takes
*. - HOOK_
SCORE_ FLOOR - The floor a hit must reach, as a share of the strongest hit’s score, to be injected. A command line matches many claims weakly; only the ones that match it as well as the best does are worth the agent’s context.
- LEARN_
BETA - The factor a refuted voter’s rows shrink by (Hedge, doi:10.1006/jcss.1997.1504).
- POLICY_
TCB - Printed on stderr.
ljos-policydis the TCB when it exists. - PROTOCOL
- The sitting protocol: which store answers which question, the order of
verbs before, during and after the work, and the refusals worth knowing.
ljos protocolprints it,ljos onboardinstalls it as a skill, and the server serves it atljos://protocol. Harness agnostic on purpose. - REQUIRED
- The habitats the seat needs.
- SEAT_
WORKSPACE - The workspace the seat’s memory lives in when nothing names one. The
pack’s command line keys a workspace to the repository it stands in;
a seat is one memory across every repository it works in, so the seat
pins one.
PACKSET_WORKSPACEoverrides it. - TRUST_
FLOOR - The least a row can fall to, so a voter who is right again is heard again.
Functions§
- age_of
- How long ago a stamp was, in words a reader can place:
today,yesterday,N days ago, then weeks, months and years once the count stops fitting the smaller unit. Empty when the stamp is missing or unreadable,in N daysfor a stamp ahead ofnow. - anchors_
json - Anchors as the settles take them:
{"name": anchor, ...}. - atom_
body - Explicit claim body. The text is stored as given; never harvested.
- atom_
kind - Remember → lesson, Prefer → preference. Trust rows go through
trust_atom. - ballots_
from_ json (agent, choice)pairs from a tracker’svote --json.- brief
- The brief a subagent playing a persona starts from: the persona’s view and domains, what the seat knows on those domains (preferences first), and the issue’s working set. One text, so a panel member reads the same seat the rest do and still reads it its own way.
- calibrate
- Turn a project’s voting history into trust rows without anyone naming
an outcome: Dawid and Skene’s accuracy per voter
(doi:10.2307/2346806), from
ljos-consensus reliability, turned into the weight every other voter gives that voter bycalibration_weights: log odds, so a voter right nine times in ten outweighs one right six times in ten by five to one, not three to two. Rows are complete and floored atTRUST_FLOOR, so the settle sees the whole graph. - calibration_
weights - The weight a voter of estimated accuracy
pearns: the log oddsln(p / (1 - p)), the optimal weight for independent voters on a two-way choice (Nitzan and Paroush, doi:10.2307/2526438; a weighted majority under these weights is the maximum-likelihood decision), withpheld inside[0.01, 0.99]so a perfect record does not become an infinite vote, and a voter at or under chance atTRUST_FLOOR. The weights are scaled so the most reliable voter stands at one, which is the scale the trust rows live on; the ratios between voters are the rule’s. - card_
paths - cards
- Read-only cards. Only
CARD_NAMES, never created, never written. - claim
- Take a session node, and when the claim graph refuses because the assignee still holds another node, say which tracker id that is and the two verbs that free it. The bare refusal names a 32-hex id nobody can act on.
- conflicts
- Consolidate the seat’s memory: every claim that replaces an earlier
one (a rewrite, a new object under the same head, a correction, an
explicit supersedes) closes the earlier one’s window and names it.
Candidate contradictions from the geometry of the seat’s memory: the
landscapebinary reads the pack’s embeddings at the point scale and prints the lowest passes between single memories, which on a record of planted contradictions were the contradictions nine times in ten. The replacement rule reads words; this reads distance, in any language. A candidate is for a person orconsolidateto judge; nothing is written here.landscapeis an optional habitat: absent, this says so. - consensus_
steps ljos-consensusfirst, thenvissue consensus, both under the pack’s trust rows when there are any. Missing bins are skipped.- consensus_
steps_ anchored consensus_stepspassing the personas’ anchors to both settles as--susceptibility-of, so a persona holds its ballot as much as it says.- consensus_
steps_ for consensus_steps_anchoredwith the model flags the issue’s tags ask for on the model crate’s settle.- doctor
- Which habitats answer: binaries on
PATH, the pack overPACKSET_URL, the deed store, the tracker, the claim graph. - doctor_
seat - The seat’s own rows: binaries, pack, host key, deed store, tracker, claim graph. What a sitting checks; the runner rows are onboarding.
- due
- What the pack holds for review now.
- due_of
- The live atoms whose review is due at
now(RFC 3339 UTC), soonest first. A claim that has never entered the review clock has nodue_at; it is due now, and grading it puts it on the clock. Trust and persona rows are weighed, not recalled, and never come up. - due_
report - The review clock as
ljos dueprints it: the due atoms, then the summary. - enclose
- Deeds to enclose: the satchel’s
needsplus what the pack cites, once each. - enclosed_
atoms - Every atom in a satchel’s
data/atoms/*.jsonl. - finish
- Close a sitting: remember the lesson when there is one, fire the island the issue’s title activates, complete the session node, and learn from the outcome when one is named. Without a lesson the report says so, because a sitting that taught nothing worth two sentences is rare and worth noticing.
- format_
consolidation - The pairs a consolidation closed or would close, one a line, then the count and whether it was applied.
- format_
doctor - format_
due - format_
hits - One line per hit: score, how many scorers named it out of how many ran, kind, id, age, text. The age is the one column a reader needs to lay the hits on a timeline; the count is what the hook keys on.
- format_
hubs - One line per hub: score, links, id, text.
- format_
island - One line per activated memory: activation, seed mark, id, text.
- format_
steps - glob_
matches - A glob over a command line:
*matches any run of characters,?one. The match is on the whole line, sorm -rf *isrm -rfand anything after, and*sudo*is sudo anywhere. - graded
- Grade one review: recalled moves the atom out, lapsed brings it back sooner.
- handover
- Pack a slice of the seat into
out: the tracker’s satchel, the pack’s atoms, the deeds both cite, sealed, and signed when a host key is set. - harnesses_
from - Parse the runners file. An absent file is no runners, not an error.
- harnesses_
path - Where the runners are described:
$XDG_CONFIG_HOME/ljos/harnesses.toml. - healthy
- Whether every required habitat answers.
- hook_
call - Read a hook call from the runner’s JSON, or from plain text (an argv
under argv law). Fields:
hook_event_name,tool_name,tool_input(itscommand, else every string value joined),prompt. - hook_
context - The context the hook injects: the island the cue activates, standing preferences first because they bear on what to do, then lessons. Empty when the pack holds nothing on it or does not answer; a hook that fails must not stop the runner, so this never errors.
- hook_
output - The hook’s answer in the runner’s JSON:
additionalContextunder the event that fired. Empty context is no output, which the runner reads as no opinion. - hook_
output_ ruled hook_outputcarrying a rule’s verdict on a tool call:denyoraskas the runner’s permission decision, with the rule’s reason. On a prompt or an argv line the verdict is a line of text.- identity_
or_ seat - The identity a ballot is cast under: the persona named, else the
runner’s seat name when
LJOS_SEATis set, else none (the tracker’s own default,VISSUE_AGENToruser@host). - island_
entities - The domains an issue’s island speaks to: the entities of the memories
its title activates, most frequent first, eight at most. What
learnscopes its rows to. - join
- learn
- The rows every voter holds on every other after
outcomeis known: a voter whose ballot was refuted shrinks bybeta, floored atTRUST_FLOOR; a missing row starts at one. Complete, so the settle sees the whole graph. - learn_
about learnwriting rows scoped toabout: the domains the issue’s island speaks to, so that being wrong about one topic does not cost a voter its standing on every other. An emptyaboutis the unscoped rule.- learn_
anchors - The personas after an outcome: one whose ballot the outcome refuted
moves its anchor toward one by
1 - betaof the gap, so a persona that keeps being wrong listens more; a vindicated one keeps its anchor. The personas that voted are the only ones touched. Acemoglu, Como, Fagnani and Ozdaglar (doi:10.1287/moor.1120.0570) show what a stubborn wrong voter does to a pool; this is the seat’s remedy. - learn_
and_ write learn_aboutandlearn_anchorstogether, written to the pack: the rows, then the personas the outcome moved. Returns what was written.- learn_
record - Learn from an outcome by the record: each voter’s hits and misses so
far, this outcome added, give its accuracy with one of each smoothed
in, and the rows are the log odds of that scaled to the best voter at
one (
calibration_weights). Measured against multiplicative shrinking (Hedge) on voters of known accuracy, the record reaches the batch calibration and the shrink does not: a voter is weighed by what it got right, not by how many times it has been punished. Rows are complete over the voters and scoped toabout. - learn_
shared learn_aboutwith a fixed share of recovery: after the Hedge step every row moves toward one byshareof the gap, so a voter refuted long ago is not held down forever and the best voter can change (Herbster and Warmuth, doi:10.1023/A:1007424614876). Zero is plain Hedge; the seat’s default.- needs_
of - The accessions a satchel’s description says it needs.
- node_
for - The claimdag node standing for
issue, minted with the tracker id as its summary when the graph does not hold it yet. - now_utc
- Now, RFC 3339 UTC to the second, the stamp the pack writes.
- on_path
- onboard
- Register the server and install the skill for one runner named in the
runners file.
jsonregisters nothing and returns the entry to paste.dryreports without writing. - onboard_
from - pack
- The pack client. With nothing set it speaks to
127.0.0.1:8761about theseatworkspace;PACKSET_URLpoints elsewhere,PACKSET_WORKSPACEnames another workspace, andPACKSET_URL=offis the one way to have no pack. - packset_
consolidate - The rule a write applies on arrival, run over what the pack already
holds. Without
applynothing is written; the pairs are reported. - packset_
forget - Retire one atom from the workspace the cwd resolves to, optionally naming the deed that withdrew it.
- packset_
hubs - The claims the pack’s link graph turns on, highest first: what matters in this seat’s memory by its own connections, before any query.
- packset_
island - The memories a task activates: the pack’s island around the cue. With
fire, the strongest of them fire together and their links gain weight. - packset_
search - packset_
search_ as_ of packset_search_optsasked of the pack as it stood atas_of(RFC 3339; a date alone reads as its start): only memories live then answer, what was withdrawn since included and what was learnt since left out.Noneis now. This is the question “what did the seat know when it decided that”, and the pack keeps every record so it can be asked.- packset_
search_ opts packset_searchwith a limit and the cross-encoder rerank: the writer scores the top hits against the query with its reranker, which costs a model call and buys precision. For a brief or a person reading, not for the hook.- packset_
write - packset_
write_ as packset_writeas a persona: the claim carries the persona’s entity, so what a persona learned comes back to it first in its next brief and stays in the seat’s one pack. A persona accumulates its own lessons the way a reviewer does; the seat still reads them all.- panel
- A panel for a runner with no MCP: one brief per persona written to
out, named<persona>.md, and the lines that run it. A runner starts one subagent per file, each ends with the ballot its brief names, andljos consensus ISSUEsettles. - panel_
steps - The two readings beside a settle, when the pack holds what they need:
the surprisingly popular answer when two or more voters forecast the
others (
predict), and the EigenTrust standing of the voters when trust rows exist. Both are the model crate’s verbs. - persona_
atom - The
personaatom for the pack: kindpersona, the view as text. - persona_
entity - The entity a persona’s own claims carry, so a brief can find them.
- personas_
from_ pack - The personas in the seat’s pack.
- personas_
of - The live personas: the latest
personaatom per name. - policy_
line - policy_
with_ memory - The argv line, then what the pack knows that bears on it: the memory a policy layer injects beside its verdict. The line prints even when the pack is down; the memory is the part that may be empty.
- policyd_
bin POLICYD_BIN, elseljos-policydon PATH.- post_
claim - POST one explicit claim. Callers pass Remember/Prefer only.
- predictions_
json - Forecasts as
ljos-consensus surprising --predictionstakes them. - predictions_
of - The latest forecast per agent on an issue.
- receive
- Check a satchel that arrived: manifest, deed receipts, signature, and what
the atoms hold; with
import, POST the atoms into this seat’s pack. - records_
from_ atoms - The latest record per voter among the trust atoms that carry one.
- release
- Hand a session node back before it is terminal: ready again, assignee cleared, generation moved.
- resolve_
assignee - Resolve an
--assignee/ MCP field. A shared name (grok,seat,you) is treated as omitted so two conversations do not share one occupancy slot. - review_
summary - One line on the state of the review clock: how many are due, how many
are scheduled, and when the next one comes up. An empty
duewith a next date is a clock that is running; an emptyduewith nothing scheduled is a seat that has remembered nothing. - rows_
about - The rows that apply to an issue about
topic: every unscoped row, and every scoped row one of whose domains is among the topic’s words. - rules_
from_ pack - The rules in the seat’s pack.
- rules_
of - The live rules in a set of atoms.
- run
- run_as
runwithVISSUE_AGENTset toidentity, so a ballot or a claim is recorded under a persona’s name rather than the seat’s.- run_
captured - run_fed
- Run a habitat’s verb with
inputon stdin. - seat_
name - The name this seat claims and votes under when none is given:
LJOS_SEAT(a runner’s registration sets it to the runner’s name, so two runners on one host hold separate claims), else the session id the runner stamped, elseVISSUE_AGENT, elseseat. - server_
entry - The MCP server entry any runner that reads JSON accepts.
- session_
end - When a session ends, the memories injected during it fire together:
they served one sitting, so their links gain weight and the next
sitting like it walks a heavier path (Hebb, through the pack’s
fire). The seen file goes with the session. Returns how many fired; nothing to fire, or no pack, is zero and not an error, since a hook must not stop a runner from ending. - settle_
flags_ for - The model flags an issue’s tags ask for, beside the rows and anchors.
The kind of work sets the dynamics:
broadruns bounded confidence. - sitting
- Open a sitting on an issue, in the protocol’s order, and stop at the first habitat that does not answer: doctor, cards, the review clock, the island the issue’s title activates, the working set, the timeline, the claim. One verb, so the loop that makes the seat a memory runs every time and not only when somebody remembers to run it.
- skill_
text - The skill file a harness loads: front matter, then the protocol.
- tcb_
check - One line from
ljos-policyd check -- argv. None if the binary is absent or failed to start. Absence is not a deny. - timeline
- The issue’s timeline, the three stores read as one dated list, oldest first: the tracker’s logbook (creation, state changes, claims, notes), the deeds the issue cites with the time each was produced, and the memories the issue’s title activates with the time each was written. The reader gets time as data, not as stamps to do arithmetic on: each line carries its age and the gap since the line before it, and a later line supersedes an earlier one on the same matter.
- topic_
words - The words an issue is about, for scoping trust rows: its title, lower case, three letters or longer.
- trust_
atom - A
trustatom for one row.whyare deed accessions it cites. - trust_
from_ pack - The live trust rows in the seat’s pack.
- trust_
json - Rows as the consensus takes them:
[[from, to, weight], ...]. - trust_
rows - The live rows in a set of atoms: the latest
trustatom per(from, to). - verdict_
for - The verdict the rules give a command line: the first
denywins, then the firstask, else none. Returns the rule that fired. - work_id
- A claimdag id for a name: the name itself when it is already 32 hex, else FNV-1a 128 of it. One tracker id maps to one node; one assignee to one actor.
- write_
persona - POST one persona.
- write_
prediction - POST one forecast.
expectis an option name or{option: share}. - write_
rule - POST one rule.
- write_
trust - POST one trust row.
- write_
trust_ record write_trustcarrying the voter’s record on the row.
Type Aliases§
- Standing
- A voter’s record: how often the outcome agreed with its ballot, and how often not, carried on every trust row into that voter.