- Perl 97.2%
- Shell 2.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .hydra | ||
| bin | ||
| docs | ||
| examples | ||
| lib/Parley | ||
| sql | ||
| t | ||
| var | ||
| .gitignore | ||
| AGENTS.md | ||
| install.sh | ||
| README.md | ||
Parlay
Parlay is a small, persistent terminal chat for local AI models, written in Perl and built for Unix-like systems.
Machine-readable local discovery is available as XML:
perl bin/parlay capabilities
The command reports version, archive schema, host, path, runner, model, synthesizer, and download-consent capabilities without invoking runners, installing software, or downloading models.
For a compact human-readable version check:
parlay --version
Purpose
Parlay exists so an operator can keep a long-running local conversation with one local model and use that conversation to improve the working context over time.
The unchanged conversation history is the source of truth. A gist is only a derived, versioned artifact.
Parlay is an expert discussion space, not a programming worker. Participants may use code snippets as precise technical examples, in the same spirit as formulas or logical notation. Those snippets must be valid for the named language and must not be treated as verified merely because they look plausible. Execution, test running, and task orchestration remain Hydra responsibilities.
The intended long-term shape is a structured conversation between generalist perspectives and real specialists. Generalists can explore concepts and propose translations between domains; specialists can say what is possible, impossible, underspecified, or surprisingly feasible inside their own domain. The synthesis should make cross-domain possibilities visible that a single participant might not have found alone. That is Parlay's practical meaning of artificial creativity: disciplined, auditable emergence from bounded perspectives.
MVP 0.1
Parlay 0.1 is intentionally small:
- terminal chat with exactly one configured local agent
- append-only conversation event storage
- resumable conversations
- SQLite as the local canonical store
- FTS5 for fast full-text lookup
- versioned gists derived from the conversation archive
- operator-visible correction loop for bad gists
- offline operation on a local machine
Parlay 0.2: Multi-perspective responses
The first 0.2 increment can ask multiple explicit local agents for independent perspectives, archive every response, and use a local agent to synthesize one operator-facing answer:
printf '%s\n' 'What should I consider?' | perl bin/parlay respond-multi \
--db var/test/parlay.sqlite --conversation work \
--agent ollama:qwen3:8b --agent apfel \
--synthesizer ollama:qwen3:8b
perl bin/parlay chat --db var/test/parlay.sqlite --conversation work \
--agent ollama:qwen3:8b --agent apfel \
--synthesizer ollama:qwen3:8b --rounds 2
respond-multi also accepts --prompt or --prompt-file. All required local
binaries are checked before a turn starts. A failed perspective or synthesis
rolls back the complete turn rather than leaving a partial archive.
Role profiles can be configured in PARLAY_CONFIG by mapping a supported role
name to a local agent, then listing that role as an agent:
generalist=apfel
expert(perl)=ollama:qwen3:8b
skeptic=apfel
synthesizer=ollama:qwen3:8b
agent=generalist
agent=expert(perl)
agent=skeptic
Supported role names are generalist, expert(topic), skeptic, renderer,
and moderator; expert topics use lowercase letters, digits, and hyphens,
starting with a letter. The role shapes the participant prompt and archive
actor name, while the concrete runner and model identity remain stored
separately. A role profile does not grant tool use, shell access, or execution
authority.
The default is the original one-round response. Add --rounds 2 for a bounded
expert room: each agent first answers independently, then reads only the other
agents' compact gists and contributes one short follow-up. The REPL supports
/rounds 1 and /rounds 2; PARLAY_ROUNDS=2 selects the initial mode. Only
the final synthesis is printed prominently, while show and search expose
the complete append-only background timeline.
Moderation is enabled explicitly with --moderator deterministic. The
configured --rounds and --max-full-answer-grants are treated as hard limits
and compact synthesis instructions are recorded. An optional local policy
helper can instead be selected with --moderator apfel or
--moderator ollama:<small-model> (or PARLAY_MODERATOR in the default REPL).
Its plain-text decision is clamped to those same limits, archived as a
parlay-moderator system event, and never interpreted as commands or tool use.
Initialization
Initialize a SQLite database from the schema:
perl bin/parlay init --db var/test/parlay.sqlite
Quick Install
On a machine that can reach the Forgejo repository:
git clone https://git.rpdo.net/rpdo-net/parlay.git
cd parlay
sh install.sh
The installer is intentionally small. It checks for git, perl, and the
required SQLite Perl modules, clones or fast-forwards Parlay into
~/.local/share/parlay, and writes a parlay wrapper to ~/.local/bin.
To update an installed Parlay later:
parlay --update
The updater refuses dirty local changes in the installed checkout and only fast-forwards the configured ref.
On first use, Parlay never downloads an Ollama model silently. If the configured
model is missing in an interactive REPL, Parlay asks before running
ollama pull; choose explain this to me for the short reason. In
non-interactive commands, a missing model fails with a reason and no download is
started.
New installs also write a small user config if none exists. Apple Silicon
prefers apfel; Linux with a detected modern GPU and Ollama prefers
ollama:qwen3:8b; CPU-oriented hosts with llama-cli and a readable GGUF model
prefer llama.cpp:/absolute/model.gguf. This selection only configures Parlay;
it does not install binaries or download models.
Override paths or the source repository with environment variables:
PARLAY_INSTALL_DIR="$HOME/Projects/parlay" \
PARLAY_BIN_DIR="$HOME/.local/bin" \
PARLAY_REPO_URL="https://git.rpdo.net/rpdo-net/parlay.git" \
sh install.sh
Initial Hydra Registration
Local Hydra project id: parlay
Initial local path:
/Users/ralf/Projects/hydra/workshop/parlay
Initial lifecycle state: incubating
Publication policy: local-only
Privacy: private
Read-only Hydra Status Context
Parlay can import an explicitly supplied Hydra status JSON file as an append-only system event. The importer never discovers, invokes, or writes to Hydra. See Read-only Hydra Status Source.
Design Rule
Keep it simple. Parlay must become useful before it becomes clever.