Your prompts drive real product behavior. Why shouldn't they get the same treatment as your code? Prompt management as code means storing prompts in Git, reviewing changes in pull requests, and releasing by push - with prompt git as the source of truth. Every save is a commit, so every save is a version.

Why prompts should live in Git

Editing a prompt in a tool that keeps only the latest text gives you no history, no review, no rollback. Storing prompts in prompt repositories gives you everything you already rely on for code:

  • Versioning - every save is backed by a git commit.
  • Review - peer review prompt changes before they are released.
  • Rollback - re-release an earlier version, recorded as a rollback.
  • Audit - exactly who changed what, and why.
A prompt in the Infere app. Messages, variables and model settings are saved with the prompt file in Git, with a Try panel beside it. Example data.

The prompt file: prompts/<name>.pml

In Infere, a prompt is a file in a repository at prompts/<name>.pml. The file holds the messages in the order they are sent, each with a role - system, user, assistant or tool - plus the {{variables}} your project fills in. Model settings live alongside them: model, temperature (0-2) and max tokens (1-32,000). Add a tool if the prompt calls functions.

# prompts/support-reply.pml
# Messages, in the order they are sent:
1. system: You are a helpful support agent. Reply in {{language}}.
2. user: {{message}}

# Model settings:
model: gpt-4o-mini
temperature: 0.3
max tokens: 800

Start from one of six templates - Answer from articles, Summarise a document, Extract fields as JSON, Classify a message, Rewrite in a tone, Agent instructions - or write your own. Your project fills each {{variable}} with template_variables on the request; values set on the key fill any you leave out, and a variable with no value reaches the model as written. Validation runs the same checks a push gets - the name, no empty message, the variables, the ranges, and that the model is a chat model in the catalog - and must pass before you can save. Every save is a commit with a message, on the branch you choose.

The flow: clone, commit, release

Prompt git follows the workflow you already know:

  1. Clone the repository over HTTPS. The URL is https://app.infere.com/git/<workspace>/default, with a git access token as the username.
  2. Edit prompts/<name>.pml in your editor.
  3. Push to a branch and open a pull request.
  4. Review, approve, and merge. A check can gate merges into main.
  5. Release the version to keys - three steps in the prompt's Release… dialog - or push to deploy/<prompt>/<key>.

Branch rules, pull requests and checks give you the same discipline as a well-run codebase. Nothing reaches a key on its own: saving changes no key, and a merge does not release a prompt. A release always comes from the release step, the API, or a deploy/<prompt>/<key> push, through the same checks.

Repositories and access

Prompts live in a workspace's repository. A new workspace starts with a Default Repository holding prompts/, evaluators/, examples/, a .gitignore and a README.md. The repository's tabs hold the code, commits, branches, pull requests, releases and settings, and access is read, write or deploy - so one team can review a change without being able to release it.

The same discipline you apply to code - review, version, release - applied to the logic your AI runs on.

Next steps

Infere stores prompts as prompts/<name>.pml in a repository, with branch rules, pull requests and release-by-push, and keeps evaluators alongside them as evaluators/<name>.eml files. Treat your prompts like code and you'll stop shipping prompt changes blind.

Prompt changes directly affect token consumption and cost - our true cost of agentic coding breakdown shows how output length and model choice drive the bill.

Manage prompts like code

Repositories, pull requests, and release by push - prompt git built in.

Create an account → See Repositories