import langwatch
# Create base prompt
base_prompt = langwatch.prompts.create(
handle="customer-support-bot",
scope="PROJECT",
prompt="You are a helpful customer support agent. Help with: {{input}}",
inputs=[{"identifier": "input", "type": "str"}],
outputs=[{"identifier": "response", "type": "str"}]
)
# Create variant A (friendly tone) - captures version number
variant_a = langwatch.prompts.update(
"customer-support-bot",
scope="PROJECT",
prompt="You are a friendly and empathetic customer support agent. Use a warm, helpful tone. Help with: {{input}}"
)
# Create variant B (professional tone) - captures version number
variant_b = langwatch.prompts.update(
"customer-support-bot",
scope="PROJECT",
prompt="You are a professional and efficient customer support agent. Be concise and solution-focused. Help with: {{input}}"
)
# Store version numbers for A/B testing
versions = {
"base": base_prompt.version,
"friendly": variant_a.version,
"professional": variant_b.version
}
print("Version numbers:", versions)