Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.orq.ai/llms.txt

Use this file to discover all available pages before exploring further.

Already have an agent? Add a few lines of OpenTelemetry setup to start seeing full trace visibility and cost tracking in orq.ai.
1

Create your orq.ai account

Sign up for a free orq.ai account and set up your workspace.
2

Get your API key

Open Organization > API Keys in the AI Studio. Click Create API Key, give it a name, and copy it.Then open a terminal and run the command below, replacing your-api-key-here with the copied key. The code samples in the next steps read it from this environment variable.
export ORQ_API_KEY="your-api-key-here"
3

Connect your framework

Install the dependencies:
pip install orq-ai-sdk langchain langchain-openai langgraph
Call setup() once before defining the graph. Every node, tool call, and LLM step is then captured and shipped to orq.ai.
from orq_ai_sdk.langchain import setup

setup()

from typing import Annotated, Literal, TypedDict
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage
from langchain.tools import tool
from langgraph.graph import StateGraph, START
from langgraph.graph.message import add_messages
from langgraph.prebuilt import ToolNode

class State(TypedDict):
    messages: Annotated[list, add_messages]

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

tools = [get_weather]
llm   = ChatOpenAI(model="gpt-4o-mini", temperature=0).bind_tools(tools)

def weather_agent(state: State):
    return {"messages": [llm.invoke(state["messages"])]}

def route(state: State) -> Literal["tools", "__end__"]:
    last = state["messages"][-1]
    return "tools" if hasattr(last, "tool_calls") and last.tool_calls else "__end__"

graph = StateGraph(State)
graph.add_node("weather_agent", weather_agent)
graph.add_node("tools", ToolNode(tools))
graph.add_edge(START, "weather_agent")
graph.add_conditional_edges("weather_agent", route)
graph.add_edge("tools", "weather_agent")

app = graph.compile()
result = app.invoke({"messages": [HumanMessage(content="Weather in Tokyo?")]})
print(result["messages"][-1].content)
See the LangGraph Observability guide for streaming, tool tracing, and Control Tower asset capture.
4

View your traces

Run the agent and open Traces in the AI Studio. Every request will appear with model, latency, token counts, and cost. For agentic frameworks, individual tool calls and steps appear as child spans.
5

Analyze traces with MCP

Install the Orq MCP server in the editor or AI assistant, then ask the coding assistant:
Show me the 10 slowest traces from the last 24 hours and explain what might be causing the latency
The assistant queries the Orq MCP and returns an analysis like this:

Troubleshooting

  1. Confirm the variable is set: echo $ORQ_API_KEY
  2. Verify the key is active under Organization > API Keys
  3. Confirm the key is passed in the Authorization: Bearer header on your OTLP exporter, not as a query parameter
  1. Confirm your OTLP endpoint is set to https://my.orq.ai/v2/otel (or /v2/otel/v1/traces for exporters that require the full path)
  2. Check that the workspace in your API key matches the AI Studio workspace you are viewing
  3. Traces can take a few seconds to appear, wait 10 seconds and refresh

Annotate your traces

Label and review spans to build high-quality evaluation datasets from real production traffic.

Set up analytics

Track cost, latency, error rates, and token usage across models and deployments over time.

Run your first experiment

Use your traced data as a baseline to compare prompts, models, and configurations side by side.

Build your first agent

Build and deploy a native orq.ai agent with tools, memory, and full AI Studio management.