← Docs index

Developer Experience

Install, open, write memory.

TriviumDB is embedded, so local development starts with a package and a database file instead of a service cluster.

pip install triviumdb npm install triviumdb cargo add triviumdb
import triviumdb

with triviumdb.TriviumDB("agent-memory.tdb", dim=3) as db:
    alice = db.insert([0.12, -0.45, 0.78], {
        "type": "memory",
        "text": "Alice works on embedded databases",
    })

    cafe = db.insert([0.08, -0.52, 0.81], {
        "type": "place",
        "name": "Blue Bottle",
    })

    db.link(alice, cafe, label="visited", weight=0.8)
    context = db.search([0.10, -0.48, 0.80], top_k=5, expand_depth=2)
    print(context)