Docs menuEvolution

Evolution

OkBot silently upkeeps assistants during chat: extract memory, create or update skills, patch persona (SOUL.md), and compress summaries when context grows long. The busy state shows Wrapping up (Chinese UI: 正在进化) — writes happen after the turn ends and enter the system prompt on the next turn.

That is cross-session memory plus persona / skills upkeep. Data lives on the active gateway host data root (default ~/.okbot).

Memory

  • Global memory: Settings → Global memory (memory.md).
  • Assistant memory: memory.md under each assistant directory; important facts across sessions.
  • Two-phase lifecycle:

- Candidate: post-turn extraction writes desensitized candidates by default; they are not injected into the system prompt. - Durable: consolidation promotes by hit count / pin; long zero-hit unpinned entries can demote back to candidate. Physical delete only via expiry purge or manage_memory forget.

  • Recall: before a run, only pinned + relevant / high-hit durables are injected (default cap about 16 entries, plus a char budget) — not the full store.
  • Tool manage_memory (list / pin / unpin / promote / forget; enable / approval under Settings → Tool permissions; on by default and usually auto-allowed) manages pin, promote, and forget.
  • Post-turn extraction is throttled; phrases like “remember” / 「记住」 / 「别忘了」 trigger immediate extraction.
  • When compression advances the covered window, memory is also extracted from dialogue that just fell out of the window.
  • Memory lifecycle is orthogonal to the session handoff summary and does not change compression.

Skills

Skills live as SKILL.md directories (per-assistant skills/<slug>/, or optional global ~/.agents/skills).

  • Progressive disclosure: the system prompt only has a catalog; full body loads on demand via read_skill.
  • Hot reload: watch the skills directories; file edits apply on the next turn without restart.
  • Auto create / update: throttled successful turns may upsert skills to capture reusable procedures.

Persona (SOUL.md)

Each assistant has a SOUL.md (onboarding + advanced edit). After successful turns, OkBot may patch only changed sections (not a full overwrite), effective next turn.

Long-running tasks

Built-in tool manage_task_progress (enable / approval under Settings → Tool permissions; on by default and usually auto-allowed) maintains a durable checklist (tasks.jsonl):

  • Decompose steps, persist state, resume after interruption; continue and correct on later turns; multi-task queue; task ids are host-generated (ULID)
  • Task status: backlog (pool, explicit only) / pending / in_progress / done (finished only — not success/fail)
  • Step status: in-progress phase pending | in_progress | blocked; terminal succeeded | failed | cancelled (use succeeded for completion; do not reuse done)
  • UI: the composer Open tasks card shows only in_progress; Edit assistant Tasks has three columns — backlog (manual delete) / in progress / finished
  • After a clean turn end, the host may auto-continue quietly (no visible user bubble) while work remains; pauses when a step is blocked or the task is still in backlog

Speak to users in product language (“task / progress”), not internal tool names.

Schedules

Users can say “remind me every day at 9…”. The model uses manage_schedule (create / list / pause / resume / delete) and writes jobs to schedules.jsonl under the current assistant or squad.

  • Approval: list / pause / resume default to allow; create / delete always require one confirmation regardless of tool prefs; list is read-only and never shows an approval card.
  • Timetable: daily HH:MM, hourly, every N m (N must divide 60), and 5-field cron; optional IANA timezone (else Settings → General timezone, else the gateway host’s local zone); once fires a single time then disables.
  • At most 50 jobs per assistant / squad. View, pause, or delete under Edit assistant / Edit squad → Automation.
  • Firing: the gateway owner process checks about every 20s and starts a normal chat turn. The synthetic trigger user row is persisted for the model but hidden from the transcript and search (same quiet pattern as auto-continue); the assistant reply stays visible. Nothing fires while the app or okbot serve is stopped; after restart, overdue next-times get one catch-up run. A job does not stack if its previous turn is still running.

Notes and resources library

When you want a durable document to keep (design brief, requirements, report) rather than a do-now checklist, use HTML notes (manage_note) in that assistant’s resources library (resources.jsonl). Reply bubbles can attach a one-shot preview card. See Assistants.

Boundary (one line)

Timed / recurring → schedules; do-now or unscheduled backlog work → long-running tasks; durable documents to maintain → notes. Do not turn notes into tasks, or schedules into checklists.

Context compression

Long sessions may incrementally write session-summary.json before a turn; full session.jsonl is kept. See Context.

Export / Marketplace

  • Export / Import assistant .okbot: persona and skills (bot.json name/avatar, SOUL.md, skills). No chat, memory, resources library, schedules, or secrets.
  • Marketplace: install starter assistants or connector presets with persona / skills / avatar; they follow the same evolution path afterward.

Rhythm (one line)

Read disk and record hits before the turn (maybe compress; inject pinned / relevant durables only) → this turn (may advance long-running tasks / change schedules / write notes / manage memory) → post-turn Wrapping up extracts candidates and consolidates, plus skills / SOUL (throttled) → affects later turns only.

Content is derived from the OkBot product repo and evolves with the product.