memvine-sdk (Python)
pip install memvine-sdk
Memory for your agent in ten lines. With a project key and the sample data loaded
(POST /v1/sample, or Load sample data in the console):
import os
from memvine_sdk import Memvine
mv = Memvine(os.environ["MEMVINE_KEY"], base_url=os.environ.get("MEMVINE_URL", "https://api.memvine.dev"))
s = mv.session("demo-1", agent="my-agent", identity="you@example.com")
s.send("user", "Retries cap at 3: the broker rate-limits us above that.")
s.send("assistant", "Set MAX_RETRIES = 3 in src/queue.py.")
s.close() # tending turns the session into memory
r = mv.recall("When is the launch?") # answered from the sample data
print(r.briefing) # hand this to your model as background
for i in r.items: print(i["memory"]["statement"], f"(was: {i['previous']})" if i["previous"] else "")
What a memory is, the edges between memories, and how memory is tended and forgotten: How Memvine memory works.
Reference
mv = Memvine("mv_sk_...", base_url="https://api.memvine.dev")
mv.ingest([{"id": "chat-42:1", "content": "## user\nWe moved the launch to 12 Nov.", "timestamp": "2026-10-03T14:02:00Z"}])
mv.remember("Always answer in British English.", kind="preference") # a standing instruction
r = mv.recall("When is the launch?", budget=2000)
r.briefing # the text to hand your model; "" when recall abstains
r.abstained # True when nothing in memory is relevant enough to the question
r.standing # standing rules: returned on every recall, abstained or not
r.items # dicts with memory, score, previous (the value it superseded), conflicts
session = mv.session("run-17", agent="my-agent", identity="user-17")
session.send("user", "Let's use Postgres for the queue.")
session.send("assistant", "Postgres it is.")
print(session.brief()) # after compaction: this session's state, then relevant memory
session.close() # remaining turns become long-term memory
Correct a fact: remember("Launch is 19 Nov.", supersedes=id) replaces that memory directly
(no judge; relation "update"), keeping its kind, subjects, category, thread and audience unless given.
Also: memories(q=, status=, kind=), memory(id), retire(id) (forget one memory),
delete_source(episode_id) (a source and the memories drawn only from it), and on a
session state(), recall(query), send_many(events).
Edges: recall(query, include={"related": True}) gives each item related: [{kind, direction, id, statement}] (supersedes, contradicts, anchored, decided_in, extends, derived; at most
6), related(id) returns one memory with every edge in both directions, and
graph(since=, thread=, subject=, all=) returns a neighborhood of facts, threads, files and people with
their edges (at most 300 nodes; what grew since since is flagged; all=True includes every thread,
not only the open ones).
Errors raise MemvineError with .status and .code (for example project-cap-reached).
Cost: 1 credit per 1,000 characters sent (identical re-sends are free), 0.1 credit per recall.
Tests: pip install -e 'sdk/python[dev]', then pytest sdk/python. One test talks to a real server and is
skipped unless MEMVINE_TEST_URL and MEMVINE_TEST_KEY (a project key) are set.
Metadata
Release files for memvine-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| memvine_sdk-0.1.0.tar.gz | 8.7 kB | Without provenance | Details for memvine_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memvine_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for memvine_sdk-0.1.0-py3-none-any.whl |
Total release size: 16.6 kB
Release files / memvine_sdk-0.1.0.tar.gz
| Download URL | memvine_sdk-0.1.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1d791f6643ae9f0ceea1ae68c6b5091e09fcc1fc6adcbbf48e4542754845029
|
|
BLAKE2b-256 checksum How to use checksums |
4b4de7a5d71ab927e0bd856a427f22acf37df5d14eaea891e1ab12ba7b1b1c8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / memvine_sdk-0.1.0-py3-none-any.whl
| Download URL | memvine_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fabce9229281ab2521720a600f52ff3c2efc158874e7437ae9e048bd2dbeda0d
|
|
BLAKE2b-256 checksum How to use checksums |
d87caf127ad9e778d980897a658603628f0223182ced7354411e450b7bfa23a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for memvine-sdk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.