TOOL WIKI · OBSERVABILITY

AgentOps

Captures agent execution information through tracing and instrumentation.

Download example files Code + setup + checks in a ZIP
Jump to a section 10 sections

EXAMPLE USE CASE

Record a model run’s terminal success or failure

A developer needs evidence of what ran, which child operation failed, and how to turn that failure into a reproducible test.

Input
One provider request within an AgentOps session.
Expected output
A recorded request and a terminal Success/Fail state.
  • Success check: The session records the policy request and its terminal success/failure state.
  • Try a failure: Force a provider error and verify the session ends as Fail rather than remaining apparently successful.

Example scope: Actual managed telemetry around an inference call, not an evaluated full support agent.

Official reference · AgentOps

WHAT IT ISAgent observability toolkit
WHERE IT FITSObservability
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
inputprocessresultcheckoutputAgent runOne trace identityInstrumentationRedacted spans + eventsAgentOpsAgent observability toolkitInvestigationFollow a failed taskRegression datasetConfirmed failuresOperational decisionFix, release, or alert
  1. Propagate a trace identifier through models, retrieval, and tools.

  2. Capture meaningful timings and outcomes while excluding unnecessary content.

  3. Inspecting how model calls and tool actions combine into a run. Choose a consistent session and task identity model.

  4. Join parent-child spans and compare observed results with task expectations.

  5. Turn verified failures into repeatable evaluation cases.

  6. Use task success, error rates, latency, and cost to decide what to change.

    Result or stopping point
AgentOps

Inspecting how model calls and tool actions combine into a run. Choose a consistent session and task identity model.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

When to consider it

  • Inspecting how model calls and tool actions combine into a run.

A design decision to make

  • Choose a consistent session and task identity model.

Prerequisites and setup

  • Python 3.11+ and synthetic fixtures. Managed tracing sends the recorded data to the configured project.
Shell
python3 -m venv .venv
source .venv/bin/activate
pip install agentops openai
export AGENTOPS_API_KEY="YOUR_KEY"
export OPENAI_API_KEY="YOUR_KEY"
export OPENAI_MODEL="YOUR_ENABLED_MODEL"

Try a small integration

trace.py

Python · trace.py
import os
import agentops

agentops.init(os.environ["AGENTOPS_API_KEY"])
from openai import OpenAI
try:
    response = OpenAI().chat.completions.create(model=os.environ["OPENAI_MODEL"],
        messages=[{"role":"user","content":"Policy: returns are accepted within 30 days. Can an item be returned after 20 days? Answer briefly using only this policy."}])
    print(response.choices[0].message.content)
except Exception:
    agentops.end_session("Fail")
    raise
else:
    agentops.end_session("Success")

Run and check the result

Shell
python trace.py
  • The session records the policy request and its terminal success/failure state.
  • Instrumentation starts before client construction. This example calls a provider and sends its trace to AgentOps.

Common failures

  • No trace: check the project/region, credentials, collector protocol and exporter flush before changing instrumentation.
  • Avoid double instrumentation that produces duplicate model spans or conflicting trace providers.

Production decisions

  • Redact keys, private prompts, personal data and sensitive tool results before exporting telemetry. Configure sampling and retention.
  • Connect request, agent, model and tool spans with parent/child trace context. A successful span is not a quality or authorization verdict.

Keep exploring

An evaluation gate for agent releasesThe real cost of an agent run

Explore the same layer

LangfuseLangSmithArize PhoenixOpenTelemetry

Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.