Opik-openclaw is a TypeScript plugin that connects OpenClaw, an AI agent framework, with Opik, a platform for observability of large language models (LLMs). It runs inside the OpenClaw Gateway process, capturing detailed traces of agent activity such as LLM request/response spans, sub-agent operations, tool calls with their inputs and outputs, metadata about runs, and usage and cost data. This plugin is designed to provide transparency and insights into the behavior and performance of AI agents built on OpenClaw.
Architecture and purpose of opik-openclaw
At its core, opik-openclaw acts as a bridge between OpenClaw and Opik by hooking into OpenClaw’s plugin extension API. OpenClaw is an extensible AI agent framework that supports running agents which invoke LLMs, tools, and sub-agents. By integrating as a plugin, opik-openclaw intercepts execution traces as they happen inside the OpenClaw Gateway process.
The plugin is implemented in TypeScript and requires Node.js version 22.12.0 or higher, along with OpenClaw version 2026.3.2 or newer. It exports comprehensive trace data to Opik’s backend, including spans for each LLM request and response, sub-agent runs, and tool invocations with their inputs and outputs. This allows developers and operators to monitor the chain of calls within agents, understand resource usage, and analyze costs associated with LLM calls.
Configuration is flexible: it can be done via environment variables or through OpenClaw’s plugin configuration system. The plugin supports both production installation via ClawHub and npm-based workflows suited for active development.
Technical strengths and tradeoffs
The most technically interesting aspect of opik-openclaw is how it integrates seamlessly with OpenClaw’s extension API to capture detailed observability data without disrupting the normal agent execution flow. This involves intercepting spans at multiple levels of the agent’s lifecycle, including nested sub-agent operations and tool calls.
By exporting structured trace data, the plugin enables a rich observability experience that goes beyond simple logging. It captures metadata and usage metrics that can inform cost optimization and performance tuning.
The codebase is written in TypeScript, which enhances developer experience through strong typing and tooling support. The plugin also includes isolated end-to-end testing capabilities that simulate live gateway operation without affecting existing OpenClaw configurations.
A tradeoff worth noting is the dependency on recent versions of OpenClaw (>=2026.3.2) and Node.js (>=22.12.0), which may limit adoption in environments running older software stacks. Additionally, the observability data volume will grow with agent complexity, so teams need to consider storage and processing implications on Opik’s backend.
Quick start with opik-openclaw
To get started with the plugin, you need OpenClaw version 2026.3.2 or later, Node.js 22.12.0+, and npm 10 or newer.
First, install the plugin inside your OpenClaw environment:
openclaw plugins install clawhub:@opik/opik-openclaw
For older OpenClaw versions (22.12.0), use npm commands to build and test the plugin before installation:
npm ci
npm run build
npm run lint
npm run typecheck
npm run test
npm run smoke
The package includes built JavaScript for runtime loading in OpenClaw and retains TypeScript source for development purposes. It supports explicit compatibility metadata required by ClawHub.
For optional live end-to-end testing of the gateway integration, run:
npm run test:live
This uses an isolated OpenClaw home directory to avoid interfering with existing configurations. Environment variables like OPIK_API_KEY and OPENAI_API_KEY must be set for authentic model calls and Opik API access.
who should consider opik-openclaw
opik-openclaw is relevant for teams building AI agents with OpenClaw who want detailed observability into their agents’ LLM calls, sub-agent workflows, and tool usage. It provides a practical way to collect trace data and cost metrics, which helps monitor, debug, and optimize AI workflows.
The plugin’s reliance on recent OpenClaw and Node.js versions and the need for Opik backend access are considerations when planning adoption. It is not a standalone observability tool but rather a tightly integrated plugin that requires OpenClaw.
In summary, opik-openclaw offers a well-structured, developer-friendly approach to bridging AI agent frameworks with observability platforms. Its design and implementation demonstrate how to build deep tracing into multi-agent AI systems, which is worth understanding even if you don’t adopt OpenClaw or Opik directly.
Related Articles
- Open Design: repurposing coding-agent CLIs into a modular local-first design engine — Open Design turns 12 coding-agent CLIs into a deterministic design engine with 31 composable skills and 72+ design syste
- OpenHands: Modular architecture for flexible AI agent development — OpenHands offers a modular Python platform to build and deploy AI agents with SDK, CLI, GUI, and cloud options. It suppo
- Ollama: a unified CLI and API platform for local large language models — Ollama simplifies running and managing open-source large language models locally with a unified CLI and REST API, suppor
→ GitHub Repo: comet-ml/opik-openclaw ⭐ 581 · TypeScript