# Repository Briefing: Pipelex/pipelex
> Source: https://repoforai.com/repo/Pipelex/pipelex (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Pipelex/pipelex
- **Official Docs / Website**: https://pipelex.com
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: See repository
- **Engineering Health**: A (77/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v0.124.1 (2026-12-01) — https://github.com/Pipelex/pipelex/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI, Local AI, API
- **Momentum**: 951 ★ total (+0 24h / +2 7d) · 78 forks
- **Topics**: `ai`, `ai-agents`, `ai-methods`, `api`, `claude-code`, `codex`, `docker`, `fastapi`, `llm`, `mcp`, `mthds`, `pipelex`
- **When to Use**: Best for: Teams turning repeatable document or content workflows into typed methods shared across CLI jobs, Python applications, APIs or chatbots. Skip if: You only need a direct model call, need the model to plan its own execution path, or cannot accommodate Elastic-2.0 for your distribution model.

## Overview
```text
### Architecture & Core Mechanics
Pipelex is a Python runtime for MTHDS, a declarative standard for reusable AI procedures. A `.mthds` bundle declares a domain, a `main_pipe` entry point and named steps such as `PipeLLM`. Inputs and outputs use named semantic types. Pipes can run in sequence, in batches or as nested methods. Pipelex controls the declared execution flow and parses structured results, so a model does not have to plan the procedure on each run.

The runtime lives in `pipelex/`, and `api/` is the build source for the REST image. Python applications can execute a bundle in-process with `PipelexMTHDSProtocol().execute(...)`. The CLI is another entry point: Typer and Instructor are core dependencies, while the `cli` extra is required for Rich-based CLI rendering. The coding-agent plugin and the hosted MCP connector are separate integrations. The former helps author and validate methods; the latter lets chatbots invoke methods saved to a Pipelex account.

### Key Capabilities & Differentiators
The runtime composes LLM generation, OCR and image generation into the same typed procedure. One practical pattern is extracting document text, then mapping it into fields that downstream steps or applications can consume. Provider selection is configurable: when a method omits the model name, the inference deck can resolve `default-general` to a configured model. That keeps routing out of the method definition, but switching models still calls for testing output quality and format adherence.

Optional packages cover Anthropic and Amazon Bedrock for text generation, Google Vertex for text, Gemini for text and images, and Mistral for text and OCR. Docling adds OCR, fal adds image generation, and Linkup adds web search. Local model endpoints can be configured through Ollama, vLLM, LM Studio or llama.cpp. Hosted integrations include Python’s `PipelexAPIClient` and `@pipelex/sdk` for Node; the separate `mthds` package targets MTHDS APIs.

### Trade-offs & Limitations
Compared with calling a provider SDK directly, Pipelex adds a method format and backend configuration in exchange for reusable, typed steps and several execution targets. A direct SDK is simpler for a single call. Compared with a code-first agent framework, Pipelex is better suited to procedures whose execution flow should be reviewable before a run than to tasks where the model must decide what happens next. Deterministic orchestration does not guarantee identical model outputs.

Portability also has operational limits: local setup may require provider extras and an inference-deck override, and moving between backends warrants regression tests on representative inputs. The manifest declares Elastic-2.0, which matters when evaluating managed-service or redistribution plans. For privacy-sensitive deployments, distinguish local orchestration from local inference, check where each step sends data, and disable usage statistics if policy requires it.

### Hardware & Deployment Guide
The package supports Python 3.11 through 3.14. For terminal use, install with `uv tool install "pipelex[cli]"`, then run `pipelex init` and `pipelex doctor`. Initialization defaults to hosted execution, which uses a Pipelex account but does not require separate provider credentials. A locally configured CLI can send an individual run to the hosted API with `--hosted`. For self-hosted REST, use `pipelex/pipelex-api`, built from `api/`. Node.js is required by the coding-agent plugin’s tools and hook, not by in-process Python execution.

To run without external inference calls, keep every backend used by the method local, including OCR or image generation where applicable. Size the model server and document workers separately from the Python orchestrator, based on model choice, document workload and concurrency. Recent releases add template input-field reporting in v0.123.1, opt-in PNG/JPEG submissions to Jev for TypeSafe judgments in v0.124.0, and published reasoning-level vocabulary in the Inference SPI table in v0.124.1. The TypeSafe image path is not marked production-ready.
```

## Key Capabilities
```text
- Method contract: TOML-style `.mthds` bundles name an entry point with `main_pipe` and declare each pipe’s input and output types.
- Model routing: Methods can omit a provider-specific model name and resolve `default-general` through the configured inference deck.
- Multimodal composition: Pipes can combine LLM generation with OCR and image generation; optional extras include `docling`, `mistralai` and `google-genai`.
- Authoring integration: The separate Claude Code and Codex plugin provides method design and run tools plus a Node.js edit-validation hook.
- Service boundary: `api/` backs the `pipelex/pipelex-api` Docker image; Python embedding and hosted MCP access use distinct integration paths.
- Telemetry controls: Usage statistics can be turned off with `pipelex usage-stats disable` or `DO_NOT_TRACK=1`.
```

## Quick Start / Clone
```bash
uv tool install "pipelex[cli]"
pipelex init
pipelex doctor
```
