Skip to main content

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

Pre-built wheels are available for macOS (arm64) and Linux (x86_64). Not yet on PyPI — install from the 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/:

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

persevere_plumbing-1.0.0-py3-none-manylinux_2_36_x86_64.whl (42.1 MB view details)

Uploaded Python 3manylinux: glibc 2.36+ x86-64

persevere_plumbing-1.0.0-py3-none-macosx_26_0_arm64.whl (23.6 MB view details)

Uploaded Python 3macOS 26.0+ ARM64

File details

Details for the file persevere_plumbing-1.0.0-py3-none-manylinux_2_36_x86_64.whl.

File metadata

  • Download URL: persevere_plumbing-1.0.0-py3-none-manylinux_2_36_x86_64.whl
  • Upload date:
  • Size: 42.1 MB
  • Tags: Python 3, manylinux: glibc 2.36+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for persevere_plumbing-1.0.0-py3-none-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 d55fec28aa46dd5613b1f1bc5da442196e53eefb8e8641aba83b24e6a9012e47
MD5 8ea377929a56389848c9456419b60f60
BLAKE2b-256 7305133c4216064c5ebdd74711e9ed7d0d25d1732217f0f0db1b965149f0c0ca

See more details on using hashes here.

File details

Details for the file persevere_plumbing-1.0.0-py3-none-macosx_26_0_arm64.whl.

File metadata

  • Download URL: persevere_plumbing-1.0.0-py3-none-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 23.6 MB
  • Tags: Python 3, macOS 26.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for persevere_plumbing-1.0.0-py3-none-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 92483f44dc6fdb3e71ea1f155e7e2d48c46f30e934974adc750da704a88b1d56
MD5 361915d7b274483dca80a338bac1cab4
BLAKE2b-256 fcbfcf05b86f8a68a51f75de310296840ec3827dbcaff4315fe99e6b54485787

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page