Getting Started with sxth-mind
This guide will walk you through building your first AI application with sxth-mind.What You’ll Build
A simple sales assistant that:- Remembers user context across conversations
- Detects patterns in user behavior
- Adapts its responses based on journey stage
Prerequisites
- Python 3.10+
- An OpenAI API key (or any LLM provider)
Installation
Step 1: Create Your First Mind
- Create a UserMind for
user_1(first interaction) - Create a ProjectMind for the default project
- Generate a context-aware response
- Update state after the interaction
Step 2: See How State Accumulates
- User has been interacting about this deal
- They’re in the “qualifying” or “proposing” stage
- They’re asking about follow-up timing
Step 3: Add Persistence
By default, state is stored in memory and lost when the program exits. Add SQLite for persistence:Step 4: Configure the LLM Provider
By default, sxth-mind uses OpenAI withgpt-4o-mini. To customize:
Step 5: Run the HTTP API
For production use, run sxth-mind as an API server:Step 6: Try Different Adapters
sxth-mind comes with three example adapters:Habits
Learning
Step 7: Build Your Own Adapter
Create an adapter for your domain:Next Steps
- Read the full API docs - See all available methods and options
- Explore the example adapters - Study how Sales, Habits, and Learning work
- Check out the nudge engine - Add proactive outreach
- Join the community - Share your adapters and get help
Common Patterns
Multi-Project Support
Track multiple contexts per user:Explain State for Debugging
Generate Nudges
Troubleshooting
”OpenAI package not installed"
"No module named ‘aiosqlite’"
"No response from LLM”
- Check your
OPENAI_API_KEYenvironment variable - Or pass the key explicitly:
OpenAIProvider(api_key="sk-...")
State not persisting
Make sure you’re using SQLiteStorage:Questions? Issues? Open a GitHub issue.

