explaingit

ant-research/memdreamer

Analysis updated 2026-05-18

42PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

TLDR

A research system that lets AI understand long videos by building a layered memory graph and using an agent to search it for answers.

Mindmap

mindmap
  root((MemDreamer))
    What it does
      Long video understanding
      Separates perception and reasoning
      Hierarchical Graph Memory
    Tech stack
      Python
      PyTorch
      HuggingFace datasets
    Use cases
      Video question answering
      Benchmark reproduction
      Retrieval research
    Audience
      Researchers
      Video ML developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a question-answering system over hour-long videos using hierarchical memory retrieval.

USE CASE 2

Reproduce state of the art results on long video understanding benchmarks like LVBench and Video-MME.

USE CASE 3

Study agentic retrieval loops that combine navigation, search, and graph traversal tools.

USE CASE 4

Use the precomputed memory files and trajectories on HuggingFace as a starting dataset for video reasoning research.

What is it built with?

PythonPyTorchHuggingFace

How does it compare?

ant-research/memdreamerninaantonov/flash-usdt-senderalibaba/omnidoc-tokenbench
Stars424243
LanguagePythonPythonPython
Setup difficultyhardmoderatemoderate
Complexity5/53/53/5
Audienceresearchergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires downloading large precomputed memory datasets and setting up embedding servers, memory construction code is not yet released.

Use freely for any purpose, including commercial use, as long as you keep the copyright and license notice.

In plain English

MemDreamer is a research project from Ant Group and Zhejiang University focused on helping AI systems understand long videos. Instead of trying to process an entire video at once, it separates two jobs: noticing what happens in the video, which is perception, and figuring out answers to questions about it, which is reasoning. The core idea is a Hierarchical Graph Memory. As a video streams in, the system builds a structure that goes from a single video root down through super events, macro events, and finally individual entities and events. This lets the system keep track of a long video without holding every detail in memory at once. To answer a question about the video, MemDreamer does not just search once. It uses an agentic, tool augmented retrieval process built around an Observation, Reason, Action loop. Three categories of tools support this: hierarchical navigation, precise search, and graph traversal. The system observes what it currently knows, reasons about what it still needs, and takes an action such as searching deeper into the memory graph, repeating this cycle until it can answer. According to the README, this approach reaches state of the art results across four video understanding benchmarks, LVBench, LongVideoBench, Video-MME, and EgoSchema, closing the gap to human expert performance to about 3.7 points. As of the README, the project has released the agentic retrieval code along with precomputed memory files and inference trajectories, available on HuggingFace. The code for actually building the memory graphs from raw video has not been released yet. Getting started involves cloning the repository, installing Python dependencies, and downloading the prebuilt memory and trajectory data to reproduce results, or setting up custom embedding servers to run retrieval with your own LLM backend. This is written in Python and comes from an academic research team, accompanied by a paper on arXiv. It is licensed under Apache 2.0. Because memory construction code is still pending and the setup involves downloading large precomputed datasets plus configuring embedding servers, this is best suited to researchers and developers already comfortable with video understanding pipelines rather than someone looking for a simple drop in tool.

Copy-paste prompts

Prompt 1
Explain how MemDreamer's Hierarchical Graph Memory organizes a long video into super events, macro events, and entity subgraphs.
Prompt 2
Walk me through how to download the precomputed memory files from HuggingFace and run the retrieval scripts in this repo.
Prompt 3
Help me set up the embedding servers needed to run MemDreamer's agentic retrieval loop.
Prompt 4
Compare MemDreamer's Observation-Reason-Action retrieval loop to a simple single-pass video search.

Frequently asked questions

What is memdreamer?

A research system that lets AI understand long videos by building a layered memory graph and using an agent to search it for answers.

What language is memdreamer written in?

Mainly Python. The stack also includes Python, PyTorch, HuggingFace.

What license does memdreamer use?

Use freely for any purpose, including commercial use, as long as you keep the copyright and license notice.

How hard is memdreamer to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is memdreamer for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.