βββ βββββββββββββ ββββββββ βββββββ βββββββ ββββββ βββββββ βββ βββ
βββ ββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ βββ
βββ ββββββββββββββββββββ βββ ββββββββββββββββββββββββββββββββββββ
ββββ βββββββββββββββββββββ βββ ββββββββββββββββββββββββββ ββββββββ
βββββββ βββββββββββββββββββββββββββββββ ββββββ ββββββ βββ βββ
βββββ ββββββββββ ββββββββ βββββββ βββ ββββββ ββββββ βββ βββ
Most music recommendation systems treat songs as rows in a database. They match tags, count streams, and recommend based on what is popular. They fundamentally cannot answer the question:
"Find me something that sounds like this β not what people say it sounds like, but what the audio waveform actually is."
VibeGraph AI is built on a different principle. Every track in this system has been mathematically fingerprinted using Digital Signal Processing. The result is a 33-dimensional acoustic vector β a precise numerical identity derived from the audio itself β stored inside a Neo4j Knowledge Graph alongside rich relational context.
While text embeddings (like OpenAI's) use 1536 dimensions, acoustic reality is highly orthogonal. By extracting 20 MFCCs (timbre), 12 Chroma features (harmony), and 1 Spectral Centroid (brightness), we capture the pure "Acoustic DNA" of a track.
To prove this 33D space is sufficient, we performed unsupervised K-Means clustering on the dataset, achieving a Silhouette Score of 0.3988 and a Davies-Bouldin index of 0.91βmathematically validating that this compact vector perfectly separates tracks into meaningful sonic continents.
The intelligence is not in the application layer. It is in the graph.
To see this in action, we mapped the 25,000 track 33D vectors down to 2D using t-SNE. Notice how the tracks form distinct acoustic continents based entirely on mathematical sound waves, completely ignoring human genre tags:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA PLANE β
β β
β FMA Medium Dataset (22 GB) β
β 25,000 MP3 files Β· Creative Commons Β· 156 Genre Dirs β
β β β
β βΌ β
β βββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ β
β β engine/pipeline β β engine/audio_dsp β β
β β β β β β
β β ProcessPoolExecutorβββββΆβ librosa.load() β 22kHz mono β β
β β (12 CPU workers) β β MFCC Β· Chroma Β· Centroid β β
β β β β β normalize(reshape(1, -1)) β β
β β crash-proof β β β 33-dim acoustic vector β β
β β checkpoint file β ββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββ β β
β β β β
β βΌ βΌ β
β data/staging/ data/staging/ β
β batch_XYZ.json βββββββββ batch_XYZ.json β
β β β
β βΌ β
β ββββββββββββββββββββββββ β
β β engine/ingest_ β UNWIND atomic transactions β
β β staging.py β β 100 tracks per batch β
β β β β Constraints + Vector Index setup β
β ββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β KNOWLEDGE GRAPH (Neo4j Aura) β
β β
β (Artist)ββββββPERFORMED_BYββββββ(Track)ββIN_GENREβββΊ(Genre) β
β β β
β β audioEmbedding: [33D] β
β β sonicTraits: [...] β
β β β
β VECTOR INDEX β
β track_embedding β
β cosine similarity Β· 33D β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Below is an actual visual representation of the VibeGraph database in Neo4j, showing how Tracks connect to their respective Genres and Artists:
| Label | Key Properties | Description |
|---|---|---|
Track |
id, title, audioEmbedding[33], sonicTraits[] |
Core acoustic entity with normalized DSP vector |
Artist |
name |
Unique artist identity node |
Genre |
name |
Hierarchical genre classification |
| Relationship | Pattern | Semantic Meaning |
|---|---|---|
PERFORMED_BY |
(Track)β(Artist) |
Authorship provenance |
IN_GENRE |
(Track)β(Genre) |
Genre classification |
SOUNDS_LIKE |
(Track)β(Track) |
Nearest neighbor acoustic similarity (Top 5 per track) |
Tracks Seeded : 24,985
Artists Mapped : 5,533
Genres Indexed : 871
Vector Index : ONLINE (cosine, 33D)
This graph was purpose-built for the Neo4j Aura Agent Builder. By equipping an LLM with access to this graph, we create an intelligent audio librarian capable of true semantic music discovery.
- Similarity Search: Pointed at the
track_embeddingvector index. Allows the LLM to instantly search the 33D acoustic space. - Text2Cypher: Allows the LLM to traverse the graph (e.g., filtering by Genre or finding Artists).
- Acoustic Landscape Analyzer: A custom Cypher template that answers meta-questions like "What does the Folk genre actually sound like mathematically?" by aggregating
sonicTraitsacross nodes connected to a specificGenrenode. - Sonic Bridge Builder: Uses shortest-path graph traversal over pre-computed
[:SOUNDS_LIKE]edges to build gradient transition playlists between two acoustically dissimilar tracks.
User:
"I love the track 'Food' by AWOL (Track ID: 000002). It has this raw, gritty vibe β but I want something with that same sonic feel in the Electronic genre."
Aura Agent (Reasoning Chain):
- Text2Cypher: Queries the graph for
(:Track {id: "000002"})to retrieve the node and itsaudioEmbeddingproperty. - Similarity Search: Queries the
track_embeddingvector index using that embedding, returning the top 50 nearest neighbors by cosine similarity. - Graph Traversal: Filters the 50 results by traversing
(Track)-[:IN_GENRE]->(Genre {name: "Electronic"}). - Text2Cypher: Retrieves the artist name by traversing
(Track)-[:PERFORMED_BY]->(Artist)for the final candidate.
Aura Agent Response (Illustrative example of multi-hop output):
"Here's a match you might love β 'Bad Carnival Acid' by Illusion of Safety (Track ID: 000878). It lives in the Electronic genre and shares a strikingly similar harmonic footprint and timbral texture to 'Food'. That gritty, raw sonic character carries across β just with a different sonic coat."
To interact with the Neo4j Aura Agent, we built a premium, brutalist web application heavily inspired by audiophile equipment (specifically Marshall Amplification aesthetics).
- Framework: Next.js 16 (App Router)
- Styling: Tailwind CSS v4 with fluid typography (
clamp()) for HiDPI scaling - Animation: Framer Motion for seamless, SPA-like transitions between the landing hero and the chat interface without hard reloads
- Integration: A secure backend API route (
/api/agent/route.ts) handles OAuth2 token caching and securely proxies chat requests to the Neo4j Agent, keeping client credentials safe from the browser.
Each track is decomposed into three orthogonal acoustic dimensions:
Mel-Frequency Cepstral Coefficients (MFCCs) Captures the texture and timbre of the sound β the difference between a piano and a guitar playing the same note. Computed across the entire 30-second clip and time-averaged into a single feature vector.
Chroma STFT Maps energy distribution across the 12 musical pitch classes (C, C#, D, D#, ..., B). Two tracks sharing the same harmonic footprint are likely in the same key signature and will be perceived as acoustically compatible.
Spectral Centroid
The "center of mass" of the frequency spectrum. Tracks above the 2500 Hz threshold are classified as is_bright: true β a proxy for perceived brightness and energy. Heavy rock, electronic, and pop tracks typically score high. Ambient and folk tracks score low.
All three feature arrays are concatenated into a raw 33-dimensional array and L2-normalized using sklearn.preprocessing.normalize. This projects every track onto a unit hypersphere, making cosine similarity the ideal distance metric for cross-genre comparison.
This project uses the Free Music Archive (FMA) Medium dataset.
Defferrard, M., Benzi, K., Vandergheynst, P., & Bresson, X.
"FMA: A Dataset for Music Analysis"
18th International Society for Music Information Retrieval Conference (ISMIR), 2017.
| Property | Value |
|---|---|
| Source | Free Music Archive (FMA) |
| Tier | fma_medium |
| Track Count | 25,000 |
| Duration | 30s clips |
| Audio License | Creative Commons (various) |
| Metadata License | CC BY 4.0 |
πΎ Download the Vector Dataset: We have open-sourced the pre-computed 33D acoustic vectors to save the community hundreds of hours of DSP compute time. Available now on Kaggle.
The metadata folder contains raw_tracks.csv which cross-references each numeric MP3 file ID to its artist name, title, and genre classification. The pipeline joins on the 6-digit zero-padded track ID (e.g., 000002.mp3 β Track ID 000002).
# 1. Clone repository
git clone https://github.com/shivam/vibegraph-ai
cd vibegraph-ai
# 2. Create and activate virtual environment
python -m venv venv
source venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txtCreate a .env file in the project root:
NEO4J_URI=neo4j+s://<your-aura-instance>.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=<your-password>
NEO4J_DATABASE=neo4jDownload and extract the FMA dataset into the data/ directory:
data/
βββ fma_medium/ β Extract fma_medium.zip here
β βββ 000/
β βββ 001/
β βββ ...
βββ fma_metadata/ β Extract fma_metadata.zip here
βββ raw_tracks.csv
βββ ...
# Step 1: Extract acoustic features from all 25,000 MP3s locally
PYTHONPATH=. ./venv/bin/python engine/pipeline.py
# Step 2: Upload the acoustic knowledge graph to Neo4j Aura
PYTHONPATH=. ./venv/bin/python engine/ingest_staging.py
# Step 3: Verify graph integrity and vector index status
PYTHONPATH=. ./venv/bin/python engine/verify_db.pyneo4j
python-dotenv
librosa
numpy
scikit-learn
pandas
httpx
The source code in this repository is released under the MIT License.
All acoustic vectors and derived metadata originate from the FMA Medium Dataset and are shared under Creative Commons CC BY 4.0, with attribution to Defferrard et al. (2017). The raw audio files are not included or redistributed.
The VibeGraph AI Agent can be used as an MCP Server, allowing you to integrate the acoustic graph directly into Cursor or Claude Desktop.
If you have your Agent's MCP connection URL, you can configure it using the well-formatted JSON block below.
{
"mcpServers": {
"VibeGraphAI": {
"command": "node",
"args": [
"path/to/mcp-proxy",
"--url",
"https://<YOUR_NEO4J_AURA_AGENT_MCP_LINK>"
],
"env": {
"NEO4J_AGENT_CLIENT_ID": "your-client-id",
"NEO4J_AGENT_CLIENT_SECRET": "your-client-secret"
}
}
}
}(Note: Replace the URL and credentials with your specific Aura Agent MCP details. If your client supports native SSE URLs, you can supply the URL directly instead of using a proxy command).
Built for the Neo4j Aura Agent Hackathon 2026





