Skip to main content
Code example for retrieving and using a Phoenix prompt

Pull and push prompt changes via Phoenix's Python and TypeScript Clients

With Phoenix as the backend, you can manage prompts in code with the Phoenix Python or TypeScript client SDKs. With the Phoenix client SDKs, you can:
  • Create and update prompts dynamically.
  • Pull prompt templates by name, version, or tag.
  • Format prompt templates with runtime variables and use them in your code. The SDKs have native support for OpenAI, Anthropic, Gemini, Vercel AI SDK, and more. You do not need a proprietary client.
  • Use tool calling and response formats, and execute the tools that the prompt defines. A Phoenix prompt contains more than the text and messages.
To use prompts in code, see Using a prompt.