Skip to content

biditdas18/asterism

Repository files navigation

Python License PRs Welcome

✦ Asterism

A local-first personal knowledge graph that thinks like a brain and looks like a constellation.

Every conversation you have with Claude leaves a trace. Asterism maps those traces into a living star map — the more you think about something, the brighter it glows. Stop thinking about it, and it fades into the dark.

What it looks like

Asterism Demo

Constellation zoomed out — Bidit as central star

Asterism central node — pulsar effect with radiating edges

How it works

  • Hebbian learning — edges between concepts strengthen each time the LLM traverses them (weight += 0.2 per traversal). Concepts that aren't revisited accumulate session exposure time; after 3 hours of uninterrupted exposure without traversal they decay and vanish from the graph.
  • You are the central node — your user node (Bidit) sits at the centre of the constellation 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 — on every message, the top-N most relevant nodes and edges are injected into the Claude prompt as implicit context, letting the model answer with awareness of your past thinking.
  • Triple extraction — each exchange is processed by a fast extraction model (local Ollama or Anthropic Haiku) that pulls (entity, relationship, entity) triples and writes them to the graph.

Quick Start

git clone https://github.com/biditdas18/asterism
cd asterism
chmod +x setup.sh && ./setup.sh

Then:

  1. Run asterism init — guided setup wizard
  2. Export your Claude data: claude.ai → Settings → Export Data → check email → download zip
  3. asterism crawl --source claude --path path/to/conversations.json
  4. Your constellation opens automatically

That's it. Your mind as a constellation.

Privacy

Your graph never leaves your machine. The only external calls are to the Anthropic API for Claude responses and (optionally) Haiku-powered triple extraction. The LLM only sees what you explicitly inject from your local graph — it has no access to the raw database. Delete ~/.asterism/ to get a clean slate. No telemetry, no analytics, no accounts.

Research

Asterism introduces several novel contributions to personal AI memory systems:

  • Hebbian knowledge graph — edges strengthen on traversal, decay on disuse
  • Session-based TTL — decay counts only active session time, not wall-clock time
  • Graph-as-index — the graph acts as a weighted B-tree index over LLM flat memory
  • Four biological mechanics — strengthening, pruning, pathway optimization, chain healing
  • Causal chain topology — conversations organized by how ideas evolved, not just topic similarity

A formal research paper is in preparation. See RESEARCH.md for full details.

Built with

Layer Tech
Storage SQLite (~/.asterism/asterism.db)
Graph NetworkX
Visualization Vanilla JS force simulation (zero dependencies)
LLM Anthropic SDK — claude-sonnet-4-6
Extraction Ollama llama3.2:3b (local) or Anthropic Haiku (cloud)
UI Streamlit
CLI Click

Author

Biditgithub.com/biditdas18

About

Local-first personal knowledge graph with Hebbian TTL decay, rendered as a living constellation.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors