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

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/:

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.6-py3-none-manylinux_2_36_x86_64.whl (45.8 MB view details)

Uploaded Python 3manylinux: glibc 2.36+ x86-64

persevere_plumbing-1.0.6-py3-none-macosx_26_0_arm64.whl (27.3 MB view details)

Uploaded Python 3macOS 26.0+ ARM64

File details

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

File metadata

File hashes

Hashes for persevere_plumbing-1.0.6-py3-none-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 5c954215112d6c29330d7c7a0999a25ebe35fe58aebdd94218f22909b03f548d
MD5 7eafa4a079578e0c8970e68277bc48a6
BLAKE2b-256 af45058650404e6cad4d31f3da1092b559c40dd9d1673d54ff0b27ec628af52a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for persevere_plumbing-1.0.6-py3-none-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 ec1ad47da43a3bc7153d3b5bfa04f6c01a88d6d28d6a92d25a26ec5484116e39
MD5 f36697d5df64bee33a6a2231ab6d8b7b
BLAKE2b-256 b9b100fd66b5a3c21427347466c8b692d2e8992bbd573bfd4d6b86df863b5be8

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