Skip to main content

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}")

Metadata

Release files for arkhon-memory-st 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arkhon-memory-st 0.1.1
File Size Uploaded
arkhon_memory_st-0.1.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arkhon-memory-st 0.1.1
File Interpreter ABI Platform
arkhon_memory_st-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / arkhon_memory_st-0.1.1.tar.gz

Download URL arkhon_memory_st-0.1.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4f7c0bec45e1ba5f2c4cb066f508eb928fa1c0a2c67ae45db9a15b5827d42c37
BLAKE2b-256 checksum
How to use checksums
15fc77fa5a1646aba8ecd1197f22e18e61dc926f1da7f76e501ca13cd97d0069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / arkhon_memory_st-0.1.1-py3-none-any.whl

Download URL arkhon_memory_st-0.1.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3ad6bcdc97718174e09e5502a91e07ccde686f7882578648ae36dccdd7d2925
BLAKE2b-256 checksum
How to use checksums
72c3e67cfc4aa03e0a68c9de4fff44f36c3845c1cc2b0604739ddfcff2a9fcca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page