Metadata-Version: 2.4
Name: memorybrain
Version: 1.0.0
Summary: Long-term memory library for AI assistants and agents
Home-page: https://github.com/memorybrain/memorybrain
Author: MemoryBrain Contributors
Author-email: memorybrain@example.com
License: MIT
Project-URL: Source, https://github.com/memorybrain/memorybrain
Project-URL: Tracker, https://github.com/memorybrain/memorybrain/issues
Keywords: ai memory agents llm chatbot sqlite
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/plain
License-File: LICENSE.txt
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

MemoryBrain
===========

Long-term memory library for AI assistants, chatbots, and autonomous agents.
Stores memories in a local SQLite database with intelligent ranked retrieval.

Requirements
------------
- Python 3.10 or newer
- No third-party runtime dependencies

Installation
------------
    pip install memorybrain

Or install from source:

    pip install .

Quick Start
-----------
    from memorybrain import MemoryBrain

    brain = MemoryBrain()

    brain.remember(
        "User likes Flutter development",
        tags=["flutter", "programming"],
        importance=10,
    )

    results = brain.recall("What framework does the user like?")
    for memory in results:
        print(memory.text)

    matches = brain.search("Flutter")
    print(matches)

    print(brain.stats())

API Overview
------------
remember(text, tags=None, importance=5)
    Store a new memory. Returns a Memory object.

recall(query, limit=10)
    Retrieve memories ranked for a natural-language query.

search(query, limit=10)
    Search memories by keyword relevance.

forget(memory_id)
    Delete a memory by ID. Returns True if deleted.

export("memories.json")
    Export all memories to a JSON file.

import_file("memories.json")
    Import memories from JSON (upsert by ID).

stats()
    Return statistics:
    - total_memories
    - most_common_tags (list of {tag, count})
    - database_size_bytes

Custom Database Path
--------------------
    brain = MemoryBrain(db_path="./data/my_memories.db")

Default location: ~/.memorybrain/memories.db

Build and Publish to PyPI
-------------------------
Install build tools:

    pip install wheel twine build

Build source distribution and wheel:

    python setup.py sdist bdist_wheel

Or using the modern build frontend:

    python -m build

Validate packages:

    twine check dist/*

Upload to PyPI (requires PyPI account and API token):

    twine upload dist/*

Test upload to TestPyPI first:

    twine upload --repository testpypi dist/*

License
-------
MIT License — see LICENSE.txt


MIT License

Copyright (c) 2026 MemoryBrain Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
