Skip to main content
This guide covers common patterns for integrating Dome guardrails into your agent, including sync/async usage, error handling, and production best practices. You will learn how to perform:
  • Basic integration pattern: a standard pattern that wraps your agent with input and output guards.
  • Async integration pattern: async/await pattern for async applications.
  • Work with scan results: how to interpret and use scan results.
  • Use separate guardrails: how to use input and output guardrails separately.
  • Custom block messages: how to override default block messages.
  • Error handling: how to handle guard failures gracefully.
  • Streaming responses: how to handle streaming responses and guard the complete response.
  • Multi-turn conversations: how to handle multi-turn conversations.
  • RAG applications: how to handle RAG applications (guard both retrieval context and responses).
  • Tool-using agents: how to handle tool-using agents (guard both tool inputs and outputs).

Work in Progress

The programmatic protection capabilities and Dome integrations are currently in private preview and subject to change.

Next Steps

Configure Guardrails

Detailed guard configuration

Custom Detectors

Build custom detection methods

Observability

OpenTelemetry integration
Last modified on April 20, 2026