Documentation Index
Fetch the complete documentation index at: https://docs.crewship.ai/llms.txt
Use this file to discover all available pages before exploring further.
Consolidate
Roadmap (v0.2). The Consolidate package ships in v0.1 but is not auto-scheduled. Manual trigger via API/CLI works today; automatic scheduling and the “supervisor crew” pattern are planned for v0.2.
- Consolidator — designed cadence: every 6h. Walks recent journal entries per crew and produces a set of learned rules appended to
.memory/topics/learned-YYYY-MM-DD.md. Emitsmemory.consolidated. - Compactor — designed cadence: daily at 03:00 UTC. Rolls up low-signal entries older than 30 days into a single
system.compactionentry and deletes the originals.warn/errorrows are preserved indefinitely.
Candidate entry types
The consolidator considers these entry types for rule extraction:Rules output
Rules land in{memoryRoot}/{crewSlug}/topics/learned-YYYY-MM-DD.md. Format:
Summarizer
SummarizerClient is an interface:
llama3.1:8b or similar). If no summarizer is configured:
- Background runner skips every crew silently.
- Manual trigger returns 202 Accepted with
note: "no summarizer configured, skipping"and emitssystem.consolidation_triggered+system.consolidation_completed(status=skipped-no-summarizer) so the audit trail captures the no-op.
Compactor
Compaction target:info and notice entries older than 30 days that are NOT type summary.generated, memory.consolidated, or any checkpoint/fork/approval/regression. Rolls up into one system.compaction entry per (crew, day) bucket with a count and kind breakdown in the payload, then archives the originals to journal_entries_archived (with the payload truncated to 400 chars) before deleting from the base table. Done in a single transaction so neither side can drift.
Preserved indefinitely (never compacted):
warnanderrorseveritysummary.generated,memory.consolidated- Everything under
approval.*,checkpoint.*,fork.*,eval.regression_detected - Anything tagged with
priority='permanent'(see Crew Journal — Priority markers)
Archive layer (PR #212)
Migration 55 addedjournal_entries_archived so compaction is no longer destructive. The aged row is copied verbatim except for payload, which is truncated to 400 characters with a trailing …[truncated] marker. The archive table has the same workspace/ts indexes as the base, so historical forensic queries still work — they just have to include the archive table:
/journal view does not read from the archive by default — operators have to explicitly opt in via ?include_archive=true. This keeps the live UI fast and the archive as a forensic-only surface.
If you want to tune journal compaction retention, edit RunnerOptions.CompactionOlderThan and restart. Per-workspace retention for memory_versions (a separate sweep, run by the Iter 4 coordinator) is configurable at runtime via PATCH /admin/memory/config — see Memory Observability — Per-workspace retention.
Manual trigger
OWNER or ADMIN only. Returns 202 Accepted immediately; the actual run happens in a 10-minute background goroutine.
Response shapes:
| Condition | Response |
|---|---|
| Run started | {"triggered": true, "worker_id": "csd_..."} |
| No summarizer configured | 202 {"accepted": true, "note": "no summarizer configured, skipping"} |
| Consolidator not wired (dev/test build) | 503 {"error": "consolidator not configured"} |
| Same workspace already running | 409 {"error": "already running"} |
| Invalid / cross-tenant crew_id | 404 {"error": "crew not found"} |
since accepts Go durations (90m, 24h) plus shorthand d (days) and w (weeks). Default 24h if unset or unparseable. Soft-deleted crews are treated as not found — a deleted crew can’t grow fresh memory artifacts via explicit ID.
CLI
crewship consolidate.
Journal entries emitted
| Entry | When |
|---|---|
system.consolidation_triggered | On Run() entry. Payload includes worker_id and reason (manual or scheduled). |
system.consolidation_completed | On Run() exit. Payload includes status (ok, skipped-no-summarizer, crew-not-found, enumerate-failed), crews_run, rules_appended. |
memory.consolidated | Per crew, per successful cycle. Payload lists rules_count and paths to the output file. |
system.compaction | Per (crew, day) bucket after compaction. Payload lists kinds and row counts rolled up. |
Gotchas
- Ollama must be reachable. Both the consolidator (via
SummarizerClient) and the episodic indexer depend on Ollama. SetOLLAMA_MODELS="/Volumes/SSD 990 PRO/ollama-models"andollama servebefore starting the server locally. - The triggered journal entry is always emitted. Even the “no summarizer” skip path emits both triggered + completed so operators see the full round-trip. If you filter for
memory.consolidatedonly, you’ll miss skipped runs. - Per-workspace in-flight guard. A second manual trigger for the same workspace while the first is running returns 409. Track
worker_idif you need to wait for completion. - Compactor is aggressive on info/notice. If you rely on
exec.commandentries older than 30 days for forensics, export them out-of-band before the Compactor rolls them up.
Related
- Crew Journal — input stream.
- Episodic memory — indexer runs on the consolidator tick.
- Memory System — consumes the generated
topics/learned-*.mdfiles. crewship consolidate, Consolidate API.