semurg
The Python client for Semurg: memory for AI agents (a knowledge graph and vector search in one engine) that runs on your own hardware. Zero dependencies: it uses only the standard library.
1. Start a node
With Docker on an Intel or AMD x86_64 machine (Linux, or Windows with Docker Desktop or WSL2):
docker run -d --name semurg -p 127.0.0.1:4000:4000 \
--ulimit memlock=-1 --ulimit nofile=1048576:1048576 --security-opt seccomp=unconfined \
-v semurg-data:/var/lib/semurg one.semurg.io/semurg
until docker logs semurg 2>&1 | grep -q 'Your API token'; do sleep 1; done
export SEMURG_API_TOKEN=$(docker exec semurg cat /var/lib/semurg/.api_token)
Or install a node on Ubuntu 24.04: curl -fsSL https://one.semurg.io/install | sudo bash (what it needs).
The first node is free.
2. Install
pip install semurg
3. Remember and recall
import os
from semurg import Client
with Client("http://127.0.0.1:4000", token=os.environ["SEMURG_API_TOKEN"]) as mem:
mem.remember(scope="demo", content="Ada Lovelace works at Acme on the analytics team.")
print(mem.recall(scope="demo", subject="Ada Lovelace")) # what is stored about one entity, with its source
print(mem.context(scope="demo", query="Where does Ada work?")) # passages and facts for a question
A scope is a separate, named memory. Send user_id to keep each of your end users' memories apart.
Your agent can also send the entities and relations it found, so they are stored as a graph at once:
mem.remember(
scope="demo",
facts={"entities": [{"name": "Acme", "type": "Company"}, {"name": "Dana", "type": "Person"}],
"relations": [{"source": "Dana", "target": "Acme", "type": "WORKS_AT"}]},
passages=[{"text": "Dana works at Acme.", "mentions": ["Dana", "Acme"]}],
)
The memory calls
memory_status, remember, recall, context, relate, forget and delete_user, over HTTP. The same seven tools are served
over MCP for agent frameworks: see one.semurg.io/agents.
Links
- Developer guide: https://one.semurg.io/develop
- Agent frameworks and MCP: https://one.semurg.io/agents
- Benchmarks: https://one.semurg.io/benchmark
Licence: Apache-2.0 (this client). The Semurg engine is licensed separately; the first node is free.
Metadata
Release files for semurg 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 | |
|---|---|---|---|---|
| semurg-0.1.0.tar.gz | 25.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| semurg-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.9 kB
Release files / semurg-0.1.0.tar.gz
| Download URL | semurg-0.1.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df5953b0b45489e161c65dc21fb462885aaba3ef2b045691637ce3544d5ee185
|
|
BLAKE2b-256 checksum How to use checksums |
9554cfefa8453f14a3e1e2ddcb2ee3463b140851494216386fdb5f5715532239
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / semurg-0.1.0-py3-none-any.whl
| Download URL | semurg-0.1.0-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b329c45db3f5970ec5e62e3cce7dd2a87d5fd24c24d80269c91c1efa1aa5a1f6
|
|
BLAKE2b-256 checksum How to use checksums |
985c8d7d8881f81ed72c0e8672bf71bee61c3a90c8898a755f038a51385549eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for semurg 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.