Dream Cycle: AI Chat Memory Powered by HydraDB

Краткое содержание

Pixel shares Dream Cycle, a web app that stores chat messages as HydraDB graph memories and cleans them with a Sleep process. In a demo, Sleep merges duplicates, removes noise, and resolves a coffee preference contradiction, reducing 200 seeded memories to 39. The announcement also covers a temporal memory bug found during development and the challenges of running HydraDB from source.

DEV Community

Dream Cycle: a chat that remembers, then sleeps

I built Dream Cycle for the HydraDB Hackathon. It is a chat that saves every message as a memory in a HydraDB graph. Then you press Sleep, and it cleans the memory: it merges duplicates, drops small talk, and rewrites contradictions. Ask the same three questions before and after Sleep, and the answers get better. What I built Dream Cycle is a simple web app. You chat with it, and every message becomes a memory. I seeded it with 200 fake memories: 120 duplicates, 40 bits of noise, and one contradiction. The contradiction is the point. One memory says "I love coffee." A newer one says "You quit coffee." Before Sleep, the app answers "Do I like coffee?" with the old line. After Sleep, it answers "You quit coffee." That is the whole demo in one flip. How HydraDB helped I used HydraDB's open-source graph engine, self-hosted. Every memory is a real (:Memory) node in the graph, not a row in a table. Every read and write is real Cypher over the graph's HTTP API. Sleep is not a filter on a list. It runs Cypher to find duplicate memories, merge them, drop the noise, and write the cleaned version back as a node. The memory count drops from 200 to 39, and the graph does the work. I also worked with selfgraph, HydraDB's temporal memory library, for the $50 side bounty. I audited it and found a real bug: when you restore a source, the old text comes back in historical reads, even for times when the replacement was the true text. Finding that bug taught me how the temporal layer is supposed to work, and it made the Dream Cycle design sharper. The technical challenges, and how I solved them No free hosted workspace. The HydraDB dashboard only showed paid plans, and there were no free credits for the hackathon. The answer from Discord was to use the open-source engine. So I built the graph-node from source. It needs Rust, a Cypher parser library, and GraphBLAS, and the compile takes a while. Once it was running, I had a real graph database on my own machine. No semantic search. The open-source build has no embeddings, so retrieval is Cypher over stored text, word match, not meaning. I did not pretend otherwise. The demo works because the memories are exact text and the questions match them. The Render deploy kept failing. The first build failed because an install script needed a folder name. The second failed because the Rust build needed a feature flag called server-runtime, or the binary would not compile at all. I fixed both lines in the Dockerfile, redeployed, and the app went live. The binary was too big to push. The compiled graph-node is 74 MB, and the GitHub API refuses files that large. So the Dockerfile builds it from source at a pinned commit instead of shipping the binary. A race bug. The page loading twice seeded the database twice. I added a lock so only one seed can run at a time. The video. Loom's free account cannot upload a pre-recorded video, so I am sorting a different link for the demo video. What I would be honest about Only the coffee answer flips. The memory map is a row of dots, not a real graph picture. Sleep is one-shot, you reset before a fresh run. But the core works end to end: 200 memories in, Sleep, 39 out, and the answers improve. That is what I set out to prove. Links Live app: https://dream-cycle.onrender.com/ Repo: https://github.com/skymiller1509-blip/dream-cycle The demo video is in the repo under demo/dream_cycle_demo.mp4. @hydra_db
Dream Cycle: AI Chat Memory Powered by HydraDB
Powered by Readybot.io

Последнее от Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …

Why a Java HPA Got Stuck at 20 Kubernetes Pods

Pixel shares how a Spring Boot pricing service autoscaled to 20 Kubernetes pods and stayed there because the JVM retained committed heap memory after traffic …