Documentation Index
Fetch the complete documentation index at: https://docs.sxth.ai/llms.txt
Use this file to discover all available pages before exploring further.
Adapters
Adapters define domain-specific behavior for your application. They tell the Mind:
- What identity types exist — User archetypes in your domain
- What journey stages look like — Progression from start to finish
- How to detect the current stage — Logic based on state
- What nudges to send — Proactive messages for re-engagement
- How to build prompts — Context-aware system prompts
The Mind handles everything else: state management, persistence, LLM calls.
Built-in Adapters
sxth-mind ships with three example adapters:
Sales
Pipeline tracking, outreach patterns, deal stages
Habits
Streak tracking, blockers, recovery patterns
Learning
Progress tracking, stuck indicators, learning styles
Adapter Interface
from sxth_mind import BaseAdapter
from sxth_mind.schemas import UserMind, ProjectMind
class MyAdapter(BaseAdapter):
@property
def name(self) -> str:
"""Unique identifier for this adapter."""
return "my_app"
@property
def display_name(self) -> str:
"""Human-readable name."""
return "My App"
def get_identity_types(self) -> list[dict]:
"""Define user archetypes."""
...
def get_journey_stages(self) -> list[dict]:
"""Define progression stages."""
...
def detect_journey_stage(self, project_mind: ProjectMind) -> str:
"""Determine current stage from state."""
...
def get_nudge_templates(self) -> dict:
"""Define proactive message templates."""
...
def get_system_prompt(self, user_mind: UserMind, project_mind: ProjectMind) -> str:
"""Build context-aware system prompt."""
...
Key Concepts
Identity Types
User archetypes help personalize responses:
def get_identity_types(self):
return [
{
"key": "power_user",
"label": "Power User",
"traits": ["fast", "keyboard-driven", "wants efficiency"],
},
{
"key": "casual",
"label": "Casual User",
"traits": ["occasional", "exploratory", "needs guidance"],
},
]
The Mind stores detected identity in user_mind.identity_type.
Journey Stages
Stages define progression and appropriate tone:
def get_journey_stages(self):
return [
{
"key": "onboarding",
"label": "Onboarding",
"tone": "helpful",
"guidance": "Guide them through setup. Be patient.",
},
{
"key": "proficient",
"label": "Proficient",
"tone": "efficient",
"guidance": "Stay out of their way. Be concise.",
},
{
"key": "churning",
"label": "At Risk",
"tone": "supportive",
"guidance": "Re-engage gently. Understand blockers.",
},
]
Stage Detection
Logic to determine current stage:
def detect_journey_stage(self, project_mind: ProjectMind) -> str:
if project_mind.interaction_count < 5:
return "onboarding"
if project_mind.days_since_activity > 30:
return "churning"
if project_mind.momentum_score > 0.7:
return "proficient"
return "active"
Nudge Templates
Proactive messages with placeholders:
def get_nudge_templates(self):
return {
"inactivity": {
"title": "We miss you!",
"template": "It's been {days} days. Ready to continue?",
"priority": 5, # 1-10
},
"milestone": {
"title": "Nice progress!",
"template": "You've completed {count} sessions. Keep it up!",
"priority": 3,
},
}
Next Steps
Build Your Own Adapter
Complete guide to creating custom adapters