Skip to main content

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.

Installation

pip install sxth-mind[openai]

Basic Usage

import asyncio
from sxth_mind import Mind
from examples.sales import SalesAdapter

async def main():
    # Create a Mind with an adapter
    mind = Mind(adapter=SalesAdapter())

    # Chat - state accumulates automatically
    response = await mind.chat("user_1", "Working on the Acme deal")
    print(response)

    # Inspect what the Mind knows
    state = await mind.get_state("user_1")
    print(state["user_mind"]["patterns"])

    # Human-readable summary
    print(await mind.explain_state("user_1"))

asyncio.run(main())

Try the CLI Demo

sxth-mind demo --adapter sales
This starts an interactive session where you can chat and see state accumulate.

Run the HTTP API

sxth-mind serve --adapter sales --port 8000
Then make requests:
curl -X POST http://localhost:8000/chat \
  -H "Content-Type: application/json" \
  -d '{"user_id": "user_1", "message": "Working on a new deal"}'

Next Steps

Core Concepts

Understand Mind, UserMind, and ProjectMind

Build an Adapter

Create adapters for your domain

Storage Options

Configure SQLite, PostgreSQL, or custom storage

Example Adapters

Explore Sales, Habits, and Learning adapters