JayQuimby/aidj

★ 0Forks 0PythonGitHub ↗Compare

README

aidj

An AI DJ. A local LLM (served via Ollama) progressively composes music by editing a song file. Each "turn" the DJ reads the current song, proposes a unified diff, we apply it, and the player renders what's changed. Over time the song grows, mutates, and evolves — live.

Concept

  • The song lives in a single plain-text file (.aidj format) that is cheap for an LLM to read, diff, and mutate.
  • The DJ loop repeatedly:
    1. Reads the current song file.
    2. Prompts Ollama (/api/chat) with the file + recent "DJ context" (beat position, energy, listener cues).
    3. Receives a unified diff.
    4. Validates + applies the diff.
    5. The player hot-reloads and continues from the current beat.
  • All state is in the file → the session is trivially replayable / rewindable via git log on the song file.

Quick start

# 1. Ollama running locally on :11434 with a model pulled
ollama pull llama3.1

# 2. Install
uv sync   # or: pip install -e .

# 3. Run the DJ on an empty song
aidj dj songs/new.aidj --model llama3.1

Layout

src/aidj/          # package code
songs/             # song files (the DJ's working canvas)
prompts/           # system prompts + few-shot examples
tests/             # unit tests

See CLAUDE.md for architecture details.

Contributors

JayQuimby

Issues