OpenAI Agents
OpenAI released an agentic framework aptly named Agents. What sets this framework apart from others is that it provides a rich set of core building blocks:
- Models: Support for all OpenAI Models
- Tools: Similar function calling functionality than the one available when using the OpenAI models directly
- Knowledge and Memory: Seamless integration with OpenAI’s vector store and Embeddings Anthropic
- Guardrails: Run Guardrails checks in parallel to your agent execution which allows for secure execution without slowing down the total agent execution.
Opik’s integration with Agents is just one line of code and allows you to analyse and debug the agent execution flow in our Open-Source platform.

Getting started
First, ensure you have both opik
and openai-agents
packages installed:
In addition, you can configure Opik using the opik configure
command which will prompt you for the correct local server address or if you are using the Cloud platform your API key:
Enabling logging to Opik
To enable logging to Opik, simply add the following two lines of code to your existing OpenAI Agents code:
The Opik integration will automatically track both the token usage and overall cost of each LLM call that is being made. You can also view this information aggregated for the entire agent execution.
Further improvements
OpenAI Agents is still a relatively new framework and we are working on a couple of improvements:
- Improved rendering of the inputs and outputs for the LLM calls as part of our
Pretty Mode
functionality - Improving the naming conventions for spans
- Adding the agent execution input and output at a trace level
If there are any additional improvements you would like us to make, feel free to open an issue on our GitHub repository.