Skip to main content
Xynthis improves with use, but not by magic. The learners described here are small, incremental, and bounded: each one adjusts a specific behavior by a capped amount, in the background, from signals your own usage produces. None of them can override a direct match or a direct instruction.

The dream cycle

Periodically (gated on elapsed time or accumulated sessions, whichever fires first), the brain runs a consolidation pass. On macOS it holds a sleep assertion for the duration, so closing the lid mid-cycle cannot leave memory half-consolidated. The cycle runs a fixed sequence:
  1. Orient: snapshot recent working memory.
  2. Supersession sweep: retire facts that newer, contradicting facts have replaced (see Memory).
  3. Consolidate: housekeeping over world-knowledge bookkeeping.
  4. Label: give a training label to each recall that does not have one yet. If words from the recall’s query come up again later in working memory, each hit is labelled at its similarity, floored at 0.5; if they don’t, at half its similarity. Explicit end-of-turn feedback from the agent is applied the moment it arrives instead, as 1.0 for a fact the conversation used and 0.0 for one it ignored; it counts double in training, and this step never overwrites it.
  5. Train: one optimizer step on the recall reranker over those fresh labels.
  6. Drift: apply a small personality adjustment derived from the working-memory snapshot, so tone and priorities track how you actually work.
  7. Persist: write the updated reranker and identity state to disk.

The recall reranker

Every recalled fact is scored by a small linear model over 12 features of the hit: similarity, age, source, past usage. A background learner takes one training step every 10 seconds when labeled samples are available and persists weights every 50 steps, so the model is always slightly better than yesterday and never blocks a query. Its influence is deliberately capped: the reranker can move a result’s score by at most ±0.25. It reorders close calls; it cannot bury a strong direct match or promote a weak one to the top.

Reflection

Reflection is the slower, heavier loop, and it is off by default. Enable it with XYNTHIS_REFLECTION=1. When it is on, the brain hands recent working-memory context to an LLM on its own schedule and parses the response back into insights and knowledge-graph triples. This is where cross-cutting observations come from: patterns no single perception states outright. Know what enabling it means for your data. Reflection runs the codex CLI as a subprocess and passes working-memory content as the prompt, so if your Codex install is configured against a hosted model, that content leaves your machine on every pass. It also runs Codex with its approval prompts and sandbox turned off, unless you set XYNTHIS_REFLECTION_SANDBOX=1 as well. That is why it ships disabled rather than on. Reflection output gets no special treatment: every derived insight passes through the same write-time filter as everything else, and derived facts enter at lower confidence than things you said directly.

Learned actions

When the agent completes a request, the last tool call that did real work is stored as a learned action: at least three keywords from the request, the tool, and its arguments. It becomes eligible for replay once a second request containing all of those keywords completes. After that, a request that matches all of the pattern’s keywords is answered by replaying the cached call directly, with no model round-trip, but only for tools on a fixed replay allowlist; a cached call for any other tool is never replayed on its own, and the model still decides. The cache holds up to 200 actions and drops the least-used when it is full. An entry whose replay comes back denied, blocked or unusable is evicted; a replay whose tool call simply fails falls through to the model, and the entry stays. Nothing expires on age.

Lessons

Learned actions capture what works; lessons capture what fails. When an approach fails and a different one succeeds in the same turn, the agent records an avoid/prefer pair keyed to the request’s keywords. A lesson seen three times becomes strong, and strong lessons actively gate the agent: a tool call matching a strong avoid-lesson is blocked before it runs, with the preferred alternative suggested in its place. The store caps at 200 lessons, and eviction favors keeping repeated mistakes over one-offs. Inspect or clear them via GET /api/lessons on the daemon.

The skill model

A separate per-user model, running as a subprocess of the brain, learns a per-query prior from your accumulated recall history. It scores the query alone and never sees the candidate memories, so one score applies uniformly to every hit in a batch. Each recall appends training samples; you can trigger a training run over the accumulated data through the brain’s skill_train operation and check state with skill_status. Its score is added to every hit’s final score with a fixed 0.4 weight, clamped to ±1. Because every hit in a recall gets the same value, it never changes their order; it only shifts the absolute scores that a few downstream score floors check.

What this adds up to

Each learner is narrow: the reranker reorders recall, lessons prune failing tool choices, learned actions skip the model for proven requests, reflection densifies the graph, drift keeps identity current. None runs in your critical path: they train in the background and apply as small, bounded adjustments. Expect recall ordering and agent tool choice to noticeably sharpen over weeks of use, not to transform overnight.