prompty
Library Listed
Prompty is an asset class and format for LLM prompts
- Downloads
- 337
- Dependents
- 0
- Stars
- 1,286
- Forks
- 136
- Contributors
- 31
- Commits
- 1,432
- Latest release
- 2.1.0 ·
About
Prompty v2 — Prompty v2 packages are available for Python, TypeScript, Rust, and C#. The shared
.promptyformat is aligned across runtimes by generated model types and conformance vectors. Feedback welcome via Issues.
Prompty is a markdown file format (.prompty) for LLM prompts. Write your prompt once — run it from VS Code or a language runtime that shares Prompty's generated model and conformance vectors.
Quick Start
1. Write a .prompty file
---
name: greeting
model:
id: gpt-4o-mini
provider: openai
connection:
kind: key
apiKey: ${env:OPENAI_API_KEY}
template:
format:
kind: jinja2
parser:
kind: prompty
---
system:
You are a friendly assistant.
user:
Say hello to {{name}}.
2. Run it
Python
uv pip install "prompty[jinja2,openai]"
import prompty
result = prompty.invoke("greeting.prompty", inputs={"name": "Jane"})
print(result)
TypeScript
npm install @prompty/core @prompty/openai
import { invoke } from "@prompty/core";
import "@prompty/openai";
const result = await invoke("greeting.prompty", { name: "Jane" });
console.log(result);
VS Code — open the .prompty file and press F5.
Read the full README
Use an OpenAI-compatible endpoint
Prompty's openai provider can also target OpenAI-compatible control planes,
gateways, or self-hosted model servers by setting model.connection.endpoint.
The prompt asset stays portable: switch the endpoint and key at runtime without
changing the prompt body.
---
name: governed-greeting
model:
id: gpt-4o-mini
provider: openai
connection:
kind: key
endpoint: ${env:OPENAI_BASE_URL:https://api.openai.com/v1}
apiKey: ${env:OPENAI_API_KEY}
template:
format:
kind: jinja2
parser:
kind: prompty
---
system:
You are a careful assistant.
user:
Say hello to {{name}}.
For example, to route through Tuning Engines:
export OPENAI_BASE_URL=https://api.tuningengines.com/v1
export OPENAI_API_KEY=sk-te-your-inference-key
This keeps the .prompty file unchanged while the endpoint provides routing,
policy, usage tracking, or trace correlation around OpenAI-compatible calls.
What's new in v2: agentic turns
Prompty v2 keeps the prompt asset simple, then adds a shared agentic turn
runtime when your app needs tools, memory, and runtime controls. Define tools in
frontmatter, bind the actual functions in host code, and call turn() instead
of invoke() when the model should loop through tool calls before returning a
final answer.
- Tool loop — execute model-requested tools, append tool results, and retry until the model returns a final response.
- Runtime controls — guardrails, cancellation, steering messages, retries, and event callbacks live in code instead of prompt text.
- Context and memory — thread inputs, context budgets, compaction, and memory-aware turns keep long conversations portable across runtimes.
- Observable agents — every render, parse, model call, tool call, and final result can flow into traces.
from prompty import turn
result = turn(
"agent.prompty",
inputs={"question": "What's the weather in Seattle?"},
tools={"get_weather": get_weather},
)
Contributor hygiene
Prompty normalizes text files to LF line endings via .gitattributes. Enable the
repo hook once per clone so staged files are normalized before each commit and
whitespace errors are blocked locally:
git config core.hooksPath .githooks
Before opening a PR, you can run the same core hygiene checks directly:
git diff --check
git ls-files --eol | grep 'w/crlf'
VS Code Extension
The v2 extension includes a connections sidebar, live preview, chat mode, and a redesigned trace viewer.
Create
Right-click in the explorer → New Prompty to scaffold a new prompt file.

Preview
See the rendered prompt with live markdown rendering and template interpolation as you type.

Connections
Manage model connections from the sidebar — add OpenAI, Microsoft Foundry, or Anthropic endpoints, set a default, and browse available models.

Chat Mode
Thread-enabled prompts automatically open an interactive chat panel with tool calling support.

Tracing
Every execution generates a .tracy trace file. Click to inspect the full pipeline — render, parse, execute, process — with timing and payloads.

Runtimes
Prompty runtimes are kept aligned by shared, generated model types and canonical cross-runtime conformance vectors. The vectors own observable behavior — load, render, parse, provider wire shape, response processing, agent/tool behavior, memory behavior, and live provider acceptance when credentials are available — while each runtime keeps its own idiomatic implementation.
| Runtime | Packages |
|---|---|
| Python | prompty |
| TypeScript | @prompty/core, @prompty/openai, @prompty/foundry, @prompty/anthropic |
| Rust | prompty, prompty-openai, prompty-foundry, prompty-anthropic |
| C# | Prompty.Core, Prompty.OpenAI, Prompty.Foundry, Prompty.Anthropic |
| Java | com.microsoft.prompty packages |
| Go | github.com/microsoft/prompty/runtime/go/prompty |
| Swift | Prompty, PromptyOpenAI, PromptyFoundry, PromptyAnthropic |
Python
uv pip install "prompty[all]" # everything
uv pip install "prompty[jinja2,openai]" # just OpenAI
uv pip install "prompty[jinja2,foundry]" # Microsoft Foundry
uv pip install "prompty[jinja2,anthropic]" # Anthropic
import prompty
# Full pipeline: load → render → parse → execute → process
result = prompty.invoke("my-prompt.prompty", inputs={...})
# Step-by-step
agent = prompty.load("my-prompt.prompty")
messages = prompty.prepare(agent, inputs={...})
result = prompty.run(agent, messages)
# Async
result = await prompty.invoke_async("my-prompt.prompty", inputs={...})
See runtime/python/prompty/README.md for full API docs.
TypeScript
npm install @prompty/core @prompty/openai # OpenAI
npm install @prompty/core @prompty/foundry # Microsoft Foundry
npm install @prompty/core @prompty/anthropic # Anthropic
import { load, prepare, run, invoke } from "@prompty/core";
import "@prompty/openai"; // registers the provider
// Full pipeline
const result = await invoke("my-prompt.prompty", { name: "Jane" });
// Step-by-step
const agent = await load("my-prompt.prompty");
const messages = await prepare(agent, { name: "Jane" });
const result = await run(agent, messages);
See runtime/typescript/packages/core/README.md for full API docs.
Rust, C#, Java, Go, and Swift
The additional runtimes use the same .prompty assets and generated model
contracts, with runtime-specific package managers and provider registration.
See the language folders under runtime/ for package-specific APIs,
test commands, and live-provider setup.
.prompty File Format
A .prompty file has two parts: YAML frontmatter (model config, inputs, tools) and a markdown body (the prompt with role markers and template syntax).
---
name: my-prompt
model:
id: gpt-4o
provider: foundry
connection:
kind: key
endpoint: ${env:AZURE_OPENAI_ENDPOINT}
apiKey: ${env:AZURE_OPENAI_API_KEY}
options:
temperature: 0.7
inputs:
- name: question
kind: string
default: What is the meaning of life?
tools:
- name: get_weather
kind: function
description: Get the current weather
parameters:
- name: location
kind: string
template:
format:
kind: jinja2
parser:
kind: prompty
---
system:
You are a helpful assistant.
user:
{{question}}
Role markers
Lines starting with system:, user:, or assistant: define message boundaries.
Template syntax
Jinja2 ({{variable}}, {% if %}, {% for %}) or Mustache ({{variable}}, {{#section}}).
Variable references
| Syntax | Purpose |
|---|---|
${env:VAR} | Environment variable (required) |
${env:VAR:default} | With fallback value |
${file:path.json} | Load file content from the prompt directory tree |
${file:...} references are scoped to the containing .prompty file's directory by default. Host applications can opt into additional allowed roots through runtime load options; prompts cannot grant themselves broader filesystem access.
Legacy format
Prompty v1 files are automatically migrated with deprecation warnings. See the Python README for details.
Contributing
See SUPPORT.md for help and CODE_OF_CONDUCT.md for community guidelines.
To release a new version, see RELEASING.md.
License
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- None found
- No native code found
- Python bindings
- No Python binding crate found
- License
- MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
Prompty is an asset class and format for LLM prompts |
337 downloads over 30 days | 0 | 1,286 | 2.1.0 | GPU support unknown | No native code found | MIT |
|
agent-client-protocol Featured
Core protocol types and traits for the Agent Client Protocol |
941,949 downloads over 30 days | 145 | 245 | 5.0.0 | GPU support unknown | No native code found | Apache-2.0 |
|
rig Featured
An opinionated library for building LLM powered applications. |
64,485 downloads over 30 days | 234 | 9,096 | 0.46.0 | GPU support unknown | Binds native code: libsqlite3-sys (feature sqlite), ring (feature surrealdb) | MIT |
|
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM |
63,795 binary downloads per release | Not applicable | 56,377 | Not measured | Not measured | Apache-2.0 | |
|
tokio-prompt-orchestrator Listed
Put a queue, deduplication and a circuit breaker in front of any LLM API, so repeated prompts cost one call and outages fail fast. Rust library, HTTP server and CLI. |
68 downloads over 30 days | 0 | 60 | 2.0.5 | GPU support unknown | No native code found | MIT |
|
yomo Listed
A QUIC-based runtime for AI-LLM tool routing and serverless execution |
26 downloads over 30 days | 0 | 1,930 | 2.1.6 | GPU support unknown | No native code found | Apache-2.0 |
|
An open protocol that gives AI agents a secure, sandboxed place to run code and use tools — with lean context usage. AXP works alongside MCP |
Not measured | Not applicable | 3 | Not measured | Not measured | Not measured | Apache-2.0 |
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 0 active dependents and 0 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 1,286 stars, 136 forks and 31 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
What else the check found
- The last activity is on 21 Oct 2026, 19 days ago. The rules expect an update within 365 days. Dormancy rule
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 2.1.0 base 200, raised to the 365-day floor: E = 365 daysdormancy: last activity 2026-10-21, 19 days ago, E = 365: activefeatured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 1286 (needs 4539), forks 136 (needs 434), contributors 31 (needs 79)listed: listed: no archive, new or featured rule applies
Crates4 crates
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 0 | crates.io database dump | Yes | |
| New dependents (365 days) | 0 | crates.io database dump | Yes | |
| Peak active dependents | 0 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 19 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-10-21 | GitHub repository | Yes | |
| Latest release | 2026-10-21 | crates.io database dump | Yes | |
| First release | 2026-04-11 | crates.io database dump | Yes | |
| Latest version | 2.1.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 23 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 53 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution13 releases, 337 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 13 | crates.io database dump | Yes | |
| Downloads over 30 days | 337 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository1,286 stars, 136 forks, 31 contributors, 1,432 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 1286 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 136 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 31 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 1432 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 0 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.