Introduction
OpenAI Agents SDK enables the development of complex AI agents with tools, planning, and memory capabilities. Obiguard enhances OpenAI Agents with observability, reliability, and production-readiness features. Obiguard turns your experimental OpenAI Agents into production-ready systems by providing:- Complete observability of every agent step, tool use, and interaction
- Cost tracking and optimization to manage your AI spend
- Access to 200+ LLMs through a single integration
- Guardrails to keep agent behavior safe and compliant
OpenAI Agents SDK Official Documentation
Installation & Setup
Install the required packages
Generate API Key
Connect to OpenAI Agents
- Set a client that applies to all agents in your application
- Use a custom provider for selective Obiguard integration
- Configure each agent individually
Configure Obiguard Client
Getting Started
Let’s create a simple question-answering agent with OpenAI Agents SDK and Obiguard. This agent will respond directly to user messages using a language model:- We set up Obiguard as the global client for OpenAI Agents SDK
- We create a simple agent with instructions and a model
- We run the agent synchronously with a user query
- We print the final output
Integration Approaches
There are three ways to integrate Obiguard with OpenAI Agents SDK, each suited for different scenarios:- Global Default Client
- ModelProvider with RunConfig
- Per-Agent Model Object
End-to-End Example
Research Agent with Tools: Here’s a more comprehensive agent that can use tools to perform tasks.Production Features
1. Enhanced Observability
Obiguard provides comprehensive observability for your OpenAI Agents, helping you understand exactly what’s happening during each execution.- Traces
- Logs
- Metrics & Dashboards
2. Guardrails for Safe Agents
Guardrails ensure your OpenAI Agents operate safely and respond appropriately in all situations. Why Use Guardrails? OpenAI Agents can experience various failure modes:- Generating harmful or inappropriate content
- Leaking sensitive information like PII
- Hallucinating incorrect information
- Generating outputs in incorrect formats
- Detect and redact PII in both inputs and outputs
- Filter harmful or inappropriate content
- Validate response formats against schemas
- Check for hallucinations against ground truth
- Apply custom business logic and rules
Learn More About Guardrails
3. Tracing
Obiguard provides an opentelemetry compatible backend to store and query your traces. You can trace your OpenAI Agents using any OpenTelemetry compatible tracing library.Tool Use in OpenAI Agents
OpenAI Agents SDK natively supports tools that enable your agents to interact with external systems and APIs. Obiguard provides full observability for tool usage in your agents:Set Up Enterprise Governance for OpenAI Agents
Why Enterprise Governance? If you are using OpenAI Agents inside your orgnaization, you need to consider several governance aspects:- Cost Management: Controlling and tracking AI spending across teams
- Access Control: Managing which teams can use specific models
- Usage Analytics: Understanding how AI is being used across the organization
- Security & Compliance: Maintaining enterprise security standards
- Reliability: Ensuring consistent service across all users
Create guardrail policy
Create Virtual Key
Enterprise Features Now Available
OpenAI Agents now has:- Departmental budget controls
- Model access governance
- Usage tracking & attribution
- Security guardrails
- Reliability features
Frequently Asked Questions
How does Obiguard enhance OpenAI Agents?
How does Obiguard enhance OpenAI Agents?
Can I use Obiguard with existing OpenAI Agents?
Can I use Obiguard with existing OpenAI Agents?
Does Obiguard work with all OpenAI Agents features?
Does Obiguard work with all OpenAI Agents features?
How does Obiguard handle streaming in OpenAI Agents?
How does Obiguard handle streaming in OpenAI Agents?
How do I filter logs and traces for specific agent runs?
How do I filter logs and traces for specific agent runs?
agent_name, agent_type, or session_id to easily find and analyze specific agent executions.Can I use my own API keys with Obiguard?
Can I use my own API keys with Obiguard?
Resources
OpenAI Agents Docs
Official OpenAI Agents SDK documentation
Agent Examples
Example implementations for various use cases
Book a Demo
Get personalized guidance on implementing this integration

