Skip to content

Pipelex Banner

Build & Run AI Methods

A method is a reusable, typed AI procedure — declared in a .mthds file and executed by Pipelex. Each step is explicit, each output is structured, and every run is repeatable.

Claude Code MTHDS Tutorial Cookbook


Why Methods?

  • Declarative

    Express business logic at a high level of abstraction, in human-readable .mthds files that work across models.

  • Typed

    Concepts are semantic types: AI understands what you mean, and every input and output connects with purpose.

  • Repeatable

    Deterministic orchestration that leaves exactly the room you want for AI to express its intelligence and creativity.

  • Composable

    Chain pipes into sequences, nest methods inside methods, and share them with the community.


What a Method Looks Like

A single pipe in MTHDS — five lines that call an LLM with typed inputs and output:

[pipe.summarize_article]
type    = "PipeLLM"
inputs  = { article = "Text", audience = "Text" }
output  = "Text"
prompt  = "Summarize $article in three bullet points for $audience."

From here, Pipelex handles model routing across 60+ models, structured output parsing, and pipeline orchestration.


Capabilities

  • Typed Concepts

    Semantic types that give meaning to every input and output — native, inline, or backed by Python classes.

  • Pipe Operators

    Six operators that do the work: LLM calls, document extraction, image generation, web search, composition, and custom functions.

  • Pipeline Orchestration

    Sequence, parallel, batch, and conditional controllers that wire pipes into full methods with shared working memory.

  • 60+ AI Models

    One gateway key or bring-your-own: OpenAI, Anthropic, Mistral, Google, Deepseek, Hugging Face, and more.

  • Validation and Dry Run

    Validate pipelines before execution and dry-run with mocked responses — catch errors without spending tokens.

  • CLI and Tooling

    Full CLI for init, build, validate, run, and graph visualization. Plus plxt for formatting and linting .mthds files.


The MTHDS Ecosystem

MTHDS is the open standard behind Pipelex methods. It defines the language, the file format, and the ecosystem for sharing methods.

Explore the ecosystem

  • mthds.ai — The MTHDS language specification
  • mthds.sh — The Methods Hub for discovering and sharing methods

Get Started

  • Build with Claude Code

    Describe what you want in natural language — Claude writes, runs, and iterates on your method for you.

  • MTHDS Language Tutorial

    Learn the declarative language step by step: concepts, pipes, sequences, inputs, and structured outputs.

  • Cookbook Examples

    Production-ready recipes — from Hello World to document extraction, synthetic data, and image generation.