Python SDK for Lore — coordination memory for multi-agent AI systems: create runs, write events, and fetch read-your-writes context packs.
Project description
loregpt
Python SDK for Lore — the open-source coordination memory layer for multi-agent AI systems. Create runs, write events, and fetch read-your-writes context packs.
🚧 Pre-release. Lore is building in the open toward
v0.1; this SDK tracks the live API.
Compatibility. SDK 0.1.x targets the Lore v1 API (server ≥ 0.0.1). The SDK and the server version
independently — match on the API version, not the release number.
Install
pip install loregpt
Requires Python 3.10+. One dependency, httpx, for connection pooling and a shared sync/async transport — the de-facto standard of the AI-Python ecosystem.
Usage
lore = LoreClient(api_key=api_key)
run = lore.create_run()
result = lore.write(
run_id=run.run_id,
agent_id="researcher",
content="Auth flow moved to v2 - PR #42 merged",
)
pack = lore.pack(
run_id=run.run_id,
query="current state of auth work",
scopes={"team": "platform"},
min_seq=result.seq,
token_budget=2000,
)
covered_seq = pack.covered_seq # >= result.seq once distilled; until then the write is in the raw tail
saved_tokens = pack.saved_tokens # a coarse estimate vs raw history; small packs may round to 0
write takes exactly one of content (a string, wrapped as {"content": ...}) or payload (an opaque
dict); write_state(run_id=..., agent_id=..., entity=..., predicate=..., value=...) writes one working-memory
fact seen immediately by a same-run reader.
Async
AsyncLoreClient has the same methods with await:
async with AsyncLoreClient(api_key=api_key) as lore:
run = await lore.create_run()
result = await lore.write(run_id=run.run_id, agent_id="researcher", content="hello")
pack = await lore.pack(run_id=run.run_id, query="state of work", min_seq=result.seq)
Errors
Every failure raises a LoreError. Server errors carry the machine code (discriminate on the class or
.code, never string-match) and .http_status; transport and parse failures are distinct classes. Requests
are not retried (a write is not idempotent) — a failure surfaces so the caller decides.
from loregpt import LoreError, NotFoundError
try:
pack = lore.pack(run_id=run_id, query="...", min_seq=999)
except NotFoundError:
... # unknown run, or not this key's project
except LoreError as err:
print(err.code) # e.g. "min_seq_out_of_range", "model_mismatch", "unauthorized", "connection"
LoreClient(api_key, *, base_url="http://localhost:8080", timeout=..., headers=..., transport=...) — pass a
custom httpx transport for a proxy, instrumentation, or tests.
- Website: https://loregpt.ai
- Source & RFCs: https://github.com/lore-gpt/lore
License: Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loregpt-0.1.2.tar.gz.
File metadata
- Download URL: loregpt-0.1.2.tar.gz
- Upload date:
- Size: 71.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
547a5feadb20886bb880e65d2677b63ed126d19f47b96bf947077d25c0d62102
|
|
| MD5 |
ec9f2b9c5085df0d7ae6c74f22f24fda
|
|
| BLAKE2b-256 |
4b51b85bf5475dd81346d27d7b5a38e54f070b378eb7aa883a0ace7be9ce3422
|
Provenance
The following attestation bundles were made for loregpt-0.1.2.tar.gz:
Publisher:
release-sdk.yml on lore-gpt/lore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loregpt-0.1.2.tar.gz -
Subject digest:
547a5feadb20886bb880e65d2677b63ed126d19f47b96bf947077d25c0d62102 - Sigstore transparency entry: 2315296071
- Sigstore integration time:
-
Permalink:
lore-gpt/lore@41a602a893c0397c580afa764e8755524b4d77e5 -
Branch / Tag:
refs/tags/sdk-v0.1.2 - Owner: https://github.com/lore-gpt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk.yml@41a602a893c0397c580afa764e8755524b4d77e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file loregpt-0.1.2-py3-none-any.whl.
File metadata
- Download URL: loregpt-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f9eb8690bcc4546676312cc01f64dcfcd4dd76dd838dda773e658c2dd5d33aa
|
|
| MD5 |
fffd59489b116b67c2cd612f5b482c97
|
|
| BLAKE2b-256 |
387822c0b2e8eb01e0378fcb3c6675f005de0e06d5efca9e989fdf86b67c2413
|
Provenance
The following attestation bundles were made for loregpt-0.1.2-py3-none-any.whl:
Publisher:
release-sdk.yml on lore-gpt/lore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loregpt-0.1.2-py3-none-any.whl -
Subject digest:
6f9eb8690bcc4546676312cc01f64dcfcd4dd76dd838dda773e658c2dd5d33aa - Sigstore transparency entry: 2315296267
- Sigstore integration time:
-
Permalink:
lore-gpt/lore@41a602a893c0397c580afa764e8755524b4d77e5 -
Branch / Tag:
refs/tags/sdk-v0.1.2 - Owner: https://github.com/lore-gpt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk.yml@41a602a893c0397c580afa764e8755524b4d77e5 -
Trigger Event:
push
-
Statement type: