Typed composition algebra for wiring LLM agent pipelines
Project description
Persevere Plumbing
A typed composition algebra for wiring LLM agent pipelines. Plumbing
is a pipeline language and runtime where agents are Unix processes,
channels are Unix pipes, and types are validated at every channel
boundary. You declare processes and their types in .plumb files, then
compose them using a small algebra of stream morphisms.
Installation
Install from PyPI:
pip install persevere-plumbing
Pre-built wheels are also available for macOS (arm64) and Linux (x86_64). To install directly from a staged wheel file:
pip install persevere_plumbing-*.whl
Quick start
Type-check a pipeline
import persevere.plumbing as pb
from pathlib import Path
result = pb.check(Path("pipeline.plumb"))
print(result.bindings) # declared processes and their types
One-shot execution
results = pb.call_sync(Path("pipeline.plumb"), "hello")
Streaming execution
import asyncio
import persevere.plumbing as pb
from pathlib import Path
async def main():
async with await pb.run(Path("pipeline.plumb")) as pipeline:
await pipeline.send("hello")
response = await pipeline.recv()
print(response)
asyncio.run(main())
Build pipelines in Python
The persevere.plumbing.dsl subpackage lets you construct pipelines as Python
objects that render to .plumb source text:
from persevere.plumbing.dsl import Program, Agent
prog = Program()
prog.let("writer", input=str, output=str,
impl=Agent(model="claude-sonnet-4-5-20250514"))
results = prog.call_sync("Write a haiku about types")
Platform availability
- macOS arm64 (Apple Silicon)
- Linux x86_64
Documentation
Full documentation is included in the source repository under doc/:
- Python bindings — complete API
reference for
check(),call_sync(),run(), and the DSL - Language reference —
.plumbsyntax, types, modules, protocols
Licence
Copyright (c) 2026 Leith Document Company Limited. Free for non-commercial use (personal learning, academic research, hobby projects). Commercial use requires a licence — contact licensing@leithdocs.com. See LICENSE for full terms.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file persevere_plumbing-1.1.0-py3-none-manylinux_2_36_x86_64.whl.
File metadata
- Download URL: persevere_plumbing-1.1.0-py3-none-manylinux_2_36_x86_64.whl
- Upload date:
- Size: 45.2 MB
- Tags: Python 3, manylinux: glibc 2.36+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f486db4e1505390bf76d8c3b1dd603ac4a03cfb23f57edbdac4e4155d4fe181
|
|
| MD5 |
ec5f2765323c1b5b42d6055fb0871232
|
|
| BLAKE2b-256 |
885a94761e5b0cdf86ba616cd2a3e63c7f34eec03ecb6877bb8f0a37a07f4e57
|
File details
Details for the file persevere_plumbing-1.1.0-py3-none-macosx_26_0_arm64.whl.
File metadata
- Download URL: persevere_plumbing-1.1.0-py3-none-macosx_26_0_arm64.whl
- Upload date:
- Size: 26.1 MB
- Tags: Python 3, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12383a3fababd7394d1bd731d866fcc2dd16585917ff22c0761187b00eb61bec
|
|
| MD5 |
60ce8fb219c8de4630c20b8058d93d29
|
|
| BLAKE2b-256 |
9c4bf600faead29c34d664380d7c186ef788d0a1ca4d10b271f5766bc890ff3b
|