Knowledge
An OpenRoutines agent’s knowledge is not the “remembers your preferences” memory of a chat assistant. It’s a work record: what happened, what someone must do, what’s worth keeping, versioned in git and reviewed like code. Teamwork reports this record; it doesn’t own it.
What the agent records
One rule routes everything an agent wants to remember:
- It happened → an event in events.md: raw facts, including the no-ops (“checked 5 PRs, no doc drift”)
- Someone must do it → a task in tasks.md, owned by the agent or a human: one record with a stable id, from discovery to resolution. The supervisor files them too, so a run that died without explaining itself still lands on someone’s list
- It may inform a later decision but needs no action → a line in context.md
- Only one routine needs it → that routine’s private ledger in
knowledge/ledgers/: working state for its next run, not a run log
Records hold facts, not polished prose, since compression and voice are a reader’s job. The rule is injected into every run, so routine authors never write it. Whether a routine’s runs are recorded as events is up to its teamwork setting, while tasks, context, and ledgers are always writable: even an invisible routine must be able to file a task.
Knowledge lives on a git branch
Knowledge travels through git on its own branch, pushed with every change and kept out of your routines’ history. It survives redeploys and rollbacks the way a database would, but stays versioned and inspectable: reviewing what your agent has learned is git log knowledge, and pruning what it got wrong is part of maintaining one. The agent pulls the branch before each run, so your correction reaches the next one. It’s also the only branch a running agent exchanges with origin, since routines and code travel the other way, baked into the image (see Deploying your agent).
From a checkout, openroutines sync fetches the latest and the files read as ordinary Markdown. knowledge/ledgers/check-in.md holds the last check-in the agent delivered. openroutines knowledge browses or summarizes the branch straight from origin, without syncing.
Entries older than the retention window (knowledge.retention in openroutines.yml, default 30 days) are trimmed daily, while git history keeps everything, including changes a reporting routine hasn’t gotten to yet. Trimming is housekeeping and is never itself reported.