The musical toolkit for agents

Composable tools for music#

Pocket gives musicians and their AI agents a shared set of small, exact tools for recordings, MIDI and arrangements. Each one does a single job, shows its evidence and leaves your originals untouched, so you can compose them into whatever your music needs.

Run your first experiment Learn the key ideas

Python 3.11+ · Command line · MCP · Free and open source (AGPL) · Early development

Built to stay in the pocket#

Musicians say a band is in the pocket when everyone is locked into the time and every note sits where it should. Pocket brings that same care to the details software usually glosses over.

A recording is its bytes. Audio is identified by its exact content, not its title or filename, so one master never quietly becomes another.

Every clock has a name. Samples in a file, beats on a timeline, the pulse you tap and the bar one you count are kept apart. Converting between them is always explicit.

Evidence keeps its label. Measurements, a model's guesses, authored decisions and a person's listening reports are separate records, and disagreements stay visible.

Nothing is overwritten. Every edit is a new version with its lineage. Your recordings, projects and earlier trials stay exactly as they were.

Meet the toolkit#

The names come from the pocket itself: it's sewn with thread and stitches, and Pip, the field mouse who lives in it, peeks out and feels the way with whiskers.

Practice and listening · no DAW needed

Context & practice

Mark passages and cues in a recording, render exact alternatives and compare them.

Practice review

Listen in your browser and save what you heard, pinned to the exact audio and moment.

Peek

Look inside a recording: where sounds start, which pulses fit, how the tempo drifts.

MIDI & sound

Create, edit, structure and export MIDI with explicit timing, locks and expression.

Ableton Live · optional adapters

Thread

Follow the clips and sources through a saved set, down to the source sample.

Stitch

Compare exact renders of a transition and pin notes to the span you heard.

Baste

Take a quick, read-only look at the session that's open right now.

Pipette

Carry one kept trial into a new project without disturbing the original.

Records and sets

Record bags

Gather a crate of records with honest, attributed notes about each one.

Weave

Sketch several possible orders for a set. Every route is a hypothesis.

Whisker

Propose what could come next, in a session you and an agent share.

Workspace

A small local page for bags, routes and next-record choices.

One tool, three ways in#

Every provider is available from Python, from the pocket command and to an AI agent over MCP. All three call the same function, so the answer never depends on the interface you use.

Python

from pocket_music import context_resolve

context_resolve(
    store_root=store, context=context,
    anchor_id="internal-cue",
    occurrence_id="repeat",
    target_clock_id="practice",
    target_space="arrangement_qn",
)

Command line

pocket context-resolve \
  --spec resolve-spec.json

The spec file holds the same arguments as JSON.

Agent (MCP)

tool:  context_resolve
input: the same JSON arguments

Your agent calls it for you and shows you the receipt.

Try it in a couple of minutes#

git clone https://github.com/rpalermodrums/pocket.git && cd pocket
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -e .
python examples/practice_context.py private/first-practice
pocket context-resolve --spec private/first-practice/resolve-spec.json

Pocket makes a short test recording, repeats two passages, renders an alternative and tells you exactly where a cue lands on the second pass: {"n": 5, "d": 2}, or 5/2 quarter notes, the "and" of beat three. You don't need a DAW, a model or an account.

Walk through your first experiment · Connect an agent · Browse the provider reference

Where it's heading#

Pocket isn't exclusive to any one genre, instrument, or DAW. After version 1, the aim is a responsive, living "band in a box": a practice partner that follows the form, comps, trades and adjusts to you in real time. Today's tools are the foundation for it: exact time, honest evidence and experiments you can always undo.

Status and direction · Changelog · Contributing · GitHub