Skip to main content
Control Tower gives you real-time visibility into every AI agent running in your workspace: costs, token usage, errors, and performance, without manual instrumentation. You connect your framework once, send traces via OpenTelemetry, and Orq.ai does the rest.

Get Started

This guide uses OpenAI Agents to walk you through the setup. If you are using a different framework, see Supported Agents below.
1

Get your API key

Your API key authenticates trace exports to Orq.ai. To find it:
  1. Open the Orq.ai dashboard
  2. Go to Workspace Settings → API Keys
  3. Copy an existing key or create a new one
Store it as an environment variable:
export ORQ_API_KEY="<your-api-key>"
Never commit your API key to source control. Use environment variables or a secrets manager.
2

Install dependencies

pip install orq-ai-sdk openai-agents \
            opentelemetry-sdk opentelemetry-instrumentation opentelemetry-exporter-otlp
3

Configure the tracer

Set up the OTLP exporter and instrument OpenAI Agents before running any code:
Python
import os
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from orq_ai_sdk.openai_agents_instrumentation import OpenAIAgentsInstrumentor

os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://api.orq.ai/v2/otel"
os.environ["OTEL_EXPORTER_OTLP_HEADERS"]  = f"Authorization=Bearer {os.environ['ORQ_API_KEY']}"

tracer_provider = TracerProvider()
tracer_provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))

OpenAIAgentsInstrumentor().instrument(tracer_provider=tracer_provider)
4

Run your agent

Any OpenAI agent you run will now automatically send traces to Control Tower:
Python
from agents import Agent, Runner, function_tool

@function_tool
def get_weather(location: str) -> str:
    """Get weather for a location."""
    data = {"tokyo": "Sunny, 22°C", "paris": "Cloudy, 15°C"}
    return data.get(location.lower(), f"No data for {location}")

agent = Agent(
    name="Weather Assistant",
    instructions="Use get_weather to answer weather questions.",
    tools=[get_weather],
    model="gpt-4o",
)

result = Runner.run_sync(agent, "What's the weather in Tokyo?")
print(result.final_output)
Orq.ai captures: agent/Weather Assistant, tool/get_weather, model/gpt-4o.
5

Verify in Control Tower

Open the Assets page. Agents, tools, and models from your traces will appear automatically under their respective tabs.

Next Steps

Supported Agents