We get this question of comparison to BAML often, so let me take the time to clarify the differences:
Positioning:
• Pipelex is an AI workflow orchestrator. You declare multi-step pipelines (.plx) with LLM calls, OCR/PDF extraction, image generation, custom Python/tool steps, conditionals, and parallelism, then run them via CLI or Python, FastAPI/Docker, MCP, or n8n node.
• BAML defines typed, single-call “AI functions” (primarily LLM interactions) and compiles them into SDKs you call from your app; you typically orchestrate multi-step flows and any non-LLM work in your own code.
Developer experience:
• Pipelex feels like writing a readable pipeline spec you can iterate on or auto-generate and then execute end-to-end. Non-LLM ops (OCR, PDF, image gen, API calls) are first-class pipes you compose with LLM steps.
• BAML feels like writing typed prompt functions with templates and getting a clean, generated client API. Non-LLM work (OCR, PDF parsing, external APIs) usually sits in your app code or tools around those generated functions.
Structured output:
• Not exclusive to BAML. Pipelex’s PipeLLM supports strongly typed structured generation (based on the instructor package). Define schemas directly in .plx (simple concept syntax) or in Python with Pydantic v2, including custom validators and arbitrary validation logic.
Where each fits:
• If you want to design and run full workflows (extract → analyze → generate, with branching/parallelism) and keep that logic declarative and shareable, Pipelex is a great fit.
• If you mainly need reliable, typed “AI functions” embedded in an existing codebase, Pipelex also works well (define structures in Pydantic and call steps from Python). BAML is likewise a good fit when you prefer generated SDKs and you’re comfortable orchestrating steps and non-LLM work in app code.
Why Pipelex’s higher abstraction matters:
• It captures business logic and domain know-how in a structured, unambiguous language. Instead of burying intent across scattered prompts and glue code, a .plx file centralizes the specification (data concepts, pre/post-conditions, step semantics). That makes workflows easier to review, version, audit, and hand off, by humans and by AI, while remaining extensible to new AI/software operations.
TL;DR:
• Pipelex = declarative workflow engine/standard for multi-step AI pipelines, with first-class non-LLM ops and strongly typed outputs.
• BAML = typed prompt/function language that generates SDKs; you assemble and extend around it in your app.