The Prompt Library is the central place to manage every prompt your agent depends on. Version them, iterate on new versions from the Opik UI or the SDK, and link the exact version that produced a trace.
When prompts are hardcoded, every change requires a code change to update. There is no history of what changed, no way to roll back quickly, and no clean way to compare alternative versions.
The Prompt Library gives you version control for the prompts that drive your agent. Push them to Opik once, and from there you can compare versions, fetch a specific one, or always follow the latest.
v1, v2, v3, … — Each change creates a new immutable, sequentially numbered version. Fetch a specific one with the version selector (e.g. "v3"), or omit it to fetch the most recent.{{variable}} substitution.create_prompt / create_chat_prompt to send your prompts to Opik. This becomes v1.get_prompt / get_chat_prompt from inside a tracked function. The SDK returns the requested version and links it to the trace automatically.version, the agent picks up the new version on its next fetch — otherwise update your code to point at the new version name.