memor
Memory frameworkOfficial OpenSciLab project
Created by OpenSciLab
Published in openscilab/memor. Publisher page
69 GitHub stars
What it is
Reproducible Structured Memory for LLMs
Summary from the brain’s metadata
Reproducible Structured Memory for LLMs Memor: Reproducible Structured Memory for LLMs
How it works
Memory model: JSON files
AutoGineer overview, from the brain’s own files
Memory model: JSON files. Folders: .github (agent config, 9 files); examples (examples, 8 files); tests (tests, 5 files). The agent reads get_message. The agent writes add_response, update_template, update_message, update_message_from_xml, update_score.
| Folder | Role | Files |
|---|---|---|
| .github | agent-config | 9 |
| examples | examples | 8 |
| tests | tests | 5 |
| memor | folder | 12 |
| otherfiles | folder | 6 |
The agent reads
- get_message evidence: README.md
The agent writes
- add_response evidence: README.md
- update_template evidence: README.md
- update_message evidence: README.md
- update_message_from_xml evidence: README.md
- update_score evidence: README.md
- update_role evidence: README.md
- update_title evidence: README.md
- update_content evidence: README.md
- update_map evidence: README.md
- update_engine evidence: README.md
- add_message evidence: README.md
- update_messages evidence: README.md
- update_messages_status evidence: README.md
Requirements
Runtimes: Python
Set it up
This brain runs code automatically: 1 script. Review setup.py before opening the folder in Claude Code. No step below turns a hook on for you.
setup.py:python setup.py
- Not scanned by AutoGineerThe author’s README also describes installing it as the PyPI package memor. Read its install section: AutoGineer did not scan that path. https://github.com/openscilab/memor/blob/0f5b66f0806482ddb73b8a33a4d68f19f3280f04/README.md#installation
Created by OpenSciLab. Published in openscilab/memor. Licence: MIT License.
Usage
From the brain’s own files
- INSTRUCTION1: "*I'm providing you with a history of a previous conversation. Please consider this context when responding to my new question.*"
- INSTRUCTION2: "*Here is the context from a prior conversation. Please learn from this information and use it to provide a thoughtful and context-aware response to my next questions.*"
- INSTRUCTION3: "*I am sharing a record of a previous discussion. Use this information to provide a consistent and relevant answer to my next query.*"
Documentation by OpenSciLab
Read the documentation at the source
CHANGELOG.md
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
1.4 - 2026-10-05
Added
Z.AI models
Moonshot AI models
_build_contextmethodFinishReasonenumResponseclassfinish_reasonpropertyResponseclassupdate_finish_reasonmethodResponseclassseedpropertyResponseclassupdate_seedmethod_validate_intfunction
Changed
Promptclass typing bugs fixedResponseclass typing bugs fixedSessionclass typing bugs fixedPromptTemplateclass typing bugs fixedOpenAI models updated
Google models updated
LG-AI models updated
Anthropic models updated
Meta models updated
Qwen models updated
_validate_pos_intfunction renamed to_validate_non_negative_int_validate_pos_floatfunction renamed to_validate_non_negative_floatINVALID_POSINT_VALUE_MESSAGErenamed toINVALID_NON_NEGATIVE_INT_VALUE_MESSAGEand message text updatedINVALID_POSFLOAT_VALUE_MESSAGErenamed toINVALID_NON_NEGATIVE_FLOAT_VALUE_MESSAGEand message text updatedValidation system modified
1.3 - 2026-07-28
Added
Sessionclassenable_all_messagesmethodSessionclassdisable_all_messagesmethodPromptTemplateclassvariablespropertyPromptTemplateclassget_missing_variablesmethodPromptTemplateclasscheck_rendermethod
Changed
Sessionclassenable_messagemethod modifiedSessionclassdisable_messagemethod modifiedSessionclassmask_messagemethod modifiedSessionclassunmask_messagemethod modifiedPromptclassupdate_templatemethod modifiedPromptTemplateclassto_dictmethod modifiedPromptTemplateclassrendermethod modifiedengineparameter added tofrom_content_filemethodTest system modified
Responseclassdatebug fixed
1.2 - 2026-06-15
Added
TemplateEngineenumMemorErrorclassPromptTemplateclassrendermethodPromptTemplateclassfrom_content_filemethodPromptTemplateclassupdate_enginemethodPromptTemplateclassenginepropertyPromptclassclear_responsesmethod
Changed
engineparameter added toPromptTemplateclassPromptclassrendermethod updatedPromptclasssavemethod updatedResponseclasssavemethod updatedLLMModelstructure updatedLLMModeltype changedSession list contamination bug fixed
Prompt list contamination bug fixed
README.mdupdatedTest system modified
Dependencies structure modified
1.1 - 2025-12-23
Added
Sessionclassto_dataframemethodSessionclassfrom_dataframemethodSessionclassreset_render_countermethodxml_usage.pyexampledataframe_usageexample
Changed
LLMModelenum updatedTest system modified
README.mdupdated
1.0 - 2025-11-17
Added
Responseclassxml_treepropertyPromptclassxml_treepropertyResponseclassupdate_message_from_xmlmethodPromptclassupdate_message_from_xmlmethod
Changed
README.mdupdatedLLMModelenum updatedverifyparameter added tocontains_xmlmethodWarning bug fixed
Test system modified
0.9 - 2025-10-22
Added
Promptclasscontains_xmlmethodResponseclasscontains_xmlmethodPromptclass size warningResponseclass size warningSessionclass size warningResponseclasswarningspropertyPromptclasswarningspropertySessionclasswarningsproperty
Changed
README.mdupdatedLLMModelenum updatedNonevalue update bug fixedshow_warningparameter added torendermethodPython 3.14added totest.ymlTest system modified
Typing modified
0.8 - 2025-07-21
Added
Logo
Responseclasstop_kpropertyResponseclasstop_ppropertyResponseclassgpuproperty
Changed
AI_STUDIOrender format modifiedLLMModelenum updatedModel load bug fixed
Test system modified
README.mdupdated_validate_pos_floatnow validatesintvalues_validate_probabilitynow validatesintvaluesNonevalue validation bug fixed
0.7 - 2025-06-25
Added
Messageabstract classSessionclass_validate_extract_jsonmethodResponseclass_validate_extract_jsonmethodPromptclass_validate_extract_jsonmethodPromptTemplateclass_validate_extract_jsonmethodSessionclasssearchmethodSessionclassget_sizemethodResponseclassget_sizemethodPromptclassget_sizemethodPromptTemplateclassget_sizemethodSessionclasssizeattributeResponseclasssizeattributePromptclasssizeattributePromptTemplateclasssizeattributeexamplesdirectory
Changed
Validation bug fixed in
update_messagesmethod inSessionclassValidation bug fixed in
from_jsonmethod inPromptTemplate,Response,Prompt, andSessionclassesAI_STUDIOrender format modifiedSessionclass messages status bug fixedTest system modified
README.mdupdated
0.6 - 2025-05-05
Added
ResponseclassidpropertyPromptclassidpropertyResponseclassregenerate_idmethodPromptclassregenerate_idmethodSessionclassrender_countermethodSessionclassremove_message_by_indexandremove_message_by_idmethodsSessionclassget_message_by_index,get_message_by_idandget_messagemethodsLLMModelenumAI_STUDIOrender format
Changed
Test system modified
Modification handling centralized via
_mark_modifiedmethodSessionclassremove_messagemethod modified
0.5 - 2025-04-16
Added
Sessionclasscheck_rendermethodSessionclassclear_messagesmethodPromptclasscheck_rendermethodSessionclassestimate_tokensmethodPromptclassestimate_tokensmethodResponseclassestimate_tokensmethoduniversal_tokens_estimatorfunctionopenai_tokens_estimator_gpt_3_5functionopenai_tokens_estimator_gpt_4function
Changed
init_checkparameter added toPromptclassinit_checkparameter added toSessionclassTest system modified
Python 3.6support droppedREADME.mdupdated
0.4 - 2025-03-17
Added
Sessionclass__contains__methodSessionclass__getitem__methodSessionclassmask_messagemethodSessionclassunmask_messagemethodSessionclassmasksattributeResponseclass__len__methodPromptclass__len__method
Changed
inference_timeparameter added toResponseclassREADME.mdupdatedTest system modified
Python typing features added to all modules
Promptclass default values updatedResponseclass default values updated
0.3 - 2025-03-08
Added
Sessionclass__len__methodSessionclass__iter__methodSessionclass__add__and__radd__methods
Changed
tokensparameter added toPromptclasstokensparameter added toResponseclasstokensparameter added to preset templatesPromptclass modifiedResponseclass modifiedPromptTemplateclass modified
0.2 - 2025-03-01
Added
Sessionclass
Changed
Promptclass modifiedResponseclass modifiedPromptTemplateclass modifiedREADME.mdupdatedTest system modified
0.1 - 2025-02-12
Added
PromptclassResponseclassPromptTemplateclassPresetPromptTemplateclass
56 files · 50 not served here
- .coveragerc (not served here)
- .github/CODE_OF_CONDUCT.md (not served here)
- .github/CONTRIBUTING.md (not served here)
- .github/ISSUE_TEMPLATE/bug_report.yml (not served here)
- .github/ISSUE_TEMPLATE/config.yml (not served here)
- .github/ISSUE_TEMPLATE/feature_request.yml (not served here)
- .github/PULL_REQUEST_TEMPLATE.md (not served here)
- .github/dependabot.yml (not served here)
- .github/workflows/publish_pypi.yml (not served here)
- .github/workflows/test.yml (not served here)
- .gitignore (not served here)
- .pydocstyle (not served here)
- ATTRIBUTION.md
- AUTHORS.md
- AUTOGINEER-RUNS.md
- CHANGELOG.md
- LICENSE
- README.md (not served here)
- SECURITY.md
- autopep8.bat (not served here)
- autopep8.sh (not served here)
- codecov.yml (not served here)
- examples/README.md (not served here)
- examples/dataframe_usage/1_secure_chat.py (not served here)
- examples/dataframe_usage/2_session_df.csv (not served here)
- examples/dataframe_usage/3_trimmed_chat.py (not served here)
- examples/dual_llm_chat_same_instruction.py (not served here)
- examples/requirements.txt (not served here)
- examples/simple_chat.py (not served here)
- examples/xml_usage.py (not served here)
- memor/__init__.py (not served here)
- memor/errors.py (not served here)
- memor/functions.py (not served here)
- memor/keywords.py (not served here)
- memor/llm_models.py (not served here)
- memor/message.py (not served here)
- memor/params.py (not served here)
- memor/prompt.py (not served here)
- memor/response.py (not served here)
- memor/session.py (not served here)
- memor/template.py (not served here)
- memor/tokens_estimator.py (not served here)
- otherfiles/RELEASE.md (not served here)
- otherfiles/donation.png (not served here)
- otherfiles/logo.png (not served here)
- otherfiles/meta.yaml (not served here)
- otherfiles/requirements-splitter.py (not served here)
- otherfiles/version_check.py (not served here)
- requirements-dev.txt (not served here)
- requirements-latest.txt (not served here)
- setup.py (not served here)
- tests/test_prompt.py (not served here)
- tests/test_prompt_template.py (not served here)
- tests/test_response.py (not served here)
- tests/test_session.py (not served here)
- tests/test_token_estimators.py (not served here)
Advantages
- Local-first: the memory stays in files or a database on your own machine (a rule-derived fact from the brain’s files, evidence: README.md)
- No API key is named in its files (a rule-derived fact from the brain’s files, evidence: README.md)
- Open licence (MIT) (a rule-derived fact from the brain’s files)
Limitations
- No ZIP download: install it from its source (a rule-derived fact from the brain’s files)
Security
Risk level: Low risk
This brain runs
Install scripts (1)
setup.py:python setup.py
- Low risk: scripts-present (setup.py)
Attribution and licence
- Created by
- OpenSciLab
- Publisher
- OpenSciLab (Official OpenSciLab project)
- Source
- openscilab/memor · commit 0f5b66f
- Licence
- MIT License (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by OpenSciLab.
Install from source
50 of its files are not served here, so there is no ZIP. openscilab/memor at 0f5b66f