DEV Community

Bidit Das
Bidit Das

Posted on

Asterism: A Local-First Knowledge Graph That Grows From Your Claude Chat History

Every LLM conversation disappears the moment you close the tab. Ask something today, revisit the same idea next week, and it has no memory of ever having thought about it with you. Each thread is an island.

I wanted something different: conversations that accumulate into an actual picture of what I care about, not a transcript archive, but something closer to how memory itself works.

That's what led to Asterism.

What it does

Asterism parses your exported Claude conversation history and builds a local knowledge graph. It extracts (entity, relationship, entity) triples, and every time a concept resurfaces in a later conversation, the connection to it strengthens. Stop engaging with an idea, and it fades, eventually dropping off the graph entirely.

The result renders as an interactive constellation. Concepts you return to often glow brighter and sit more centrally. Concepts you've moved on from dim and drift into the dark.

How it works

  • Hebbian learning — edges strengthen each time the LLM traverses them (weight += 0.2 per traversal). Concepts left unrevisited for 3 hours of session time decay and vanish.
  • You are the central node — your own node sits at the center of the graph at full brightness, always. It never decays.
  • Local SQLite storage — the entire graph lives in ~/.asterism/asterism.db. No cloud, no sync, no accounts.
  • LLM context injection — relevant nodes and edges get injected into the Claude prompt automatically, so the model has implicit awareness of your past thinking.
  • Triple extraction — a fast extraction model (local Ollama or Anthropic Haiku) pulls structured relationships out of each exchange.

Built local-first, on purpose

The only external calls are to the Anthropic API for chat responses and, optionally, Haiku for extraction. Extraction can also run fully offline via Ollama. No telemetry, no accounts, delete ~/.asterism/ for a clean slate.

Stack

Layer Tech
Storage SQLite
Graph NetworkX
Visualization Vanilla JS force simulation
LLM Anthropic SDK
Extraction Ollama llama3.2:3b or Anthropic Haiku
UI Streamlit
CLI Click

Where it's headed

This is v0.1.0, early and rough. Here's the direction:

  • Beyond Claude — a memory layer that works across whichever frontier LLM you're using, not locked to one provider.
  • Zero-friction install — no API keys, no local Python setup, cached in-browser.
  • Simpler onboarding — fewer steps between finding it and running it.

If you've worked on local-first tools, LLM memory/context systems, or graph-based retrieval, I'd genuinely value your take on what to prioritize next.

Repo: https://github.com/biditdas18/asterism

Asterism GIF

Top comments (1)

Collapse
 
topstar_ai profile image
Luis

I found the concept of Asterism to be really intriguing, particularly the way it utilizes Hebbian learning to strengthen connections between concepts as they resurface in conversations. I've worked on a few projects involving graph-based data structures and I'm curious to see how you plan to handle scalability and potential graph complexity as the user's conversation history grows. Have you considered implementing any mechanisms for pruning or consolidating nodes and edges to prevent the graph from becoming too dense or unwieldy?