[cfi-dkgv10-r1] Add langchain-dkg: LangChain memory + retriever for DKG v10#4
[cfi-dkgv10-r1] Add langchain-dkg: LangChain memory + retriever for DKG v10#4haroldboom wants to merge 13 commits into
Conversation
|
Patch release While preparing for review I caught and fixed a few bugs in Fixes in v0.1.1:
PyPI: https://pypi.org/project/langchain-dkg/0.1.1/ All 25 unit tests pass. |
|
rc.8 compatibility check + CI Verified Also added a GitHub Actions workflow that runs the 25 unit tests on Python 3.10 / 3.11 / 3.12 on every push and PR — green: https://github.com/haroldboom/dkg-langchain/actions Happy to address any reviewer feedback when you get to this one. |
- Bump pinned commit to ad6295e (CI + README badges, current HEAD on master) - Drop email from maintainer; GitHub is the canonical contact channel - Add targetAgents (AutoResearch / generic-HTTP / generic-CLI) - Add demo field pointing at the YouTube walkthrough - Cite 25/25 unit tests + CI matrix in security.notes
Contributor AttestationRestating the registry submission attestations against the pinned commit (
Two follow-ups planned before the next patch release:
|
- commit pin: bd7bc94 → 97ecf2a (the v0.1.2 release commit) - install.oneLiner: pins to ==0.1.2 so installers grab the attested wheel - security.notes: declares PEP-740 attestation published via pypa/gh-action-pypi-publish@release/v1; signed by GitHub Actions runner for haroldboom/dkg-langchain / publish.yml / env=pypi
|
Update — attested release shipped.
Per-distribution attestations are fetchable from PyPI's integrity endpoint:
Both decode to a PEP-740 in-toto Statement v1 signed by the GitHub Actions runner. Signer identity in the bundle: {"kind": "GitHub", "repository": "haroldboom/dkg-langchain", "workflow": "publish.yml", "environment": "pypi"}Registry entry bumped: pin → Wheel content is byte-for-byte equivalent to This is the sister submission's matching attested release — |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ub-dkg) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…44843) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🔐 Security maintenance release —
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Compatibility release — verified against DKG v10 node Bumped No source or API changes — this is a verification release. I reviewed the rc.2→rc.17 node changelog for every HTTP endpoint the adapter calls ( |
v0.1.6 — verified compatible with DKG v10 node
|
| Endpoint | rc.17 → rc.19 |
|---|---|
POST /api/memory/turn |
byte-identical |
POST /api/memory/search |
byte-identical |
POST /api/query |
byte-identical |
GET /api/agents (ping) |
byte-identical |
POST /api/context-graph/create |
additive — now also accepts contextGraphId as an alias for id (#1102), backward-compatible |
POST /api/shared-memory/{write,publish}, POST /api/assertion/* (opt-in SHARE) |
additive — new optional params + new 503 CURATOR_UNCONFIRMED / 409 CURATOR_REJECTED codes (OT-RFC-49); existing request contracts unchanged |
- PyPI:
langchain-dkg 0.1.6, published via Trusted Publishing with a PEP-740 attestation. - Registry pin updated to commit
36046ae;install.oneLiner→==0.1.6. - 25/25 unit tests green; CI green on Python 3.10/3.11/3.12.
v0.1.7 — bug fix: SHARE-path quad shapeWhile auditing against rc.19 I found a latent bug in the two opt-in SHARE write helpers and fixed it:
Fix: both methods now accept structured quads (a mapping, or a 3-/4-tuple), normalize them to the node's object shape, and POST Core paths (
|
v0.1.8 — typed curator-ack errors on SHARE/PUBLISHFollow-up to the rc.19 work: the node returns
|
What this PR does
Adds
langchain-dkgas a community integration. LangChainBaseChatMessageHistory,RunnableWithMessageHistory, andBaseRetrievercomponents backed by DKG v10 Working Memory and Shared Working Memory — gives any LangChain agent persistent, verifiable, queryable memory with full UAL provenance.Integration links
ad6295e6a9c9d94e75dd63bb215aa892b9630daclangchain-dkg@0.1.1MockDKGClient): https://colab.research.google.com/github/haroldboom/dkg-langchain/blob/master/demo.ipynbScope & faithfulness
memoryLayerscorrectly reflects which layer(s) the integration touches (WM primary; SWM via explicitpromote_to_shared).v10PrimitivesUsedcorrectly reflects which primitives are exercised (UAL, KnowledgeAsset, ContextGraph, Assertion).Security declarations (Section 8a)
security.networkEgressis empty — integration only contacts the local DKG node onlocalhost:9200.security.writeAuthoritylists every DKG write operation. The Curator-authority opPOST /api/assertion/{name}/promote(SHARE, WM→SWM) is called out explicitly; it is invoked only when the agent explicitly callspromote_to_shared(turn_uri), never automatically.security.credentialsHandledis empty — DKG bearer token is read fromDKG_TOKENenv var and handled by the operator.preinstall/install/postinstallscripts (Pythonpip installdoes not use them; package is plain hatchling-built).twine upload. PyPI Trusted Publishing withattestations: trueviapypa/gh-action-pypi-publishwill be added before the next patch release.ad6295e6…is the exact commit on master where this entry's behaviour is verified.Contributor attestation
security.networkEgress(which is empty).Notes for the committee
Components shipped.
DKGChatMessageHistoryBaseChatMessageHistoryPOST /api/memory/turnper turn → one Knowledge Asset in WMDKGMemoryRunnableWithMessageHistorywrapperDKGRetrieverBaseRetrieverVerification. 25/25 unit tests pass against the published wheel (
langchain-dkg==0.1.1installed into a fresh venv outside the source tree). GitHub Actions CI runs the suite on Python 3.10/3.11/3.12 for every push and PR — green at the pinned commit. Verified end-to-end against a live DKG v10 rc.8 node via the offlinedemo.ipynb(usesMockDKGClient, no node needed to reproduce).Sister submission.
github-dkg— PR #10 is the same author's other Round 1 entry: a GitHub issues / PRs / reviews ingestor for DKG v10 Working Memory. Together they form a write-side / read-side pair —github-dkgwrites engineering tacit knowledge into the substrate;langchain-dkggives any LangChain agent persistent memory backed by it.Submission tag:
cfi-dkgv10-r1.