Skip to main content

Git-first prompt registry + CI evals + lightweight runtime SDK (ivault).

Project description

InstructVault logo

InstructVault (ivault)

PyPI version Python versions CI Release

Version prompts in Git, test them in CI, load them locally at runtime.

InstructVault is a Git-first prompt-as-code toolkit for engineering teams. Prompts live as YAML/JSON files, prompt changes go through PRs and CI, releases are pinned by tag or SHA, and apps render prompts from a local repo checkout or bundle artifact.

30-second try

pip install instructvault
ivault init
ivault validate prompts
ivault render prompts/hello_world.prompt.yml --vars '{"name":"Ava"}'

PyPI: https://pypi.org/project/instructvault/
GitHub: https://github.com/05satyam/instruct_vault

Why Teams Use It

  • Git-native governance: review prompt changes with the same PR, CODEOWNERS, and branch protection flow as code.
  • CI checks for prompts: validate specs, run deterministic evals, and emit JSON or JUnit reports.
  • Reproducible releases: deploy prompt versions by tag, SHA, or build-time bundle.
  • Local runtime: no hosted registry call is required to fetch prompts at inference time.
  • Framework agnostic: output is plain {role, content} messages for any LLM stack.

Tiny Example

Create a prompt:

# prompts/support_reply.prompt.yml
spec_version: "1.0"
name: support_reply
modelParameters:
  model: gpt-4o
  temperature: 0.3
variables:
  required: [ticket_text]
  optional: [customer_name]
messages:
  - role: system
    content: "You are a concise, empathetic support engineer."
  - role: user
    content: |
      Customer: {{ customer_name | default("there") }}
      Ticket: {{ ticket_text }}
tests:
  - name: includes_ticket
    vars:
      ticket_text: "My order arrived damaged."
    assert:
      contains_all: ["Ticket:"]

Render it in your app:

from instructvault import InstructVault

vault = InstructVault(repo_root=".")
messages = vault.render(
    "prompts/support_reply.prompt.yml",
    vars={"ticket_text": "My order is delayed", "customer_name": "Ava"},
    ref="prompts/v1.0.0",
)

CLI

ivault init
ivault validate prompts
ivault render prompts/support_reply.prompt.yml --vars '{"ticket_text":"Need refund"}'
ivault eval prompts/support_reply.prompt.yml --report out/report.json --junit out/junit.xml
ivault diff prompts/support_reply.prompt.yml --ref1 prompts/v1.0.0 --ref2 HEAD
ivault bundle --prompts prompts --out out/ivault.bundle.json --ref prompts/v1.0.0

Where It Fits

Approach Versioned in Git CI-friendly Local runtime Hosted dependency
Prompt strings inside app code Partial Partial Yes No
Prompts in a database or admin UI Usually not Usually not No Usually yes
Hosted prompt registry/platform Varies Varies Usually no Yes
InstructVault Yes Yes Yes No

System Flow

flowchart LR
  A[Prompt files] --> B[PR review]
  B --> C[CI validate + eval]
  C --> D[Tag, SHA, or bundle]
  D --> E[App runtime]
  E --> F[Rendered messages]

Install For Development

git clone https://github.com/05satyam/instruct_vault.git
cd instruct_vault
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
python -m pytest

Docs

  • docs/dropin_guide.md - add InstructVault to an existing repo
  • docs/cookbooks.md - OpenAI, LangChain, LlamaIndex, RAG, policies, bundles
  • docs/why_instructvault.md - when to use InstructVault vs other approaches
  • docs/spec.md - prompt spec and validation rules
  • docs/stability.md - stable surfaces and compatibility expectations
  • docs/ci.md - CI setup and reports
  • docs/governance.md - CODEOWNERS and release guardrails
  • docs/roadmap.md - roadmap, in-scope, and out-of-scope work
  • docs/performance.md - performance principles and benchmarking guidance
  • docs/playground.md - optional local/hosted playground

Examples

  • examples/ivault_demo_template/README.md
  • examples/llamaindex_demo/README.md
  • examples/notebooks/instructvault_colab.ipynb
  • examples/notebooks/instructvault_rag_colab.ipynb
  • examples/notebooks/instructvault_openai_colab.ipynb
  • examples/policies/policy_example.py
  • examples/policies/policy_pack.py

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instructvault-0.4.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instructvault-0.4.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file instructvault-0.4.0.tar.gz.

File metadata

  • Download URL: instructvault-0.4.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for instructvault-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a113cdc9aed80fbc5093247351010e246b1ff1d332b6cebd69cdd97d11156395
MD5 a42d3fc77b58d0f168fcc4757d4ee417
BLAKE2b-256 c40da5bbc04928ddae00cb1531ab8715a4cfd2a2e0000eb4f5b32d866259ec5d

See more details on using hashes here.

File details

Details for the file instructvault-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: instructvault-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for instructvault-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7246d9560c908516f6a7f9a00bdb3f9543f62b86a4c7652ca496f860eb16c88
MD5 504acb83f848a57ac1ae6a9530395e23
BLAKE2b-256 75e905e49fd7143e9e74bc7015fb0dfff835d4ad550c607f934c98436e891bd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page