PHPackages                             vielhuber/memhelper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vielhuber/memhelper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vielhuber/memhelper
===================

Markdown-first memory layer for LLM agents — one call, transparent indexing and auto-extraction.

1.1.9(1w ago)024↓100%MITPHPPHP ^8.3

Since May 29Pushed 1w agoCompare

[ Source](https://github.com/vielhuber/memhelper)[ Packagist](https://packagist.org/packages/vielhuber/memhelper)[ RSS](/packages/vielhuber-memhelper/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (21)Used By (0)

[![build status](https://github.com/vielhuber/memhelper/actions/workflows/ci.yml/badge.svg)](https://github.com/vielhuber/memhelper/actions)[![GitHub Tag](https://camo.githubusercontent.com/186a4a5afed78f61b7d6de29b5de23d097e7f009cbec28088f934a3ef5263280/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f7669656c68756265722f6d656d68656c706572)](https://github.com/vielhuber/memhelper/tags)[![Code Style](https://camo.githubusercontent.com/1540f8ce219727155ab62506c77b818b720421c22c4cf0b18a5f160942132e2d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64655f7374796c652d7073722d2d31322d6666363962342e737667)](https://www.php-fig.org/psr/psr-12/)[![License](https://camo.githubusercontent.com/c2f73329ac89372f3bba849d8f11eaa123a0620976841e1bab971884eb128a14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7669656c68756265722f6d656d68656c706572)](https://github.com/vielhuber/memhelper/blob/main/LICENSE.md)[![Last Commit](https://camo.githubusercontent.com/5561cfd881fe41b54aea9b5a2ab670a1ba4700c6bc842076c7f971e7ef243009/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f7669656c68756265722f6d656d68656c706572)](https://github.com/vielhuber/memhelper/commits)[![PHP Version Support](https://camo.githubusercontent.com/7798e7560c2d7fed6d0781cba30e2bfc0ce10b007ea3468860b1cfa4b0865079/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7669656c68756265722f6d656d68656c706572)](https://packagist.org/packages/vielhuber/memhelper)[![Packagist Downloads](https://camo.githubusercontent.com/e77cc4d89d6d891095097f41044255846cbfc0975a4b19403e8b9c29ddaeec25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7669656c68756265722f6d656d68656c706572)](https://packagist.org/packages/vielhuber/memhelper)

🧠 memhelper 🧠
=============

[](#-memhelper-)

Markdown-first memory layer for LLM agents. Exposes a `grab(query)` MCP tool that returns the curated facts most relevant to a natural-language question. A separate supervisor worker handles all writes — refreshing the search index across every configured input source, distilling new sources via an LLM, and periodically compacting duplicates and obsolete entries. Memory entries are plain `.md` files with a tiny YAML frontmatter — readable, editable, git-versionable. Cross-references between entries are written as `[[slug]]` wiki-links and followed one hop at retrieval time, so a single query surfaces related neighbours automatically.

installation
------------

[](#installation)

```
composer require vielhuber/memhelper
```

```
ai:
    provider: openai
    model: gpt-5
    api_key: sk-...

output: /path/to/memory

input_files:
    - /path/to/external/docs
    - /path/to/external/notes

input_dbs:
    - driver: sqlite
      path: /path/to/database.db
      include_tables: [chats_messages] # optional

    - driver: mysql
      host: 127.0.0.1
      port: 3306
      user: root
      password:
      database: memhelper
      exclude_tables: [analytics_events] # optional

    - driver: postgres
      host: 127.0.0.1
      port: 5432
      user: root
      password:
      database: database
```

usage
-----

[](#usage)

### library

[](#library)

```
use vielhuber\memhelper\memhelper;

$memory = new memhelper(
    configPath: '/path/to/config.yaml',
    logPath: '/var/log/memory.log'
);

$facts = $memory->grab(
    query: 'how is the user\'s dog named?',
    limit: 10
);
// → [['slug' => 'pet-roger', 'tags' => ['pet', 'dog'], 'description' => '...',
//     'body' => '...', 'sources' => ['dbrow:…'], 'score' => -3.41, 'via' => null], ...]
```

worker
------

[](#worker)

```
[program:memhelper-worker]
command=php /app/vendor/vielhuber/memhelper/bin/memhelper-worker /path/to/memory.yaml /var/log/memory.log
autostart=true
autorestart=true
```

tests
-----

[](#tests)

```
./vendor/bin/phpunit
```

### mcp

[](#mcp)

```
{
    "mcpServers": {
        "memory": {
            "command": "php",
            "args": ["./vendor/bin/mcp-server.php"],
            "env": {
                "MEMHELPER_CONFIG": "/path/to/memory.yaml",
                "MEMHELPER_LOG": "/var/log/memory.log"
            }
        }
    }
}
```

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance98

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

20

Last Release

10d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3183737?v=4)[David Vielhuber](/maintainers/vielhuber)[@vielhuber](https://github.com/vielhuber)

---

Top Contributors

[![vielhuber](https://avatars.githubusercontent.com/u/3183737?v=4)](https://github.com/vielhuber "vielhuber (20 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vielhuber-memhelper/health.svg)

```
[![Health](https://phpackages.com/badges/vielhuber-memhelper/health.svg)](https://phpackages.com/packages/vielhuber-memhelper)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k44](/packages/friendsoftypo3-content-blocks)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)[altis/local-server

Local Server module for Altis

18217.0k2](/packages/altis-local-server)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1715.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
