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 (every form: an entity, a fact, a passage, a source, a whole
scope or one attribute) and document, over HTTP, plus delete_user (HTTP only), which deletes one end user's whole memory.
Over MCP the node serves the same seven memory tools to 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.1
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.1.tar.gz | 25.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| semurg-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.2 kB
Release files / semurg-0.1.1.tar.gz
| Download URL | semurg-0.1.1.tar.gz |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82cc852aa47e0d63da3394a98dbd4d198b200a01735767d86c793c02ea5827a9
|
|
BLAKE2b-256 checksum How to use checksums |
6fcf00bd42f3c965e1b51c34d2597e4f0ed6e827979cbd49b39fed668b62e9b7
|
| 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.1-py3-none-any.whl
| Download URL | semurg-0.1.1-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ce9c8889011c86c200ce77b3d489b07216fa89e9738b96e8c854cde06ae15b8
|
|
BLAKE2b-256 checksum How to use checksums |
de967b10bbe62f589762142ed62687ffbad66ecf767f94c75c2eee199f4496b5
|
| 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.1
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.