A library for managing LLM conversation history
Project description
MemexLLM
Overview
MemexLLM is a Python library for managing and storing LLM conversations. It provides a flexible and extensible framework for history management, storage, and retrieval of conversations.
Installation
Choose the installation option that best suits your needs:
Basic Installation
pip install memexllm
OpenAI Installation
pip install memexllm[openai]
Development Installation
pip install memexllm[dev]
Quick Usage
from memexllm.storage import MemoryStorage
from memexllm.algorithms import FIFOAlgorithm
from memexllm.core import HistoryManager
# Initialize components
storage = MemoryStorage()
algorithm = FIFOAlgorithm(max_messages=100)
history_manager = HistoryManager(storage=storage, algorithm=algorithm)
# Create a conversation thread
thread = history_manager.create_thread()
# Add messages
history_manager.add_message(
thread_id=thread.id,
content="Hello, how can I help you today?",
role="assistant"
)
# Retrieve conversation
thread = history_manager.get_thread(thread.id)
for msg in thread.messages:
print(f"{msg.role}: {msg.content}")
For more examples check out the examples directory.
Feature Roadmap
Here are the planned features and improvements for MemexLLM:
Short-term Goals
- OpenAI integration
- Memory storage backend
- FIFO algorithm
- Anthropic integration
- LiteLLM integration
- MongoDB storage backend support
- SQLite storage backend support
- Redis storage backend support
- PostgreSQL storage backend support
- Conversation summarization algorithm
- Other algorithms
- Export conversations to various formats (JSON, CSV, PDF)
Medium-term Goals
- Advanced conversation analytics
- Integration with popular LLM providers
- Conversation branching and versioning
Long-term Goals
- Distributed storage support
- Multi-modal conversation support
- Advanced privacy and security features
- API Gateway integration
- Enterprise-grade features
Contributing
We welcome contributions from the community! Here's how you can help:
Ways to Contribute
-
Code Contributions
- Fork the repository
- Create a feature branch
- Write clean, documented, and tested code
- Submit a pull request
-
Bug Reports
- Use the GitHub issue tracker
- Include detailed steps to reproduce
- Provide system information and context
-
Feature Requests
- Open a GitHub issue with the "enhancement" label
- Describe the feature and its use cases
- Discuss with the community
-
Documentation
- Help improve documentation
- Write tutorials and examples
- Fix typos and clarify explanations
Development Setup
-
Clone the repository:
git clone https://github.com/eyenpi/memexllm.git cd memexllm
-
Install development dependencies:
pip install -e ".[dev]"
-
Install pre-commit hooks:
pip install pre-commit pre-commit install
Running Tests
pytest tests/
Code Style
- We follow PEP 8 guidelines
- Use Black for code formatting
- Use isort for import sorting
- Write meaningful commit messages
Review Process
- All code changes require tests
- CI must pass
- Code review by maintainers
- Documentation updates if needed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memexllm-0.0.4.tar.gz.
File metadata
- Download URL: memexllm-0.0.4.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e03a46a42e638fb94e794022ffcd6d91d725b314bc9c33234f50bbd24cf9cfc5
|
|
| MD5 |
cf888425b54af04452e88963c0f15088
|
|
| BLAKE2b-256 |
887667c4bf93b30c7efb28238914a4a37057df2f3e031d04ff968945f38c61df
|
Provenance
The following attestation bundles were made for memexllm-0.0.4.tar.gz:
Publisher:
publish.yml on eyenpi/MemexLLM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memexllm-0.0.4.tar.gz -
Subject digest:
e03a46a42e638fb94e794022ffcd6d91d725b314bc9c33234f50bbd24cf9cfc5 - Sigstore transparency entry: 173797131
- Sigstore integration time:
-
Permalink:
eyenpi/MemexLLM@2b58736f94c76d6d090e8f9c37ac9b321272d44d -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/eyenpi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b58736f94c76d6d090e8f9c37ac9b321272d44d -
Trigger Event:
release
-
Statement type:
File details
Details for the file memexllm-0.0.4-py3-none-any.whl.
File metadata
- Download URL: memexllm-0.0.4-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8b41a01a723364a108591f7bba717dd7449e3b877b2b8896f403088b6a388db
|
|
| MD5 |
5f07aa8dc942e4ba463f14e416389161
|
|
| BLAKE2b-256 |
d44dbc49ab1e4360cf7039f227d247a2ba8a91c7282071e46cd7578fdbc0aeb8
|
Provenance
The following attestation bundles were made for memexllm-0.0.4-py3-none-any.whl:
Publisher:
publish.yml on eyenpi/MemexLLM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memexllm-0.0.4-py3-none-any.whl -
Subject digest:
c8b41a01a723364a108591f7bba717dd7449e3b877b2b8896f403088b6a388db - Sigstore transparency entry: 173797133
- Sigstore integration time:
-
Permalink:
eyenpi/MemexLLM@2b58736f94c76d6d090e8f9c37ac9b321272d44d -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/eyenpi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b58736f94c76d6d090e8f9c37ac9b321272d44d -
Trigger Event:
release
-
Statement type: