Skip to main content

SillyTavern bridge for Arkhon memory

Project description

Arkhon-Memory-ST

This is a drop-in SillyTavern memory bridge using arkhon_memory.**
Adds persistent memory with time-decay + reuse scoring to your character chats — lightweight, local-first, and extensible.

If you hit integration issues, open an issue or DM me i'll try to help — but i hope most of you will find this plug-and-play


Installation

pip install arkhon-memory-st

What This Does?

This bridge lets SillyTavern periodically:

  • Store important conversation events into long-term memory
  • Retrieve relevant past context using keyword + time-weighted scoring

Integration Guidance

  • Call store_memory(...) after every user or assistant message you want to remember.
  • Call retrieve_memory(...) before generating a new LLM reply, using the latest user message(s) as context.
  • Insert the retrieved snippets directly into the prompt context for best results.

This module does not manage timing or injection for you — it provides plug-and-play hooks for any LLM/chat tool to wire in as needed.


Usage example

from arkhon_st.sillytavern_bridge import store_memory, retrieve_memory

def main():
    character = "Alice"
    session = "session-xyz"
    store_memory(character, "You told me yesterday that you love hiking.", role="assistant", session_id=session)
    store_memory(character, "We discussed your favorite foods: pizza and ramen.", role="user", session_id=session)
    store_memory(character, "You wanted to visit the mountains next summer.", role="assistant", session_id=session)

    user_now = "What do you remember about my travel plans?"
    memories = retrieve_memory(character, user_now, n_results=2)
    print(f"Top memories for {character}:")
    for idx, mem in enumerate(memories, 1):
        print(f"{idx}. {mem}")

Project details


Download files

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

Source Distribution

arkhon_memory_st-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

arkhon_memory_st-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file arkhon_memory_st-0.1.1.tar.gz.

File metadata

  • Download URL: arkhon_memory_st-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for arkhon_memory_st-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4f7c0bec45e1ba5f2c4cb066f508eb928fa1c0a2c67ae45db9a15b5827d42c37
MD5 8fec8ba14281c12ffedb6609946b8fac
BLAKE2b-256 15fc77fa5a1646aba8ecd1197f22e18e61dc926f1da7f76e501ca13cd97d0069

See more details on using hashes here.

File details

Details for the file arkhon_memory_st-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for arkhon_memory_st-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ad6bcdc97718174e09e5502a91e07ccde686f7882578648ae36dccdd7d2925
MD5 65a26099790d3ae7cf4290abe7f81def
BLAKE2b-256 72c3e67cfc4aa03e0a68c9de4fff44f36c3845c1cc2b0604739ddfcff2a9fcca

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 Pingdom Monitoring Sentry Error logging StatusPage Status page