microsoft/prompty

Prompty makes it easy to create, manage, debug, and evaluate LLM prompts for your AI applications. Prompty is an asset class and format for LLM prompts designed to enhance observability, understandability, and portability for developers.

What it solves

Prompty allows developers to decouple prompt engineering from application code. Instead of hardcoding prompts as strings within Python or TypeScript files, prompts are stored in dedicated .prompty files that combine configuration (model, inputs, and tools) and the prompt text itself in a markdown-like format.

How it works

It uses a specific file format consisting of a YAML frontmatter for configuration and a markdown body for the prompt. The system supports role markers (like system:, user:, and assistant:) to define message boundaries and template syntax (Jinja2 or Mustache) for dynamic content.

Developers can execute these files using runtimes for Python and TypeScript, or directly within VS Code. The tool supports multiple LLM providers including OpenAI, Anthropic, and Microsoft Foundry, and allows for easy switching of endpoints and API keys via environment variables.

Who it’s for

AI developers and prompt engineers who want a portable, version-controlled way to manage prompts across different languages and runtimes, and who prefer a VS Code integrated experience for testing and iterating on prompts.

Highlights

  • Cross-platform support: Run the same .prompty file from Python, TypeScript, or VS Code.
  • Cofiguration-driven: Model settings, inputs, and tool definitions are stored in the YAML frontmatter.
  • Integrated Tooling: A VS Code extension provides live preview, a connections sidebar for managing model endpoints, and a trace viewer for inspecting execution pipelines.
  • Flexible Templating: Supports Jinja2 and Mustache for dynamic prompt construction.
  • Portable Endpoints: Easily switch between OpenAI-compatible endpoints and self-hosted model servers without changing the prompt body.