AbstractMemory 0.2.3__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- abstractmemory-0.2.5/.github/ISSUE_TEMPLATE/bug_report.yml +73 -0
- abstractmemory-0.2.5/.github/workflows/ci.yml +48 -0
- abstractmemory-0.2.5/.github/workflows/release.yml +179 -0
- abstractmemory-0.2.5/.gitignore +10 -0
- abstractmemory-0.2.5/ACKNOWLEDGMENTS.md +15 -0
- abstractmemory-0.2.5/CHANGELOG.md +62 -0
- abstractmemory-0.2.5/CONTRIBUTING.md +61 -0
- {abstractmemory-0.2.3 → abstractmemory-0.2.5}/LICENSE +1 -4
- abstractmemory-0.2.5/PKG-INFO +154 -0
- abstractmemory-0.2.5/README.md +119 -0
- abstractmemory-0.2.5/SECURITY.md +29 -0
- abstractmemory-0.2.5/docs/README.md +21 -0
- abstractmemory-0.2.5/docs/api.md +112 -0
- abstractmemory-0.2.5/docs/architecture.md +182 -0
- abstractmemory-0.2.5/docs/backlog/overview.md +102 -0
- abstractmemory-0.2.5/docs/backlog/planned/001_semantics_aligned_memory_record_conventions.md +220 -0
- abstractmemory-0.2.5/docs/backlog/planned/002_sqlite_database_compatibility_and_store_capabilities.md +202 -0
- abstractmemory-0.2.5/docs/backlog/planned/003_bounded_graph_traversal_over_triples.md +210 -0
- abstractmemory-0.2.5/docs/backlog/planned/004_recall_trace_and_access_events_contract.md +195 -0
- abstractmemory-0.2.5/docs/backlog/planned/005_source_linked_summaries_and_derived_assertion_lineage.md +180 -0
- abstractmemory-0.2.5/docs/backlog/planned/006_deterministic_anchor_and_facet_index.md +193 -0
- abstractmemory-0.2.5/docs/backlog/planned/007_read_only_memory_observer_contract.md +169 -0
- abstractmemory-0.2.5/docs/backlog/proposed/2026-05-08_gateway_memory_install_and_config_boundary.md +169 -0
- abstractmemory-0.2.5/docs/development.md +31 -0
- abstractmemory-0.2.5/docs/faq.md +176 -0
- abstractmemory-0.2.5/docs/getting-started.md +166 -0
- abstractmemory-0.2.5/docs/stores.md +110 -0
- abstractmemory-0.2.5/llms-full.txt +257 -0
- abstractmemory-0.2.5/llms.txt +59 -0
- abstractmemory-0.2.5/pyproject.toml +65 -0
- abstractmemory-0.2.5/release-notes.md +8 -0
- abstractmemory-0.2.5/src/abstractmemory/__init__.py +17 -0
- abstractmemory-0.2.5/src/abstractmemory/embeddings.py +96 -0
- abstractmemory-0.2.5/src/abstractmemory/in_memory_store.py +186 -0
- abstractmemory-0.2.5/src/abstractmemory/lancedb_store.py +285 -0
- abstractmemory-0.2.5/src/abstractmemory/models.py +133 -0
- abstractmemory-0.2.5/src/abstractmemory/sqlite_store.py +217 -0
- abstractmemory-0.2.5/src/abstractmemory/store.py +90 -0
- abstractmemory-0.2.5/tests/conftest.py +28 -0
- abstractmemory-0.2.5/tests/test_in_memory_query_text_fallback.py +20 -0
- abstractmemory-0.2.5/tests/test_lancedb_triple_store.py +183 -0
- abstractmemory-0.2.5/tests/test_sqlite_triple_store.py +82 -0
- abstractmemory-0.2.5/tests/test_term_canonicalization.py +35 -0
- abstractmemory-0.2.5/tests/test_triple_store_limits.py +147 -0
- abstractmemory-0.2.3/AbstractMemory.egg-info/PKG-INFO +0 -481
- abstractmemory-0.2.3/AbstractMemory.egg-info/SOURCES.txt +0 -27
- abstractmemory-0.2.3/AbstractMemory.egg-info/dependency_links.txt +0 -1
- abstractmemory-0.2.3/AbstractMemory.egg-info/requires.txt +0 -22
- abstractmemory-0.2.3/AbstractMemory.egg-info/top_level.txt +0 -1
- abstractmemory-0.2.3/PKG-INFO +0 -481
- abstractmemory-0.2.3/README.md +0 -436
- abstractmemory-0.2.3/abstractmemory/__init__.py +0 -799
- abstractmemory-0.2.3/abstractmemory/cognitive/__init__.py +0 -1
- abstractmemory-0.2.3/abstractmemory/components/__init__.py +0 -1
- abstractmemory-0.2.3/abstractmemory/components/core.py +0 -112
- abstractmemory-0.2.3/abstractmemory/components/episodic.py +0 -68
- abstractmemory-0.2.3/abstractmemory/components/semantic.py +0 -102
- abstractmemory-0.2.3/abstractmemory/components/working.py +0 -50
- abstractmemory-0.2.3/abstractmemory/core/__init__.py +0 -1
- abstractmemory-0.2.3/abstractmemory/core/interfaces.py +0 -95
- abstractmemory-0.2.3/abstractmemory/core/temporal.py +0 -100
- abstractmemory-0.2.3/abstractmemory/embeddings/__init__.py +0 -354
- abstractmemory-0.2.3/abstractmemory/embeddings/sentence_transformer_provider.py +0 -159
- abstractmemory-0.2.3/abstractmemory/graph/__init__.py +0 -1
- abstractmemory-0.2.3/abstractmemory/graph/knowledge_graph.py +0 -178
- abstractmemory-0.2.3/abstractmemory/simple.py +0 -151
- abstractmemory-0.2.3/abstractmemory/storage/__init__.py +0 -16
- abstractmemory-0.2.3/abstractmemory/storage/dual_manager.py +0 -269
- abstractmemory-0.2.3/abstractmemory/storage/lancedb_storage.py +0 -544
- abstractmemory-0.2.3/abstractmemory/storage/markdown_storage.py +0 -447
- abstractmemory-0.2.3/pyproject.toml +0 -54
- abstractmemory-0.2.3/setup.cfg +0 -4
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a reproducible AbstractMemory bug
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for reporting a bug. Include enough detail to reproduce the store, query, embedding, or packaging behavior.
|
|
10
|
+
- type: input
|
|
11
|
+
id: version
|
|
12
|
+
attributes:
|
|
13
|
+
label: AbstractMemory version
|
|
14
|
+
description: Output of `python -c "from importlib.metadata import version; print(version('AbstractMemory'))"`
|
|
15
|
+
placeholder: "0.2.5"
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: dropdown
|
|
19
|
+
id: area
|
|
20
|
+
attributes:
|
|
21
|
+
label: Store or area
|
|
22
|
+
options:
|
|
23
|
+
- in-memory store
|
|
24
|
+
- sqlite store
|
|
25
|
+
- lancedb store
|
|
26
|
+
- embeddings
|
|
27
|
+
- query/model contract
|
|
28
|
+
- packaging/install
|
|
29
|
+
- documentation
|
|
30
|
+
- other
|
|
31
|
+
validations:
|
|
32
|
+
required: true
|
|
33
|
+
- type: textarea
|
|
34
|
+
id: observed
|
|
35
|
+
attributes:
|
|
36
|
+
label: What happened?
|
|
37
|
+
description: Describe the incorrect behavior, including exact errors or unexpected query results.
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
- type: textarea
|
|
41
|
+
id: expected
|
|
42
|
+
attributes:
|
|
43
|
+
label: What did you expect?
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
- type: textarea
|
|
47
|
+
id: reproduce
|
|
48
|
+
attributes:
|
|
49
|
+
label: Reproduction steps
|
|
50
|
+
description: Include commands, Python snippets, store backend, query inputs, and installed extras.
|
|
51
|
+
placeholder: |
|
|
52
|
+
1. Create a SQLiteTripleStore with ...
|
|
53
|
+
2. Add assertions ...
|
|
54
|
+
3. Query with ...
|
|
55
|
+
validations:
|
|
56
|
+
required: true
|
|
57
|
+
- type: textarea
|
|
58
|
+
id: environment
|
|
59
|
+
attributes:
|
|
60
|
+
label: Environment
|
|
61
|
+
description: OS, Python version, installed extras, backend, and relevant package versions.
|
|
62
|
+
placeholder: |
|
|
63
|
+
macOS 15, Python 3.12
|
|
64
|
+
pip install "AbstractMemory[all-apple]"
|
|
65
|
+
validations:
|
|
66
|
+
required: true
|
|
67
|
+
- type: textarea
|
|
68
|
+
id: artifacts
|
|
69
|
+
attributes:
|
|
70
|
+
label: Logs or artifacts
|
|
71
|
+
description: Attach logs, store schema details, query payloads, or related files.
|
|
72
|
+
validations:
|
|
73
|
+
required: false
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
cache: pip
|
|
28
|
+
- name: Install
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install -U pip
|
|
31
|
+
python -m pip install -e ".[test]"
|
|
32
|
+
- name: Pytest
|
|
33
|
+
run: python -m pytest -q -m "not integration"
|
|
34
|
+
|
|
35
|
+
build:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
- uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.12"
|
|
42
|
+
cache: pip
|
|
43
|
+
- name: Build
|
|
44
|
+
run: |
|
|
45
|
+
python -m pip install -U pip
|
|
46
|
+
python -m pip install build twine
|
|
47
|
+
python -m build
|
|
48
|
+
python -m twine check dist/*
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
version:
|
|
10
|
+
description: "Release version, with or without the leading v (example: 0.2.5)"
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: release-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
test:
|
|
23
|
+
name: Test Python ${{ matrix.python-version }}
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
strategy:
|
|
26
|
+
fail-fast: false
|
|
27
|
+
matrix:
|
|
28
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python-version }}
|
|
34
|
+
cache: pip
|
|
35
|
+
- name: Install
|
|
36
|
+
run: |
|
|
37
|
+
python -m pip install -U pip
|
|
38
|
+
python -m pip install -e ".[test]"
|
|
39
|
+
- name: Pytest
|
|
40
|
+
run: python -m pytest -q -m "not integration"
|
|
41
|
+
|
|
42
|
+
build:
|
|
43
|
+
name: Build distributions
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
needs: [test]
|
|
46
|
+
outputs:
|
|
47
|
+
version: ${{ steps.release-meta.outputs.version }}
|
|
48
|
+
tag: ${{ steps.release-meta.outputs.tag }}
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
- uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.12"
|
|
54
|
+
cache: pip
|
|
55
|
+
- name: Install build tools
|
|
56
|
+
run: |
|
|
57
|
+
python -m pip install -U pip
|
|
58
|
+
python -m pip install build twine
|
|
59
|
+
- name: Validate tag, version, and changelog
|
|
60
|
+
id: release-meta
|
|
61
|
+
env:
|
|
62
|
+
RELEASE_INPUT_VERSION: ${{ github.event.inputs.version || '' }}
|
|
63
|
+
run: |
|
|
64
|
+
python - <<'PY'
|
|
65
|
+
import os
|
|
66
|
+
import re
|
|
67
|
+
import tomllib
|
|
68
|
+
from pathlib import Path
|
|
69
|
+
|
|
70
|
+
version_input = os.environ.get("RELEASE_INPUT_VERSION", "").strip()
|
|
71
|
+
ref_name = os.environ["GITHUB_REF_NAME"].strip()
|
|
72
|
+
raw_version = version_input or ref_name
|
|
73
|
+
version = raw_version[1:] if raw_version.startswith("v") else raw_version
|
|
74
|
+
if not re.fullmatch(r"\d+\.\d+\.\d+(?:[a-zA-Z0-9.-]+)?", version):
|
|
75
|
+
raise SystemExit(f"Invalid release version: {raw_version!r}")
|
|
76
|
+
tag = f"v{version}"
|
|
77
|
+
|
|
78
|
+
project = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))["project"]
|
|
79
|
+
package_version = project["version"]
|
|
80
|
+
if version != package_version:
|
|
81
|
+
raise SystemExit(
|
|
82
|
+
f"Tag version {version!r} does not match package version {package_version!r}"
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
changelog = Path("CHANGELOG.md").read_text(encoding="utf-8")
|
|
86
|
+
header = re.search(rf"^## \[?{re.escape(version)}\]? - .+$", changelog, re.MULTILINE)
|
|
87
|
+
if not header:
|
|
88
|
+
raise SystemExit(f"CHANGELOG.md has no entry for {version}")
|
|
89
|
+
|
|
90
|
+
rest = changelog[header.end():]
|
|
91
|
+
next_header = re.search(r"^## ", rest, re.MULTILINE)
|
|
92
|
+
notes = rest[: next_header.start() if next_header else len(rest)].strip()
|
|
93
|
+
if not notes:
|
|
94
|
+
raise SystemExit(f"CHANGELOG.md entry for {version} is empty")
|
|
95
|
+
|
|
96
|
+
Path("release-notes.md").write_text(notes + "\n", encoding="utf-8")
|
|
97
|
+
github_output = Path(os.environ["GITHUB_OUTPUT"])
|
|
98
|
+
with github_output.open("a", encoding="utf-8") as fh:
|
|
99
|
+
print(f"version={version}", file=fh)
|
|
100
|
+
print(f"tag={tag}", file=fh)
|
|
101
|
+
PY
|
|
102
|
+
- name: Build
|
|
103
|
+
run: python -m build
|
|
104
|
+
- name: Check distributions
|
|
105
|
+
run: python -m twine check dist/*
|
|
106
|
+
- uses: actions/upload-artifact@v4
|
|
107
|
+
with:
|
|
108
|
+
name: release-dist
|
|
109
|
+
path: dist/*
|
|
110
|
+
- uses: actions/upload-artifact@v4
|
|
111
|
+
with:
|
|
112
|
+
name: release-notes
|
|
113
|
+
path: release-notes.md
|
|
114
|
+
|
|
115
|
+
ensure-tag:
|
|
116
|
+
name: Ensure release tag
|
|
117
|
+
runs-on: ubuntu-latest
|
|
118
|
+
needs: build
|
|
119
|
+
permissions:
|
|
120
|
+
contents: write
|
|
121
|
+
steps:
|
|
122
|
+
- uses: actions/checkout@v4
|
|
123
|
+
with:
|
|
124
|
+
fetch-depth: 0
|
|
125
|
+
- name: Create annotated tag for manual releases
|
|
126
|
+
if: github.event_name == 'workflow_dispatch'
|
|
127
|
+
run: |
|
|
128
|
+
tag="${{ needs.build.outputs.tag }}"
|
|
129
|
+
if git ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1; then
|
|
130
|
+
echo "Tag ${tag} already exists on origin."
|
|
131
|
+
exit 1
|
|
132
|
+
fi
|
|
133
|
+
git config user.name "github-actions[bot]"
|
|
134
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
135
|
+
git tag -a "${tag}" -m "AbstractMemory ${tag}"
|
|
136
|
+
git push origin "${tag}"
|
|
137
|
+
- name: Tag already supplied by push trigger
|
|
138
|
+
if: github.event_name != 'workflow_dispatch'
|
|
139
|
+
run: echo "Using existing tag ${{ needs.build.outputs.tag }}"
|
|
140
|
+
|
|
141
|
+
publish-pypi:
|
|
142
|
+
name: Publish to PyPI
|
|
143
|
+
runs-on: ubuntu-latest
|
|
144
|
+
needs: [build, ensure-tag]
|
|
145
|
+
environment:
|
|
146
|
+
name: pypi
|
|
147
|
+
url: https://pypi.org/project/abstractmemory/
|
|
148
|
+
permissions:
|
|
149
|
+
contents: read
|
|
150
|
+
id-token: write
|
|
151
|
+
steps:
|
|
152
|
+
- uses: actions/download-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: release-dist
|
|
155
|
+
path: dist
|
|
156
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
157
|
+
|
|
158
|
+
github-release:
|
|
159
|
+
name: Create GitHub Release
|
|
160
|
+
runs-on: ubuntu-latest
|
|
161
|
+
needs: [build, ensure-tag, publish-pypi]
|
|
162
|
+
permissions:
|
|
163
|
+
contents: write
|
|
164
|
+
steps:
|
|
165
|
+
- uses: actions/download-artifact@v4
|
|
166
|
+
with:
|
|
167
|
+
name: release-dist
|
|
168
|
+
path: dist
|
|
169
|
+
- uses: actions/download-artifact@v4
|
|
170
|
+
with:
|
|
171
|
+
name: release-notes
|
|
172
|
+
path: .
|
|
173
|
+
- uses: softprops/action-gh-release@v2
|
|
174
|
+
with:
|
|
175
|
+
tag_name: ${{ needs.build.outputs.tag }}
|
|
176
|
+
name: AbstractMemory ${{ needs.build.outputs.tag }}
|
|
177
|
+
body_path: release-notes.md
|
|
178
|
+
files: dist/*
|
|
179
|
+
fail_on_unmatched_files: true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Acknowledgments
|
|
2
|
+
|
|
3
|
+
AbstractMemory builds on a number of great open-source tools and ideas.
|
|
4
|
+
|
|
5
|
+
## Libraries
|
|
6
|
+
|
|
7
|
+
- **LanceDB** (`lancedb`) — optional persistent/vector backend used by `LanceDBTripleStore` (see `.[lancedb]` extra in `pyproject.toml`).
|
|
8
|
+
- **pytest** (`pytest`) — development and contract tests (see `.[dev]` extra in `pyproject.toml`).
|
|
9
|
+
- **Hatchling** (`hatchling`) — packaging/build backend (see `[build-system]` in `pyproject.toml`).
|
|
10
|
+
|
|
11
|
+
## Ecosystem
|
|
12
|
+
|
|
13
|
+
- The broader **AbstractFramework** project for shaping the boundaries between runtime provenance, model execution, and memory storage.
|
|
14
|
+
|
|
15
|
+
If we missed a credit, please open a small PR to update this file.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this package will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (pre-1.0).
|
|
7
|
+
|
|
8
|
+
## Unreleased
|
|
9
|
+
|
|
10
|
+
*No unreleased changes.*
|
|
11
|
+
|
|
12
|
+
## [0.2.5] - 2026-05-08
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- Added GitHub Actions CI for Python 3.10 through 3.12 with pytest and package
|
|
16
|
+
build checks.
|
|
17
|
+
- Added a trusted-publishing release workflow for tagged or manually dispatched
|
|
18
|
+
releases, including version/changelog validation, distribution artifacts,
|
|
19
|
+
PyPI publication, and GitHub Release creation.
|
|
20
|
+
- Added an AbstractMemory GitHub bug report template.
|
|
21
|
+
- Added a `test` optional dependency extra for CI and release validation.
|
|
22
|
+
|
|
23
|
+
## 0.2.4 - 2026-05-08
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Added install-profile compatibility extras:
|
|
27
|
+
`AbstractMemory[apple]`, `AbstractMemory[gpu]`,
|
|
28
|
+
`AbstractMemory[all-apple]`, and `AbstractMemory[all-gpu]`.
|
|
29
|
+
- Planned backlog overview and standalone items for semantics-aligned memory records, SQLite compatibility/store capabilities, bounded graph traversal, recall traces, lineage, deterministic anchors, and read-only observer contracts.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
- `AbstractMemory[all-apple]` and `AbstractMemory[all-gpu]` now install the
|
|
33
|
+
LanceDB-backed vector-capable store dependency, matching the existing
|
|
34
|
+
`lancedb`/`all` profile behavior.
|
|
35
|
+
- `AbstractMemory[apple]` and `AbstractMemory[gpu]` remain no-op aliases
|
|
36
|
+
because Memory itself has no hardware-specific runtime engine.
|
|
37
|
+
- Docs: clarify AbstractFramework ecosystem positioning, update PyPI install wording, and add a gateway-managed embeddings example.
|
|
38
|
+
- Docs: align README/API/store/FAQ/agent context with the exported `SQLiteTripleStore` and clarify semantic-query support by backend.
|
|
39
|
+
- Docs: document current release-channel drift between this source tree, PyPI, and remote tags.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
- Test configuration now declares the local `basic` marker.
|
|
43
|
+
- `LanceDBTripleStore` avoids the deprecated LanceDB `table_names()` API when `list_tables()` is available.
|
|
44
|
+
|
|
45
|
+
## 0.0.2 - 2026-02-04
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
- User-facing documentation set with getting started, API, stores, architecture diagram, and FAQ.
|
|
49
|
+
- Agent-oriented context files: `llms.txt` and `llms-full.txt`.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
- `LanceDBTripleStore` non-semantic queries now apply `order` by `observed_at` before applying `limit` (deterministic behavior aligned with `InMemoryTripleStore`).
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
- Ordering/limit interaction for non-semantic queries in `LanceDBTripleStore` (covered by new tests).
|
|
56
|
+
|
|
57
|
+
## 0.0.1 - 2026-01-12
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
- `TripleAssertion` and `TripleQuery` data models.
|
|
61
|
+
- `InMemoryTripleStore` (dependency-free) and `LanceDBTripleStore` (optional).
|
|
62
|
+
- `AbstractGatewayTextEmbedder` adapter for gateway-managed embeddings.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in improving AbstractMemory.
|
|
4
|
+
|
|
5
|
+
This repository uses a `src/` layout and keeps the public API intentionally small.
|
|
6
|
+
|
|
7
|
+
AbstractMemory is part of the **AbstractFramework** ecosystem (see [`README.md`](README.md) and [`docs/architecture.md`](docs/architecture.md)).
|
|
8
|
+
|
|
9
|
+
## Development setup
|
|
10
|
+
|
|
11
|
+
Requirements:
|
|
12
|
+
- Python 3.10+ (see `pyproject.toml`)
|
|
13
|
+
|
|
14
|
+
Install (editable):
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
python -m pip install -e ".[dev]"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Optional (LanceDB backend + tests):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
python -m pip install -e ".[lancedb]"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
More details: [`docs/development.md`](docs/development.md).
|
|
27
|
+
|
|
28
|
+
## Run tests
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
python -m pytest -q
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## What to contribute
|
|
35
|
+
|
|
36
|
+
Good first contributions:
|
|
37
|
+
- Improve docs (keep statements evidence-based and link to code/tests).
|
|
38
|
+
- Add tests for edge cases and contracts.
|
|
39
|
+
- Make error messages more actionable.
|
|
40
|
+
- Add small, well-scoped features that keep the v0 API minimal.
|
|
41
|
+
|
|
42
|
+
## Contribution guidelines
|
|
43
|
+
|
|
44
|
+
- Keep changes focused; avoid drive-by refactors.
|
|
45
|
+
- Add tests for behavior changes (especially store/query semantics).
|
|
46
|
+
- Update docs when you change public behavior:
|
|
47
|
+
- `README.md` and `docs/getting-started.md` for user-facing usage
|
|
48
|
+
- `docs/api.md` for public API contracts
|
|
49
|
+
- `docs/architecture.md` when boundaries/diagrams change
|
|
50
|
+
- `CHANGELOG.md` for notable changes
|
|
51
|
+
- If you add a new dependency, keep it optional unless strictly required.
|
|
52
|
+
|
|
53
|
+
## PR checklist
|
|
54
|
+
|
|
55
|
+
- `python -m pytest -q` passes locally
|
|
56
|
+
- Docs stay evidence-based (link to code/tests for contracts)
|
|
57
|
+
- Public API changes are reflected in `src/abstractmemory/__init__.py` and `docs/api.md`
|
|
58
|
+
|
|
59
|
+
## Security issues
|
|
60
|
+
|
|
61
|
+
Please do not open public issues for vulnerabilities. See [`SECURITY.md`](SECURITY.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024 Laurent-Philippe Albou
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,6 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: AbstractMemory
|
|
3
|
+
Version: 0.2.5
|
|
4
|
+
Summary: AbstractMemory: temporal, provenance-aware semantic memory primitives for AbstractFramework.
|
|
5
|
+
Project-URL: AbstractFramework (monorepo), https://github.com/lpalbou/abstractframework
|
|
6
|
+
Author: Laurent-Philippe Albou
|
|
7
|
+
License: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Keywords: agents,knowledge-graph,memory,temporal,triples
|
|
10
|
+
Classifier: Development Status :: 1 - Planning
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Provides-Extra: all
|
|
21
|
+
Requires-Dist: lancedb; extra == 'all'
|
|
22
|
+
Provides-Extra: all-apple
|
|
23
|
+
Requires-Dist: lancedb; extra == 'all-apple'
|
|
24
|
+
Provides-Extra: all-gpu
|
|
25
|
+
Requires-Dist: lancedb; extra == 'all-gpu'
|
|
26
|
+
Provides-Extra: apple
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
29
|
+
Provides-Extra: gpu
|
|
30
|
+
Provides-Extra: lancedb
|
|
31
|
+
Requires-Dist: lancedb; extra == 'lancedb'
|
|
32
|
+
Provides-Extra: test
|
|
33
|
+
Requires-Dist: pytest>=7.0.0; extra == 'test'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# AbstractMemory (early / pre-1.0)
|
|
37
|
+
|
|
38
|
+
AbstractMemory is a small Python library for **append-only, temporal, provenance-aware triple assertions** with **deterministic structured queries** and optional **vector/semantic retrieval**.
|
|
39
|
+
|
|
40
|
+
## Status
|
|
41
|
+
- This package is early (pre-1.0): the API is intentionally small, and details may evolve.
|
|
42
|
+
- Current repo version: `0.2.4` (see [`pyproject.toml`](pyproject.toml)).
|
|
43
|
+
- Implemented today (public API): `TripleAssertion`, `TripleQuery`, `TripleStore`, `InMemoryTripleStore`, `SQLiteTripleStore`, `LanceDBTripleStore`, `TextEmbedder`, `AbstractGatewayTextEmbedder`.
|
|
44
|
+
- Source of truth for exports: [`src/abstractmemory/__init__.py`](src/abstractmemory/__init__.py)
|
|
45
|
+
- Requires Python 3.10+ (see [`pyproject.toml`](pyproject.toml))
|
|
46
|
+
- Release-channel note: this checkout is the source of truth for this documentation. As of 2026-05-05, PyPI's `AbstractMemory 0.2.3` has a different source layout from this repository and `origin` only has tags through `v0.2.2`; treat that mismatch as release drift until a maintainer republishes/tags from this repo.
|
|
47
|
+
|
|
48
|
+
## Ecosystem (AbstractFramework)
|
|
49
|
+
|
|
50
|
+
AbstractMemory is part of the **AbstractFramework** ecosystem:
|
|
51
|
+
- It stores and retrieves durable “memory” as append-only triples (this package).
|
|
52
|
+
- It can *optionally* call an **AbstractGateway** embeddings endpoint for semantic retrieval via `AbstractGatewayTextEmbedder` (no direct AbstractCore/AbstractRuntime dependency).
|
|
53
|
+
|
|
54
|
+
Evidence:
|
|
55
|
+
- No direct dependency on AbstractCore/AbstractRuntime: [`pyproject.toml`](pyproject.toml)
|
|
56
|
+
- Gateway adapter implementation: [`src/abstractmemory/embeddings.py`](src/abstractmemory/embeddings.py)
|
|
57
|
+
|
|
58
|
+
```mermaid
|
|
59
|
+
flowchart LR
|
|
60
|
+
APP["Your app or agent"] --> AM["AbstractMemory"]
|
|
61
|
+
AM --> IM["InMemoryTripleStore"]
|
|
62
|
+
AM --> SQL["SQLiteTripleStore"]
|
|
63
|
+
AM --> LDB["LanceDBTripleStore"]
|
|
64
|
+
SQL --> SQLITE[("SQLite file")]
|
|
65
|
+
LDB --> DISK[("LanceDB on disk")]
|
|
66
|
+
|
|
67
|
+
AM -- "optional embeddings" --> GW["AbstractGateway"]
|
|
68
|
+
GW --> AR["AbstractRuntime"]
|
|
69
|
+
GW --> AC["AbstractCore"]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Related projects:
|
|
73
|
+
- AbstractFramework: `https://github.com/lpalbou/AbstractFramework`
|
|
74
|
+
- AbstractCore: `https://github.com/lpalbou/abstractcore`
|
|
75
|
+
- AbstractRuntime: `https://github.com/lpalbou/abstractruntime`
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
|
|
79
|
+
From source (recommended inside the AbstractFramework monorepo):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python -m pip install -e .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Optional persistent backend + vector search:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python -m pip install -e ".[lancedb]"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
PyPI (packaged release):
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
python -m pip install AbstractMemory
|
|
95
|
+
python -m pip install "AbstractMemory[lancedb]"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Framework hardware profile aliases are also available:
|
|
99
|
+
`AbstractMemory[apple]` and `AbstractMemory[gpu]` are no-op compatibility
|
|
100
|
+
extras; `AbstractMemory[all-apple]` and `AbstractMemory[all-gpu]` install the
|
|
101
|
+
LanceDB backend for durable vector-capable recall.
|
|
102
|
+
|
|
103
|
+
Notes:
|
|
104
|
+
- The distribution name is `AbstractMemory` (pip is case-insensitive). The import name is `abstractmemory`.
|
|
105
|
+
- PyPI releases may not match this repository checkout exactly; see the release-channel note above.
|
|
106
|
+
|
|
107
|
+
## Quick example
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from abstractmemory import InMemoryTripleStore, TripleAssertion, TripleQuery
|
|
111
|
+
|
|
112
|
+
store = InMemoryTripleStore()
|
|
113
|
+
store.add(
|
|
114
|
+
[
|
|
115
|
+
TripleAssertion(
|
|
116
|
+
subject="Scrooge",
|
|
117
|
+
predicate="related_to",
|
|
118
|
+
object="Christmas",
|
|
119
|
+
scope="session",
|
|
120
|
+
owner_id="sess-1",
|
|
121
|
+
provenance={"span_id": "span_123"},
|
|
122
|
+
)
|
|
123
|
+
]
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
hits = store.query(TripleQuery(subject="scrooge", scope="session", owner_id="sess-1"))
|
|
127
|
+
assert hits[0].object == "christmas" # terms are canonicalized (trim + lowercase)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Documentation
|
|
131
|
+
|
|
132
|
+
- Getting started: [`docs/getting-started.md`](docs/getting-started.md)
|
|
133
|
+
- FAQ: [`docs/faq.md`](docs/faq.md)
|
|
134
|
+
- Architecture (with diagrams): [`docs/architecture.md`](docs/architecture.md)
|
|
135
|
+
- Stores/backends: [`docs/stores.md`](docs/stores.md)
|
|
136
|
+
- API reference: [`docs/api.md`](docs/api.md)
|
|
137
|
+
- Development: [`docs/development.md`](docs/development.md)
|
|
138
|
+
|
|
139
|
+
## Project
|
|
140
|
+
|
|
141
|
+
- Changelog: [`CHANGELOG.md`](CHANGELOG.md)
|
|
142
|
+
- Contributing: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
143
|
+
- Security: [`SECURITY.md`](SECURITY.md)
|
|
144
|
+
- License: [`LICENSE`](LICENSE)
|
|
145
|
+
- Acknowledgments: [`ACKNOWLEDGMENTS.md`](ACKNOWLEDGMENTS.md)
|
|
146
|
+
|
|
147
|
+
## Design principles (v0)
|
|
148
|
+
|
|
149
|
+
- **Triples-first** representation with temporal fields (`observed_at`, `valid_from`, `valid_until`).
|
|
150
|
+
- Implemented in `TripleAssertion`: [`src/abstractmemory/models.py`](src/abstractmemory/models.py)
|
|
151
|
+
- **Append-only**: represent updates by adding a new assertion with fresh provenance.
|
|
152
|
+
- Implemented by all stores: [`src/abstractmemory/in_memory_store.py`](src/abstractmemory/in_memory_store.py), [`src/abstractmemory/sqlite_store.py`](src/abstractmemory/sqlite_store.py), [`src/abstractmemory/lancedb_store.py`](src/abstractmemory/lancedb_store.py)
|
|
153
|
+
- **No direct AbstractCore dependency**: embeddings can be obtained via an AbstractGateway HTTP API.
|
|
154
|
+
- Implemented by `AbstractGatewayTextEmbedder`: [`src/abstractmemory/embeddings.py`](src/abstractmemory/embeddings.py)
|