Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

xgre1/troth

14JavaScriptAGPL-3.0

Switch AI models freely, keep the same memory on your own machine

troth is an open-source tool that stores an AI partner's memory, identity, goals and refusal rules in a single SQLite file on your own computer instead of inside a vendor's account. Whether you use a Claude, ChatGPT or Kimi subscription, your own API key, or a fully local model, that file stays put, so switching models doesn't mean re-explaining your context. The README demonstrates this by having a conversation with Claude on Monday get recalled correctly by Kimi on Thursday, from a fresh terminal.

What it does

  1. Decisions, goals and relationship context from your conversations are kept in one local file (~/.troth/state.db) that you own, not in any vendor's account
  2. Dangerous commands like rm -rf are refused by a state check before the model is even asked, rather than after the fact
  3. Web research runs through troth's own separate browser profile, and jobs needing a login get credentials attached by the system without the model ever seeing the actual secret value
  4. On a 20-question slice of LongMemEval, it scored 85% (17 of 20) under its own judge, though the authors note the confidence interval is roughly ±20 points at that sample size
  5. The substrate can sync across multiple devices, and a signed audit trail records what was remembered and what was forgotten

Why it matters

For anyone juggling multiple AI subscriptions or models, this removes the friction of re-explaining project context every time you switch. It's also notable for keeping personal data on your own disk rather than a company's servers, which matters for privacy and data ownership.

Terms in this repo

  • SQLite · A lightweight database that runs as a single file with no separate server
  • engine · The term the project uses for the underlying AI model doing the actual talking (Claude, ChatGPT, Kimi, etc.)
  • MCP · A protocol that lets an AI connect to external tools or servers to take actions
  • AGPL · An open-source license that requires sharing source code even when the software is run as a network service

Repository description (English)

An AI partner whose memory lives on your machine, not in a vendor account. Swap the model, keep the mind.

Open on GitHub

Trending repos

All repos →

Latest from METAL MEDIA