Skip to main content

SCM: local-first lifecycle memory for AI agents — wake, sleep, consolidation, and recall.

Project description

SCM: Sleep-Consolidated Memory

SCM is plug-and-play lifecycle memory for AI agents.

Most memory layers store facts and retrieve them later. SCM keeps that simple surface, then adds the human-like part that normal retrieval misses: memory can sleep, consolidate, forget stale noise, preserve current facts through contradictions, discover schemas, and wake with a summary of what changed.

Try It In 60 Seconds

python -m venv .venv
source .venv/bin/activate
pip install scm-memory
scm demo

Open the printed local URL, add a few facts, run sleep, and read the wake summary. No OpenAI key, hosted account, or vector database is required for the first run.

Check your install:

scm doctor

Use SCM In Your App

from scm import SCMEngine

memory = SCMEngine(session_id="demo", sandbox=True, offline=True)

memory.add_memory("The user is building a lifecycle-memory product.")
memory.add_memory("The product must stay local-first and plug-and-play.")
memory.sleep("deep")

result = memory.search_memory("what is the user building?")
print(result["memories"][0]["description"])

print(memory.wake_summary()["narrative"])

Universal Five-Tool Contract

SCM exposes the same contract through Python, CLI, REST, MCP, JavaScript, and LangChain/LangGraph:

Tool Purpose
add_memory Store a fact, event, preference, or observation.
search_memory Retrieve memories by associative recall.
sleep Run consolidation, schema extraction, forgetting, contradiction handling, and curiosity.
wake_summary Report what changed during idle/sleep time.
forget Suppress a specific memory by id.

consolidate remains a backward-compatible alias for sleep.

Product Surfaces

scm demo
scm chat
scm serve --host 127.0.0.1 --port 8000
scm mcp
scm sleep --mode deep
scm wake-summary --hours 24

Python:

from scm import SCMClient, SCMEngine

REST:

curl -s http://127.0.0.1:8000/v1/tools?format=openai

JavaScript:

npm install scm-memory
import { SCM } from "scm-memory";

const scm = new SCM({ baseUrl: "http://localhost:8000/v1", userId: "demo" });
await scm.addMemory("The user likes concise technical answers.");
const recall = await scm.searchMemory("communication preference");
console.log(recall.memories);

MCP:

scm mcp

Use it with Claude Desktop, Cursor, VS Code, or any MCP-compatible agent.

What SCM Is Not

SCM is not a vector database wrapper, not a chatbot UI, and not a claim that sleep-style memory wins every retrieval task. Retrieval systems remain strong for fixed snapshot lookup. SCM targets lifecycle workloads: interference, contradiction, schema discovery, curiosity gaps, and wake summaries after idle time.

Docs

Research

The paper is proof for the product, not the first-use path.

Citation

@techreport{shinde2026scm,
  title = {SCM: Lifecycle Memory for Language Agents},
  author = {Saish Shinde},
  institution = {Clyrai IP Studio},
  year = {2026},
  month = {July},
  url = {https://github.com/clyrai/SCM_OpenSource}
}

License

MIT

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

scm_memory-0.9.1.tar.gz (406.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scm_memory-0.9.1-py3-none-any.whl (338.4 kB view details)

Uploaded Python 3

File details

Details for the file scm_memory-0.9.1.tar.gz.

File metadata

  • Download URL: scm_memory-0.9.1.tar.gz
  • Upload date:
  • Size: 406.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for scm_memory-0.9.1.tar.gz
Algorithm Hash digest
SHA256 6b43bad447331233a2bb1b82900b086451fc38200259460667c07ff961cbf582
MD5 93dc5f651209150a601f5f0b3d5f24b1
BLAKE2b-256 c136a4f3f028c6e80097b4ea14106032497ed9cfc0d85d364692b7f164715bda

See more details on using hashes here.

File details

Details for the file scm_memory-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: scm_memory-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 338.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for scm_memory-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65f1451008087256add598437fa9b46b8ed126b170b463b1c8a4432dd2ad882d
MD5 c121afde9638e4dfdce247275586d08e
BLAKE2b-256 0cdf2a7714a6f26e23ae2fbac8568cc18f9f165ba1d9225076b5a468bf20a384

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page