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 provides a standardized, portable markdown file format (.prompty) for LLM prompts. It decouples the prompt engineering process from the application code, allowing developers to write prompts once and execute them across different language runtimes (Python, TypeScript, Rust, C#, Java, Go, and Swift) and LLM providers (OpenAI, Microsoft Foundry, Anthropic) without changing the prompt body.
How it works
Prompty uses a two-part file structure: a YAML frontmatter for configuration (model ID, provider, connection details, inputs, and tools) and a markdown body for the actual prompt text using role markers (e.g., system:, user:) and template syntax (Jinja2 or Mustache).
To execute a prompt, a Prompty runtime loads the file, renders the template with provided inputs, parses the roles, and sends the request to the LLM provider. For more complex interactions, the turn() function enables "agentic turns," allowing the model to loop through tool calls and manage memory/context budgets before returning a final answer.
Who it’s for
Developers building LLM-powered applications who want a consistent way to manage, version, and test prompts across multiple programming languages and different model providers.
Highlights
Cross-Runtime Support: Official packages for Python, TypeScript, and several other languages including Rust, C#, Java, Go, and Swift.
VS Code Extension: Includes a live preview, a connections sidebar for managing endpoints, a chat mode for interactive testing, and a trace viewer for debugging the full pipeline.
Agentic Capabilities: Supports tool-calling loops, runtime controls (guardrails, retries), and memory-aware turns for portable agent behavior.
Portable Assets: Allows switching LLM endpoints and keys via environment variables or runtime settings without modifying the prompt file itself.
Citations and Tracing: Every execution generates a
.tracytrace file to inspect render, parse, and execution timing and payloads.
Related
- Project
- Project
- Project
- Project
- Project