Mind
TheMind is the core abstraction in sxth-mind. It coordinates:
- Adapter — Domain-specific behavior (identity types, journey stages, nudges)
- Provider — LLM calls (OpenAI, custom, etc.)
- Storage — Persistence (memory, SQLite, custom)
Creating a Mind
Core Methods
chat()
The primary interface. Handles everything automatically:- Loads or creates UserMind and ProjectMind
- Builds context-aware prompt using the adapter
- Calls the LLM
- Updates state based on the interaction
- Returns the response
chat_stream()
Same aschat(), but yields tokens as they’re generated:
get_state()
Retrieve the current cognitive state for introspection or custom use:explain_state()
Get a human-readable summary of what the Mind knows:get_pending_nudges()
Retrieve proactive suggestions for a user:Using State for Custom Personalization
You don’t have to usemind.chat(). Get state and use it however you want:

