{"id":48757097,"url":"https://github.com/stefanwebb/named-pipes","last_synced_at":"2026-04-17T02:02:50.552Z","repository":{"id":344987879,"uuid":"1182655914","full_name":"stefanwebb/named-pipes","owner":"stefanwebb","description":"Low-latency IPC library for building persistent agentic tool servers (LLM inference, TTS, vector search, browser automation) over named pipes on the same machine.","archived":false,"fork":false,"pushed_at":"2026-04-13T01:55:07.000Z","size":1075,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-13T03:28:46.499Z","etag":null,"topics":["agent-skills","agents","claude-code","cli-tool","mcp","named-pipes"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanwebb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-15T20:01:15.000Z","updated_at":"2026-04-13T03:11:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stefanwebb/named-pipes","commit_stats":null,"previous_names":["stefanwebb/named-pipes"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stefanwebb/named-pipes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwebb%2Fnamed-pipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwebb%2Fnamed-pipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwebb%2Fnamed-pipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwebb%2Fnamed-pipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanwebb","download_url":"https://codeload.github.com/stefanwebb/named-pipes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwebb%2Fnamed-pipes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31911846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","agents","claude-code","cli-tool","mcp","named-pipes"],"created_at":"2026-04-13T03:20:45.683Z","updated_at":"2026-04-17T02:02:50.547Z","avatar_url":"https://github.com/stefanwebb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"MascotAnimation.gif\" width=\"100%\"\u003e\u003c/img\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003eNamed Pipes as Agentic Tools\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nLow-latency IPC for persistent AI tool servers — LLM inference, TTS, STT, vector search, and more — all on one machine, no network stack required.\n\u003c/p\u003e\n\n---\n\n## ✨ Highlights\n\n- **Persistent servers** — model weights and state stay loaded between calls; no per-request startup cost\n- **Kernel-speed IPC** — named pipes route through kernel memory, not a network stack; lower latency than local HTTP\n- **Multi-client fanout** — one server handles many concurrent clients; each gets its own downstream pipe\n- **Decorator API** — register command handlers with a single `@ch.handler(\"CMD\")` line\n- **`cpipe` CLI** — send ad-hoc commands to any running server from the terminal, like `curl` for pipes\n- **Claude Code skill** — an included skill teaches the assistant to discover and query live servers without leaving the session\n- **Ready-made servers** — drop-in pipes for LLM chat, text-to-speech, and speech-to-text\n\n## Overview\n\nThis library uses named pipes as the transport layer for **agentic tool servers** — persistent background processes that expose capabilities such as LLM inference, text-to-speech, vector search, or browser automation to a Python orchestrator running on the same machine.\n\nBecause named pipes route data through kernel memory rather than a network stack, they offer lower latency than local HTTP and far less complexity than shared memory — a practical sweet spot for real-time applications like voice agents.\n\nThe same servers can be driven directly from Claude Code. An included agent skill teaches the assistant how to discover running pipe servers with `cpipe --list`, inspect their capabilities, and send commands.\n\nFor a deeper look at the design decisions and API reference, see [DOCS.md](DOCS.md).\n\n## Installation\n\n```bash\n# Core library only\npip install -e .\n\n# With LLM inference support\npip install -e \".[llm]\"\n\n# With TTS support (macOS: mlx-audio + sounddevice)\npip install -e \".[tts]\"\n\n# With STT support (sounddevice; Voxtral weights vendored)\npip install -e \".[stt]\"\n```\n\nRequires **Python 3.11+**. See [DOCS.md](DOCS.md) for platform-specific dependency details.\n\n## Quick start\n\n**1. Start a server** (Terminal 1):\n\n```bash\nconda activate named-pipes\npython src/ex_chat_pipe/server.py   # LLM server on /tmp/tool-chat\n```\n\n**2. Query it from the CLI** (Terminal 2):\n\n```bash\ncpipe /tmp/tool-chat chat --data '{\"messages\": [{\"role\":\"user\",\"content\":\"Hello!\"}]}'\n```\n\n**3. Or write a client in Python:**\n\n```python\nfrom named_pipes.tool_named_pipe import ToolNamedPipe, Role\n\nwith ToolNamedPipe(\"tool-chat\", role=Role.CLIENT) as ch:\n    ch.send_message(\"chat\", '{\"messages\": [{\"role\":\"user\",\"content\":\"Hello!\"}]}')\n    for msg in ch.receive_stream():\n        print(msg)\n```\n\n## Examples\n\nStart order matters — **server first**, then client (server creates the FIFOs).\n\n```bash\n# LLM chat\npython src/ex_chat_pipe/server.py   # Terminal 1\npython src/ex_chat_pipe/client.py   # Terminal 2\n\n# LLM → TTS pipeline (spoken output)\npython src/ex_chat_pipe/server.py   # Terminal 1: LLM  (/tmp/tool-chat)\npython src/ex_tts_pipe/server.py    # Terminal 2: TTS  (/tmp/tool-tts)\npython src/ex_tts_pipe/client.py    # Terminal 3: pipeline client\n\n# Speech-to-text\npython src/ex_stt_pipe/server.py    # Terminal 1: STT  (/tmp/tool-stt)\npython src/ex_stt_pipe/client.py    # Terminal 2: subscriber\n\n# Basic channel (no-frills text + binary)\npython src/ex_basic_pipe/server.py  # Terminal 1\npython src/ex_basic_pipe/client.py  # Terminal 2\n```\n\n## `cpipe` — CLI tool\n\n```bash\ncpipe /tmp/tool-chat chat --data '{\"messages\": [{\"role\":\"user\",\"content\":\"Hello\"}]}'\n\ncpipe --list    # discover running pipe servers\ncpipe --pid     # same, plus PIDs that have each pipe open\ncpipe --clear   # delete orphaned pipes\n```\n\nSee [DOCS.md](DOCS.md) for all options and the full protocol reference.\n\n## Claude Code skill\n\nAn included skill at [`.claude/skills/named-pipe-tools/SKILL.md`](.claude/skills/named-pipe-tools/SKILL.md) teaches Claude Code how to use `cpipe` to discover, inspect, and interact with live servers — so the LLM can query a local inference server or trigger TTS playback without leaving the coding session.\n\n## Resources\n\n- [DOCS.md](DOCS.md) — architecture, API reference, protocol spec, and design rationale\n- [`named-pipe-tools.md`](named-pipe-tools.md) — `ToolNamedPipe` protocol specification\n- [`src/ex_chat_pipe/`](src/ex_chat_pipe/) — LLM chat example\n- [`src/ex_tts_pipe/`](src/ex_tts_pipe/) — TTS example\n- [`src/ex_stt_pipe/`](src/ex_stt_pipe/) — STT example\n- [`src/ex_basic_pipe/`](src/ex_basic_pipe/) — basic channel example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwebb%2Fnamed-pipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanwebb%2Fnamed-pipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwebb%2Fnamed-pipes/lists"}