True memory for AI - lightweight, generalist, AI-made, AI-focused
Project description
MEMG 🧠⚡
True memory for AI - lightweight, generalist, AI-made, AI-focused
MEMG is an AI-enhanced memory management system that provides intelligent, persistent memory capabilities for AI agents and applications. Built on top of the robust memg-core foundation, MEMG adds sophisticated AI-powered features for enhanced search, intelligent processing, and seamless integration.
🚀 Quick Start
pip install memg
import memg
# Initialize with AI-enhanced features
memory = memg.Memory()
# Add memories with intelligent processing
memg.add_memory("task", {
"statement": "Implement user authentication system",
"details": "Need to add JWT-based auth with role management",
"priority": "high"
})
# AI-enhanced search with natural language
results = memg.search_enhanced("authentication tasks with high priority")
# Access AI utilities
ai = memg.GenAI()
analysis = ai.analyze_text("Complex user requirements document...")
✨ Key Features
🎯 AI-Enhanced Memory
- Intelligent Search: Natural language queries with semantic understanding
- Smart Processing: AI-powered content analysis and categorization
- Enhanced Retrieval: Context-aware memory retrieval with relevance scoring
🏗️ Built on Solid Foundation
- memg-core Integration: Leverages battle-tested core memory management
- Production Ready: Comprehensive testing, quality tools, and CI/CD
- Modern Architecture: Clean separation between core storage and AI enhancements
🔌 Flexible Integration
- MCP Server: Memory Context Protocol server for tool integration
- RESTful API: Standard HTTP endpoints for web applications
- Python SDK: Rich Python API with async/sync support
🛠️ Developer Experience
- Rich Configuration: YAML-based schemas and flexible setup
- Comprehensive Testing: Unit and integration test suites
- Quality Tools: Ruff, MyPy, Bandit for code quality
- Type Safety: Full type hints and runtime validation
📦 Architecture
MEMG Ecosystem
├── memg-core (PyPI) # Foundation: storage, search, schemas
├── MEMG (this package) # AI enhancements, processing, utilities
└── integrations/ # MCP server, APIs, external tools
Core Components
memg.core
: Integration layer with memg-corememg.ai
: AI-powered processing and analysismemg.search
: Enhanced search orchestrationmemg.api
: High-level API interfacesmemg.utils
: Utilities and schema management
🎮 Usage Examples
Basic Memory Operations
import memg
# Create and store memories
memory_id = memg.add_memory("note", {
"statement": "API design patterns research",
"details": "Investigated REST vs GraphQL for user management API",
"project": "web-app"
})
# Search with natural language
results = memg.search("API design research for web applications")
# Enhanced AI-powered search
ai_results = memg.search_enhanced("show me notes about web development")
AI-Enhanced Processing
from memg import GenAI
ai = GenAI()
# Analyze content with AI
analysis = ai.analyze_text("""
Long document about software architecture patterns...
""")
# Smart categorization and insights
insights = ai.extract_insights(analysis)
MCP Server Integration
# Run the MCP server for tool integration
cd integrations/mcp/
./build_and_run.sh
# Server runs on localhost:8787 with full MEMG capabilities
curl http://localhost:8787/health
🏁 Getting Started
Installation
# Install MEMG with AI features
pip install memg
# For development setup
git clone https://github.com/genovo-ai/memg.git
cd memg
pip install -e ".[dev]"
Configuration
Create a memory configuration:
# config/my_config.yaml
entities:
task:
required: [statement]
optional: [assignee, priority, status, due_date]
note:
required: [statement, details]
optional: [project, tags]
import memg
# Initialize with custom configuration
memg.create_memory_from_yaml("config/my_config.yaml")
Memory Server
For persistent memory with web access:
# Start the MCP server
cd integrations/mcp/
docker-compose up -d
# Or use the convenience script
./build_and_run.sh
🔧 Development
Quality Tools
# Run all quality checks
make quality-check
# Individual tools
make lint # Ruff linting
make typecheck # MyPy type checking
make security # Bandit security scan
make test # Full test suite
Testing
# Run tests
make test-all
# Fast tests only
make test-fast
# Integration tests
make test-integration
# Coverage report
make test-coverage
🤝 Contributing
We welcome contributions! Please see our development workflow:
- Fork & Clone: Fork the repository and clone locally
- Setup:
pip install -e ".[dev]"
for development dependencies - Quality: Run
make quality-check
before committing - Test: Ensure
make test-all
passes - PR: Submit a pull request with clear description
Development Standards
- Code Quality: Ruff formatting and linting
- Type Safety: MyPy type checking required
- Security: Bandit security scanning
- Testing: Comprehensive test coverage
- Documentation: Clear docstrings and examples
📚 Documentation
- API Reference: Coming soon
- Architecture Guide: See
src/memg/
for component structure - Integration Guide: Check
integrations/mcp/README.md
- Configuration: Explore
config/
directory for examples
🛡️ Security
- Bandit Scanning: Automated security vulnerability detection
- Dependency Management: Regular security updates
- Input Validation: Comprehensive data validation
- Safe Defaults: Secure-by-default configuration
📄 License
MIT License - see LICENSE file for details.
🌟 Related Projects
- memg-core: Foundation memory management system
- MCP Tools: Memory Context Protocol integrations
Built with ❤️ by the MEMG Team
True memory for AI - making intelligent agents truly intelligent 🧠✨
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
Built Distribution
File details
Details for the file memg-0.5.1.tar.gz
.
File metadata
- Download URL: memg-0.5.1.tar.gz
- Upload date:
- Size: 49.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
25d5c3eeb74efe664c245f3cd643f6aa6bc2ead4a1d1ee3976c5385b0f2ca529
|
|
MD5 |
ee7158679d223ec2ada4bae72270da9b
|
|
BLAKE2b-256 |
cf2530fb3e2f12942569c4b4e68f7ba1b64866b8b1b2e5433e66a7c95e89016b
|
Provenance
The following attestation bundles were made for memg-0.5.1.tar.gz
:
Publisher:
release.yml
on genovo-ai/memg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
memg-0.5.1.tar.gz
-
Subject digest:
25d5c3eeb74efe664c245f3cd643f6aa6bc2ead4a1d1ee3976c5385b0f2ca529
- Sigstore transparency entry: 403742614
- Sigstore integration time:
-
Permalink:
genovo-ai/memg@c0d73b7ef45e39ebc7311fa480b3df7c1cd6fb3e
-
Branch / Tag:
refs/tags/v0.5.1
- Owner: https://github.com/genovo-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@c0d73b7ef45e39ebc7311fa480b3df7c1cd6fb3e
-
Trigger Event:
push
-
Statement type:
File details
Details for the file memg-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: memg-0.5.1-py3-none-any.whl
- Upload date:
- Size: 13.5 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 |
69c2d6f8dd68e6689a922408e2f6d01caa1f13b2d27d24c7325918c5873bb3ce
|
|
MD5 |
987eb331a1e590fd15efa610ae8f51df
|
|
BLAKE2b-256 |
6b0310e8f16ac8fe9a540a588b6eec7965f0a1d4a9adf7f9709deb7b59b41670
|
Provenance
The following attestation bundles were made for memg-0.5.1-py3-none-any.whl
:
Publisher:
release.yml
on genovo-ai/memg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
memg-0.5.1-py3-none-any.whl
-
Subject digest:
69c2d6f8dd68e6689a922408e2f6d01caa1f13b2d27d24c7325918c5873bb3ce
- Sigstore transparency entry: 403742625
- Sigstore integration time:
-
Permalink:
genovo-ai/memg@c0d73b7ef45e39ebc7311fa480b3df7c1cd6fb3e
-
Branch / Tag:
refs/tags/v0.5.1
- Owner: https://github.com/genovo-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@c0d73b7ef45e39ebc7311fa480b3df7c1cd6fb3e
-
Trigger Event:
push
-
Statement type: