Skip to content

[Feat]: Improve version identification across all MemMachine artefacts and deployments #915

Description

@sscargal

Is your feature request related to a problem?

Currently, version identification for MemMachine artefacts and running instances is inconsistent, making it challenging to determine which version a component or container reflects. Users building from main or running containers can't easily tell which GitHub release/tag or commit their instance was built from. This leads to confusion in compatibility, troubleshooting, and upgradeability—especially for Docker images, where tags like latest-cpu and latest-gpu do not provide version granularity. Other mature projects such as Neo4j and Postgres always include explicit versions in Docker image tags and log startup output, creating much better traceability.

Describe the solution you'd like

Implement a system so every MemMachine component (including server, Python SDK, plugins, etc.) derives and exposes a consistent version string from the latest GitHub tag or release, or from a helper introduced for issue #830. The version string should be visible anywhere a user might interact:

  • Docker images: Publish images as memmachine/memmachine:vX.Y.Z-cpu, memmachine/memmachine:vX.Y.Z-gpu, as well as updating latest-cpu and latest-gpu (as floating tags). Use the commit SHA as a fallback when not on a tagged commit.
  • Application logs: When the app/server starts (via Docker Compose or scripts like memmachine-compose.sh), log the version (with commit hash if not exactly on a release).
  • CLI: Add a memmachine --version command to report the running version regardless of install method.
  • Reuse the solution and/or helper from issue [Feat]: Keep all components aligned on the same version at any commit #830 if it exists and is robust, for all version reporting.

This mirrors industry best practices and will vastly improve visibility and support for users and the dev team.

Describe alternatives you've considered

  • Continue offering floating tags (latest, latest-cpu, latest-gpu), but always add immutable version tags for every build.
  • Use multi-arch manifests if possible for consistent experience.
  • Backfill old releases with versioned Docker tags (optional).
  • Propagate version string to all components if possible.
  • Consider supporting pre-release tags like dev and rc in image tags and version printout.
  • Fallback to commit SHA in version string if not directly on a GitHub release/tag.

Additional context

Examples from other projects:

  • When running docker compose up, logs for MemMachine should show version info similar to how Neo4j or Postgres do on startup.
  • Docker Hub tags for MemMachine should clearly show version numbers, not just latest.
  • Extending the version API would make integration with deployment/monitoring tools much more robust.

Issue #830 describes a starting point for deriving versions from tags.

Activity

  1. self-assigned this
    on Jan 7, 2026
  2. added theissue type on Jan 7, 2026
  3. sscargal commented on Jan 7, 2026

    @sscargal
    ContributorAuthor

    Current State

    • Docker tags: Are versioned (good industry practice) and multi-arch (good!).
    • Floating tags (latest-*): Present for convenience, but less traceable.
    • Versioned tags (vX.Y.Z-*): Available; users can pull specific versions.

    See available images and tags on Docker Hub

    Gaps and Possible Enhancements

    1. Application/log-level version visibility:

      • The main gap is that end-users (or support/dev team) who run MemMachine containers may not see the version string of the running instance easily in logs, CLI, or API.
      • If a user pulls memmachine/memmachine:latest-gpu and runs it, the logs should show MemMachine version: v0.2.2-gpu (built from commit 26161e45fbce) or similar.
    2. CLI Version Reporting:

      • Running memmachine --version in a container (or installed software) should return the version string derived from the build/tag/git SHA.
      • This helps users know exactly what they're running, rather than guess based on the tag.
    3. Fallback to Commit SHA:

    4. Version API/SDK Propagation:

      • All MemMachine SDK and plugin components should expose the version string through an API property, function, or endpoint.
    5. Consistent Startup Messaging:

      • Emulate Neo4j/Postgres: on startup, clearly print the version and relevant tags/SHA in a consistent format.

    Recommendations

    Here’s how we might fulfill this issue based on what’s already implemented, and next steps:

    • Derive version information at build time. Use the mechanism referenced in issue #830 to consistently set a version string for every build artifact.
    • Inject version string into each artefact/environment:
      • For Docker: Use build args/environment variables to make the version/tag/SHA available, print it on startup.
      • For SDK/CLI: Add a --version option, print out the version + commit SHA.
      • For plugins: Add a version property.
    • Document: Make sure the documentation covers where users can find the version information.
    • Backfill old releases: Optionally, ensure earlier releases also get versioned tags for consistency.

    Example Implementation (Pseudo-Python for Startup Log/CLI):

    # main.py
    VERSION = os.environ.get('MEMMACHINE_VERSION', 'dev')
    COMMIT_SHA = os.environ.get('MEMMACHINE_COMMIT', '')
    
    def print_startup_message():
        print(f"MemMachine version: {VERSION} ({COMMIT_SHA})")
    
    def main():
        print_startup_message()
        # Continue with app setup...
    
    if __name__ == "__main__":
        main()

    And in Dockerfile:

    ARG VERSION
    ARG COMMIT_SHA
    ENV MEMMACHINE_VERSION=$VERSION
    ENV MEMMACHINE_COMMIT=$COMMIT_SHA
  4. sscargal commented on Jan 16, 2026

    @sscargal
    ContributorAuthor

    Fixed by #951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions