Skip to content
p promptel. github ↗
← use cases · portability

Provider-portable prompts

Write a prompt once and run it against OpenAI, Anthropic, or Groq — switching for cost, latency, or capability without rewriting templates.

The problem

When prompts are f-strings glued to a specific SDK, swapping providers means touching every call site. The templates, the parameter plumbing, and the response parsing all assume one vendor, so a migration that should be a config change becomes a refactor.

With promptel

promptel puts a declarative layer between your application and the SDK. The prompt is authored once in the DSL or YAML; the provider is chosen at call time with { provider }. The day you move for price or a new capability, nothing else in your codebase has to move.

How it flows

  1. 01
    author

    Write the prompt once in a .prompt file with typed params and a technique block.

  2. 02
    execute

    Call executePrompt(src, params, { provider }) — provider is a flag, not a rewrite.

  3. 03
    switch

    Change provider to claude or groq for the same file; the SDK-specific details are handled by the abstraction.

  4. 04
    harmony

    Multi-channel Harmony responses come back as structured fields, uniform across providers that support them.

What you get

Try it on a prompt

Run npm install promptel and follow the quickstart.