Introducing PromptFlow: Open Source Prompt Management

I’ve been building a side project and it’s reached the point where I’m happy to share it. It’s called PromptFlow — an open source prompt management UI built on top of Langfuse.

The problem it solves

Langfuse is excellent for storing and versioning prompts, but its authoring experience isn’t optimised for iteration. I wanted something where I could write, tag, test, and promote prompts in one place — and then have those prompts pulled down by separate apps at runtime, so changing a prompt in the UI changes how an app behaves without a new release.

That “remote prompt management” approach became the workflow running through the whole project.

What got built

There are four pieces:

Web app for authoring. Tag-first organisation, a version sidebar with inline diffs, a compose editor, and a playground that streams completions. Token count, cost, and latency displayed for monitoring.

CLI (@promptflow/cli) for terminal-first workflows. You can list, pull, edit locally as JSON, push back, run a prompt through OpenRouter, or diff versions — all without opening a browser.

MCP server (@promptflow/mcp-server) that maps your Langfuse prompts to MCP Prompts. Register it with Claude Desktop or Claude Code and your prompts become directly invocable from the tool. I use this daily now.

Demo iOS app (Cadence, separate repo) that reads tagged prompts and speaks them aloud via streamed audio. It’s the proof-of-concept consumer: edit a greeting prompt in the web UI, relaunch the app, and it uses the new wording. No app update required.

Technologies and what I learned

Langfuse is the storage and versioning layer. PromptFlow is deliberately just a frontend for it — your prompts live in Langfuse, and both the web and native apps pull from the same registry.

OpenRouter handles model routing in the playground and CLI. Being able to swap between Claude, OpenAI, and others with a single env var made testing prompt behaviour across models much faster than expected. The provider badge in the playground UI shows which model actually ran each completion.

Vercel AI SDK + AI Gateway is an alternative path in the playground. When you set AI Gateway key instead of an OpenRouter key, completions stream through the AI SDK, and the @langfuse/otel span processor automatically pushes traces into Langfuse.

Tracing with Langfuse was the part I underestimated most. Having latency, token counts, and cost visible per-request in the playground changes how you iterate on prompts. Seeing a rewrite cut latency by 40% while keeping quality is immediately actionable in a way that “feels faster” is not.

The @promptflow/core package is a typed Langfuse client wrapper with tag namespace utilities and template validation. It is shared by all the consumers. Writing a clean abstraction layer here first made building the CLI and MCP server much faster.

API design — the project gave me a good workout on designing consistent interfaces across three very different surfaces (REST-ish web API, CLI, MCP protocol). The tag namespace conventions (voice:, image:, eval:, app:, lang:, env:) emerged from needing something composable that different consumers could filter on independently.

Licence

The core is MIT. I have plans for a Pro version that will be a BSL 1.1 licence. This mirrors the Langfuse open-core model.

Try it

The repo is at github.com/MartinW/promptflow. You need a Langfuse account (free tier is fine), OpenRouter account or Vercel AI Gateway account. The README has a five-step quickstart.

Issues, suggestions, and kind words all welcome.