OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Evaluation & Observability

Monocle

Monocle is an open-source Python framework for tracing and testing generative AI applications and agents. Built on OpenTelemetry, it uses a GenAI-focused metamodel and instrumentation adapters to capture activity such as LLM calls, agent runs, tool use, retrieval queries and vector operations. Its repository also includes pytest-based tools for checking application behavior through traces.

Independent OpenViST project profile, based on linked sources.

Monocle — OpenViST project profile in AI Evaluation & Observability.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Monocle when a Python GenAI workflow needs operation-level traces for debugging or when tests should examine execution traces rather than only comparing inputs and outputs.

Who it is for

  • Python developers building generative AI applications or agents.
  • Platform and infrastructure engineers connecting GenAI telemetry to OpenTelemetry systems.
  • Teams adding trace-based checks for agent and tool behavior to CI workflows.

Documented uses

  • Inspect connected traces of model calls, agent runs, tool invocations and retrieval activity.
  • Export GenAI-specific telemetry as local JSON or route OTLP-compatible traces to an existing observability backend.
  • Create pytest-based checks that assert on trace events and error states.
Before you choose

Requirements & limits

The repository describes Monocle as open source and displays an Apache-2.0 license.

  • The repository identifies the implementation as Python; the documented setup installs monocle_apptrace.
  • Named instrumentation integrations include LangChain, LlamaIndex, Haystack and Google ADK; support for a specific application should be checked against its framework and provider.
  • Default trace export is JSON under a local ./monocle directory; the project also describes OTLP-compatible traces and other export options.
  • Trace-based tests are provided separately in monocle-test-tools and are built on pytest.
  • The project describes OpenTelemetry integration, but the evidence does not demonstrate configuration with a particular backend.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install and initialize Monocle telemetry

Add Monocle telemetry initialization to a Python GenAI application.

Before you start

  • A Python GenAI application using a framework supported by Monocle.
  • Python package installation access.

Steps

  1. Install the package with the command below.

    Documented command
    pip install monocle_apptrace
  2. Import setup_monocle_telemetry from monocle_apptrace.

  3. Call setup_monocle_telemetry(workflow_name="your_workflow_name") in the application.

Expected outcome

Monocle configures OpenTelemetry and its metamodel; supported frameworks can be automatically instrumented. The repository says the default export is JSON trace files under `./monocle`.

Guide limitations

  • Instrumentation adapters are documented for supported frameworks; compatibility with a specific application is not demonstrated.
  • This guide covers installation and initialization, not running or validating an application.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
monocle2ai/monocle · Official homepage title · retained in its source language