Connect your application to Phoenix with the register function:
Run Guardrails
From here, you can run Guardrails as normal:
from guardrails import Guardfrom guardrails.hub import TwoWordsimport openaiguard = Guard().use( TwoWords(),)response = guard( llm_api=openai.chat.completions.create, prompt="What is another name for America?", model="gpt-5.6-terra", max_tokens=1024,)print(response)
Observe
Now that you have tracing setup, all invocations of underlying models used by Guardrails (completions, chat completions, embeddings) will be streamed to your running Phoenix for observability and evaluation. Additionally, Guards will be present as a new span kind in Phoenix.