← AgentShield
Integration
AgentShield for OpenAI
Track OpenAI API costs per call, monitor token usage, detect anomalies on your GPT-4 and GPT-3.5 agents.
Use case
OpenAI Assistants API, Chat Completions, and function calling
Quick setup
import agentshield
from openai import OpenAI
shield = agentshield.init(api_key="your-key")
client = shield.wrap_openai(OpenAI())
# All calls now tracked automatically
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": prompt}]
)