1. Create a Policy and API Keys
Create a policy in the Averta Dashboard, then create an Averta API key with that policy attached. You also need a normal OpenAI API key.2. Install Packages
3. Set Environment Variables
AVERTA_API_KEY from the environment. Pass a key in code only when you need to override the environment for a specific client.
4. Create a Quickstart File
5. Run It
What Happened
- The wrapper sent a request checkpoint to Averta before calling OpenAI.
- Averta used the policy attached to your API key to decide what should happen.
- If policy returned
block, the SDK would throw before the OpenAI request. - OpenAI generated a non-streaming final answer.
- The wrapper sent an output checkpoint to Averta before returning the response.
- The SDK generated
requestIdandtraceIdautomatically so decisions can be found in dashboard events.
Add Tools Next
When your agent passes tools, Averta can also restrict tool exposure before the provider sees the tool list and screen tool results before they return to the model.Next Steps
OpenAI quickstart
Add tools, request context, and decision logging to an OpenAI agent loop.
Anthropic quickstart
Use the same checkpoint model with Anthropic Messages.
Checkpoints
Understand each Averta decision point.
Policies
Create the policy that makes runtime enforcement active.
Events
Find the request and output decisions in the dashboard.