Traces and observability
Follow model calls, tool execution, usage and turn outcomes with Rebyte execution traces.
On this page
View traces in PlatformWhat is recordedInspect execution through the APIExport session tracesOpenAI compatibilityRebyte supports execution tracing for the Agents API through its Langfuse integration. Traces connect a Session's model calls and tool activity to individual Turns, so you can investigate results, failures and latency.
View traces in Platform
- Open Platform and select the organization that owns your API Agent.
- Open the Agent to see its execution traces across Sessions.
- Open a Session to narrow the trace view to that conversation, or open a Turn for its individual execution trace.
The embedded trace view uses your Rebyte organization access. If it asks you to sign in, use the sign-in action in the trace panel. An API key alone does not grant browser access to the trace dashboard; use trace export for programmatic access.
What is recorded
| Record | What you can inspect |
|---|---|
| Turn | Final status, start and end times, model-call count, recorded token usage, model cost and errors. |
| Model call | Model observations linked to the executing Turn. |
| Server tool call | Tool name, arguments, call ID, result and failure status. |
| Correlation | Organization, Agent, Session and Turn identifiers. |
Each Turn has its own trace identity. Reusing an Agent across Sessions does not combine their execution traces. Turn duration measures the persisted lifetime from creation to completion; it can include queueing and waiting for client function results, rather than only active model execution. Your application's client function runs outside Rebyte, so its internal execution is not automatically instrumented.
Tracing runs on the Rebyte service; API consumers do not need to install a Langfuse SDK or pass a tracing flag when creating an Agent or Session. Use the trace view to inspect execution, then link your assessment to its Turn ID.
Inspect execution through the API
Use Session, Turn and Item IDs to correlate your application logs with the trace view. You can also retrieve persisted outcomes with the official OpenAI client configured for Rebyte:
const turns = await client.beta.agents.sessions.turns.list(sessionId);
for (const turn of turns.data) {
console.log({
sessionId,
turnId: turn.id,
status: turn.status,
usage: turn.usage,
error: turn.error,
});
}
See Observability and usage for Items, live events and token usage.
Export session traces
GET https://api.rebyte.ai/v1/agents/sessions/{session_id}/traces returns a page of
Turn traces as OpenTelemetry Protocol (OTLP) JSON, matching OpenAI's
session trace export.
Use an organization API key with the tasks:read scope; no separate enablement is required.
curl --fail-with-body \
"https://api.rebyte.ai/v1/agents/sessions/${REBYTE_SESSION_ID}/traces?limit=20&order=asc" \
-H "Authorization: Bearer ${REBYTE_API_KEY}" \
-H "OpenAI-Beta: agents=v1" \
--output trace-page.json && \
jq '{resourceSpans: [.data[].otlp.resourceSpans[]]}' trace-page.json > traces.otlp.json
{
"object": "list",
"data": [{
"id": "turn_...",
"object": "agent.session.trace",
"session_id": "sess_...",
"scenario_id": "scn_...",
"model_version_id": null,
"created_at": 1790640000,
"otlp": { "resourceSpans": [{ "resource": { "attributes": [...] }, "scopeSpans": [{ "scope": { "name": "rebyte.agents_api" }, "spans": [...] }] }] }
}],
"first_id": "turn_...", "last_id": "turn_...", "has_more": false
}
Each entry is one finished Turn; id is the Turn ID and the pagination cursor. When
has_more is true, pass last_id as after with the same order. limit accepts
1–100 (default 20) and order defaults to desc. A response is limited to 16 MiB; if a
page exceeds it, request fewer traces. Send the combined payload to any OTLP/HTTP
endpoint using that provider's authentication.
A trace is published after its Turn finishes. Turns that are still running, or whose
trace has not been ingested yet, are skipped; export again later for a complete
history. To export an Agent's traces, list its Sessions with agent_id and export
each Session.
Spans use Langfuse's OpenTelemetry attribute names (langfuse.observation.type,
langfuse.observation.input, langfuse.observation.output,
langfuse.observation.metadata.*, langfuse.observation.usage_details) plus
gen_ai.request.model and gen_ai.usage.* token counts. The resource carries
rebyte.agent_id, rebyte.session_id and rebyte.turn_id. Bound Sessions also
include rebyte.scenario_id; each trace resource exposes nullable scenario_id.
See Scenarios for grouping results across Sessions.
Managed-model traces also expose nullable model_version_id; spans for a managed
version carry the rebyte.model_version_id resource attribute. It identifies the
version pinned to that Turn even after the model family publishes a newer version.
Failed spans have OTLP
status code 2 with the error message. Exports include token usage but not model
cost; Rebyte billing is reported separately.
OpenAI compatibility
OpenAI's managed Agents API enables tracing by default and presents turn traces
in its dashboard. Rebyte's export endpoint follows the same request, pagination and
response envelope. Differences: Rebyte requires the tasks:read scope instead of
api.traces.read, export needs no organization opt-in, and span attributes follow
Langfuse conventions rather than OpenAI's internal span schema.
The separate OpenAI Agents SDK is a different product; its application-side tracing configuration should not be assumed to apply to the managed Agents API.