Skip to main content

🧬 SoulAdapt

An adaptation & sincerity layer for AI companions. Companion to SoulMemory.

PyPI version Python License


🎯 Why SoulAdapt?

Most AI companions either invent memories or treat every user exactly the same. SoulAdapt fixes both:

  • 🎛️ Adapts how the AI talks: style, sensitive topics, interests
  • 💎 Never invents: calibrates honesty to the real memory signal
  • 🪶 Zero dependencies: pure Python standard library
  • 🤝 Compatible, not dependent: works with SoulMemory or any object with .recall()

✨ Features

Feature Description
observe() Learn something about the user
observations() What the companion learned, strongest first
forget_observation() Unlearn something
decide() How to respond: style, avoid-list, interests, honesty
SincerityEngine distance → confidence → assertive / hedged / admit

📦 Installation

pip install souladapt

🚀 Quick Start

Standalone (no memory connected)

from souladapt import SoulAdapt

adapt = SoulAdapt("adapt.db")

adapt.observe("Prefiere respuestas cortas", category="style")
adapt.observe("Ruptura con Ana", category="sensitive")

d = adapt.decide("hola")
# → {'style': ['Prefiere respuestas cortas'],
#    'avoid': ['Ruptura con Ana'], 'interests': [],
#    'memories': [], 'confidence': None, 'honesty': 'neutral'}

Connected to SoulMemory

from soulmemory import SoulMemory   # optional extra: pip install souladapt[soulmemory]
from souladapt import SoulAdapt

mem = SoulMemory("memory.db")
adapt = SoulAdapt("adapt.db", memory=mem)

d = adapt.decide("¿qué sabes de Ana?")
# → honesty calibrated from real recall distances

💎 The three honesty levels

confidence ≥ 0.75 → assertive   "You had coffee with Ana."
0.45 – 0.75       → hedged      "If I remember correctly: ..."
< 0.45            → admit       "I don't have a clear memory..."

The AI never invents: if the memory is weak, it admits it.

🤝 The contract (duck typing)

SoulAdapt never imports SoulMemory. Any object satisfies the contract if it has:

.recall(query, limit)  → list of dicts with "content" and "distance"

SoulMemory satisfies it out of the box. So does your own memory system.

️ Observation categories

style     → how to talk to the user ("short answers", "casual tone")
sensitive → topics to handle with care ("breakup with Ana")
interests → what they like ("cats", "gym")
general   → everything else

📚 API Reference

SoulAdapt(db_path="souladapt.db", memory=None)

Create an adapter. memory is any SoulMemory-like object (optional).

observe(content, category="general")

Register something learned about the user. Repeated observations get reinforced, not duplicated.

observations(category=None)

Get learned observations, strongest first.

forget_observation(observation_id)

Delete an observation: the companion unlearns it.

decide(query, limit=3)

Decide HOW the AI should respond. Returns style hints, topics to avoid, interests, evaluated memories, confidence and honesty level.

close()

Close the database connection.

🎬 Examples

python examples/demo_adapt.py   # standalone + connected to SoulMemory

🗺️ Roadmap

  • Observations (reinforcement learning-lite)
  • decide() adaptation layer
  • SincerityEngine (3 honesty levels)
  • Habit & routine detection
  • Tone presets (formal / casual / warm)

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments


Made with ❤️ as part of the Soul ecosystem

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

souladapt-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

souladapt-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file souladapt-0.1.0.tar.gz.

File metadata

  • Download URL: souladapt-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for souladapt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e3638d380376a9093f7c9239722e2eb8d383413b0df06d5015a3db160c91f9ed
MD5 bebc3865ee188fbd916cad3224de5eb4
BLAKE2b-256 66cf9e6cf5bc42d4bf9590646ade0cf0ffeb7481026a32bc5d225083ba9a66c7

See more details on using hashes here.

File details

Details for the file souladapt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: souladapt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for souladapt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5e845ec01d3790e0f3082d06f9a12a72a387d195f33cb387b193df11d0fa237
MD5 0b51181e1dd34495cd4ea8b5c0772374
BLAKE2b-256 e33c63299daba14cd5efdc7ebef5733a8f2a97586e2af4fd7f5494079c70b297

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page