Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/docs/(configuration)/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ Thresholds are fractions of `context_window`.
| `refresh_secs` | integer | 900 | Seconds between background warmup passes |
| `startup_delay_secs` | integer | 5 | Delay before first warmup pass after boot |

When warmup is enabled, it is the primary bulletin refresh path. The cortex bulletin loop remains as a fallback generator when warmup is disabled or when the cached bulletin is stale (`bulletin_age_secs >= max(1, warmup.refresh_secs)`).

Dispatch readiness is derived from warmup runtime state:

- warmup state must be `warm`
Expand Down
8 changes: 5 additions & 3 deletions docs/content/docs/(core)/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,11 @@ CLI (clap) → parse args
→ For each agent:
→ Run SQLite migrations
→ Initialize MemoryStore, LanceDB tables
→ Initialize MessagingManager (start all platform adapters)
→ Initialize CronScheduler
→ Start Cortex (warmup → first bulletin)
→ Load RuntimeConfig + identity + skills
→ Best-effort startup warmup pass (bounded wait)
→ Initialize MessagingManager (start all platform adapters)
→ Initialize CronScheduler
→ Start Cortex loops (warmup, bulletin fallback, association, ready-task)
→ Register agent in active agents map
→ Enter main event loop (tokio::select!)
→ Inbound messages → route to Channel instances
Expand Down
6 changes: 4 additions & 2 deletions docs/content/docs/(core)/cortex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ This is what makes Spacebot feel like it actually *knows* you. Without the bulle

Bulletin generation is a two-phase process: programmatic retrieval, then LLM synthesis.

On a configurable interval (default: 60 minutes), the cortex:
When warmup is enabled (default), warmup is the primary bulletin refresher on `warmup.refresh_secs` (default: 15 minutes). The bulletin loop still runs on `bulletin_interval_secs` (default: 60 minutes) as a fallback when warmup is disabled or when the cached bulletin is stale (`bulletin_age_secs >= max(1, warmup.refresh_secs)`).

Each bulletin generation pass does:

1. **Retrieves** memory data across eight predefined sections by querying the memory store directly (no LLM needed for retrieval):
- Identity & Core Facts — typed search for Identity memories, sorted by importance
Expand All @@ -34,7 +36,7 @@ On a configurable interval (default: 60 minutes), the cortex:

This design avoids the problem of an LLM formulating search queries without conversation context. The retrieval phase uses `SearchMode::Typed`, `SearchMode::Recent`, and `SearchMode::Important` — metadata-based modes that query SQLite directly without needing vector embeddings or search terms. The LLM only gets involved for the part it's good at: turning structured data into readable prose.

The first bulletin is generated immediately on startup. Subsequent runs happen every `bulletin_interval_secs`. If a generation fails, the previous bulletin is preserved. If the memory graph is empty, an empty bulletin is stored without invoking the LLM.
On startup, Spacebot runs a best-effort warmup pass before adapters accept traffic (bounded wait), so the first bulletin is usually already present when the first user message arrives. If generation fails, the previous bulletin is preserved. If the memory graph is empty, an empty bulletin is stored without invoking the LLM.

### What Channels See

Expand Down
Loading