This repository is the canonical upstream baseline for the SocioProphet memory mesh runtime and deployment work.
It keeps three concerns separate:
services/memoryd/is the control-plane and stable API for recall, writeback, config watch, and resource application.adapters/contains integration shims for upstream systems such as LiteLLM and OpenClaw.third_party/andartifacts/pin upstream software and model artifacts without forcing us to vendor entire upstream repos.
This repository currently includes:
- a runnable
memorydFastAPI service with in-memory, SQLite, and PostgreSQL store seams; - optional vector retrieval wiring through Qdrant plus a deterministic local embedder for bring-up;
- a LiteLLM callback hook that performs recall-before-call and writeback-after-call;
- an OpenClaw plugin that exposes
memory_searchandmemory_writetools; - repo-native lock manifests for upstream software and model artifacts;
- importer and validation scripts so upstream resolution happens in one controlled place instead of at runtime;
- local M2 Mac Podman and Google Cloud review deployment scaffolding.
Memory Mesh now carries the first review-only proposal contract for durable agent learnings discovered during guarded AgentPlane sessions.
This is the bridge from agent execution evidence to durable repo/project memory without silent writeback:
- AgentPlane remains the source of guarded workcell, invocation, and stop-gate evidence.
- guardrail-fabric remains the source of policy-decision evidence.
- Policy Fabric remains the source of break-glass approval evidence.
- Memory Mesh receives reviewable learning proposals.
- Durable writeback remains disabled unless explicitly approved by a later governance flow.
The contract, example, validator, and generator live at:
schemas/agent-learning-proposal.schema.jsonexamples/agent-learning/proposal.example.jsonscripts/validate_agent_learning_proposal.pyscripts/create_agent_learning_proposal.pyscripts/validate_agent_learning_proposal_generator.py
Validate locally:
python -m pip install jsonschema
make validate-agent-learning-proposalThe workflow .github/workflows/agent-learning-proposal.yml runs this validation when the proposal schema, example, generator, validator, workflow, README, or Makefile changes.
The example enforces review-only proposal mode, pending human review, no raw sensitive payload storage, evidence references, policy decision references, repo-local operating-contract destinations, and disabled durable writeback.
Memory Mesh now carries a narrow binding contract for durable learning candidates that originate from governed SCOPE-D adversarial scenarios.
This binding does not write memory. It links a SCOPE-D scenario, runtime decision receipts, evidence references, policy decision references, and memory effect metadata to a review-only learning proposal. The purpose is to preserve scenario-derived lessons without allowing scenario output, ATT&CK coverage, dashboard exports, or model summaries to become durable memory by accident.
The contract, example, validator, and workflow live at:
schemas/scenario-learning-proposal-binding.schema.jsonexamples/scenario-learning/scenario-learning-proposal-binding.example.jsonscripts/validate_scenario_learning_proposal_binding.py.github/workflows/scenario-learning-binding.yml
Validate locally:
python -m pip install jsonschema
make validate-scenario-learning-bindingThe example enforces review-only mode, pending human review, no raw sensitive payload storage, scenario/evidence/policy references, required runtime decision receipt references, pending review memory effects, and disabled durable writeback.
Memory Mesh now carries a channel-provenance write-gate contract for durable memory candidates that originate from channel-conditioned percepts.
This is the Memory Mesh consumer of ProCybernetica Reciprocal Channel Governance and the Ontogenesis rcg: semantic mirror. It does not write memory. It validates that a memory candidate declares channel lineage, percept/interpretant provenance, confusability modes, collapse/repair state, confidence type, authority envelope, evidence refs, policy decision refs, redaction posture, and writeback posture before any durable memory promotion may be considered.
The doctrine, contract, examples, and validator live at:
docs/architecture/channel-provenance-write-gates.mdschemas/channel-provenance-memory-write-gate.schema.jsonexamples/channel-provenance/write-gate.candidate-memory.example.jsonexamples/channel-provenance/write-gate.confirmed-memory.rejected.example.jsonscripts/validate_channel_provenance_write_gate.py
Validate locally:
python -m pip install jsonschema
make validate-channel-provenance-write-gateThe candidate-memory example is expected to pass. The confirmed-memory ASR example is expected to fail semantically because the requested sink is disallowed by the ASR advisory authority envelope and lacks required repair/approval posture.
Memory Mesh now carries a review-only promotion-packet contract for Lampstand governed adapter records.
This is the bridge from local evidence to durable memory without collapsing authority boundaries:
- Lampstand remains the
adapter_recordssource authority. - Sherlock may search adapter records as local evidence.
- Memory Mesh receives reviewable promotion candidates.
- Durable writeback remains disabled unless explicitly approved later.
The contract, example, and validator live at:
schemas/lampstand-adapter-record-promotion-packet.schema.jsonexamples/lampstand/adapter-record-promotion-packet.example.jsonscripts/validate_lampstand_adapter_record_promotion_packet.py
Validate locally:
python -m pip install jsonschema
python scripts/validate_lampstand_adapter_record_promotion_packet.pyThe workflow .github/workflows/lampstand-adapter-record-promotion-packet.yml runs this validation when the promotion packet schema, example, validator, or workflow changes.
The example enforces review-only promotion mode, local-only record classification, policy decision references, evidence references, and source-record linkage for every promotion candidate.
Memory Mesh now carries the first scoped context-pack surface for the Professional Intelligence OS Gate 3 demo path.
The context-pack contract and example live at:
schemas/professional-intelligence-context-pack.schema.jsonexamples/professional-intelligence/context-pack.example.json
Validate locally:
python -m pip install jsonschema
python scripts/validate_professional_intelligence_context_pack.pyThe workflow .github/workflows/professional-intelligence-context-pack.yml runs this validation when the context-pack schema, example, validator, or workflow changes.
This context pack is intentionally workroom-scoped. It references the Professional Intelligence demo workroom, allowed agents, policy decision references, obligation references, search packet references, memory entries, and evidence records. It supplies the memory/context input for the Agentplane workflow bundle, Prophet Workspace workroom fixture, Policy Fabric policy decisions, and ContractForge obligations.
Memory Mesh defines a memory profile contract for Slash Topic scopes that provides the governance envelope for Lattice query routing.
The explicit route is:
- Slash Topics is the public query and governance surface.
- New Hope is the internal membrane and runtime substrate.
- Memory Mesh attaches to Slash Topic scope after New Hope membrane admission.
- Lab profile selection configures recall-time embedding, NLP, and multimodal behavior.
- Physical backend routing remains downstream of the governed memory profile.
The contract, example, and spec live at:
schemas/slash-topic-memory-profile.schema.jsonexamples/slash-topics/memory-profile.example.jsonspecs/slash-topic-memory-profile.v1.yaml
Validate locally:
python -m pip install jsonschema
python scripts/validate_slash_topic_memory_profile.pyThe workflow .github/workflows/slash-topic-memory-profile.yml runs this validation when the schema, example, validator, spec, or workflow changes.
Key properties of this contract:
- No raw sensitive payloads stored by default –
recallPolicy.sensitivePayloadStoragedefaults to"disallowed". - No memory writeback in dry-run mode –
writebackPolicy.dryRunModemust be"no-writeback"when dry-run is active. - Explicit Lattice mapping –
dryRun.queryRoutingPlancarriesmemoryProfileRef,memoryEventRef,publicSurfaceRef,runtimeSubstrateRef,runtimeAliasRef, andcompatibilityRef, matching LatticeQueryRoutingDryRunPlanfields. - Explicit Slash Topics / New Hope topology –
topologyRoles.publicSurfaceRefisslash-topics-public-surface;runtimeSubstrateRefisnew-hope-runtime-substrate;runtimeAliasRefisslash-topics-runtime-alias; andcompatibilityRefisnew-hope-compatibility. - Lab profile selection without lab jobs –
labProfile.launchLabJobsis an invariantfalse; embedding/NLP/multimodal tuning applies at recall time only.
This contract coordinates with the Slash Topics / New Hope consolidation work in SocioProphet/slash-topics issue 19 and the explicit role split enforced by SocioProphet/sociosphere PR 236, emitted by SocioProphet/prophet-platform PR 290, and indexed by SocioProphet/sherlock-search PR 26.
This is the canonical public repository for the runtime and deployment work. It is not a disposable starter artifact.
memorymeshowns the runtime, adapters, importer logic, deployment scaffolding, and build inputs.socioprophet-standards-storageshould mirror ADRs, normative schemas, retention policy, and benchmarks.sociosphereshould register the component and adapter manifests.
adapters/
litellm/
openclaw-memory-mesh/
artifacts/
models.lock.yaml
deploy/
services/
memoryd/
specs/
memoryd.openapi.yaml
third_party/
upstreams.lock.yaml
scripts/
validate_upstreams.py
render_import_plan.py
import_upstreams.py
- lock exact upstream versions in
third_party/upstreams.lock.yaml - mirror resolved artifacts into registries or stores we control
- vendor only patch queues or forked upstreams
- never allow production to fetch public dependencies at runtime
python -m venv .venv
. .venv/bin/activate
python -m pip install -r services/memoryd/requirements.txt
uvicorn services.memoryd.app.main:app --reload --port 8787In another shell:
python scripts/validate_upstreams.py third_party/upstreams.lock.yaml
python scripts/render_import_plan.py third_party/upstreams.lock.yaml
python scripts/import_upstreams.py third_party/upstreams.lock.yaml --output third_party/resolved.upstreams.json