Skip to main content

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-core
  • memg.ai: AI-powered processing and analysis
  • memg.search: Enhanced search orchestration
  • memg.api: High-level API interfaces
  • memg.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:

  1. Fork & Clone: Fork the repository and clone locally
  2. Setup: pip install -e ".[dev]" for development dependencies
  3. Quality: Run make quality-check before committing
  4. Test: Ensure make test-all passes
  5. 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

memg-0.5.1.tar.gz (49.7 kB view details)

Uploaded Source

Built Distribution

memg-0.5.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

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

Hashes for memg-0.5.1.tar.gz
Algorithm Hash digest
SHA256 25d5c3eeb74efe664c245f3cd643f6aa6bc2ead4a1d1ee3976c5385b0f2ca529
MD5 ee7158679d223ec2ada4bae72270da9b
BLAKE2b-256 cf2530fb3e2f12942569c4b4e68f7ba1b64866b8b1b2e5433e66a7c95e89016b

See more details on using hashes here.

Provenance

The following attestation bundles were made for memg-0.5.1.tar.gz:

Publisher: release.yml on genovo-ai/memg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for memg-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 69c2d6f8dd68e6689a922408e2f6d01caa1f13b2d27d24c7325918c5873bb3ce
MD5 987eb331a1e590fd15efa610ae8f51df
BLAKE2b-256 6b0310e8f16ac8fe9a540a588b6eec7965f0a1d4a9adf7f9709deb7b59b41670

See more details on using hashes here.

Provenance

The following attestation bundles were made for memg-0.5.1-py3-none-any.whl:

Publisher: release.yml on genovo-ai/memg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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