Opencode Langsmith Tracing banner
Dramalf Dramalf

Opencode Langsmith Tracing

AI community

Description

LangSmith tracing plugin for opencode — captures sessions, LLM calls, tool calls, reasoning, and context compaction. Trace taxonomy compatible with langsmith-claude-code-plugins.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

LangSmith Tracing Plugin for opencode

[![npm version](https://img.shields.io/npm/v/opencode-langsmith-tracing.svg?logo=npm&logoColor=white)](https://www.npmjs.com/package/opencode-langsmith-tracing) [![npm downloads](https://img.shields.io/npm/dm/opencode-langsmith-tracing.svg?logo=npm&logoColor=white)](https://www.npmjs.com/package/opencode-langsmith-tracing) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-3178C6?logo=typescript&logoColor=white)](./tsconfig.json) [![Node >=20](https://img.shields.io/badge/Node-%3E%3D20-339933?logo=node.js&logoColor=white)](./package.json)

**Full observability for [opencode](https://opencode.ai) sessions.** Stream every conversation turn, LLM call, tool call, reasoning step, token usage, cost, and context compaction to [LangSmith](https://smith.langchain.com). Trace taxonomy compatible with the official [`langsmith-claude-code-plugins`](https://github.com/langchain-ai/langsmith-claude-code-plugins), so existing LangSmith dashboards and evaluators built for Claude Code work unchanged.

**Keywords**: opencode tracing · LangSmith tracing for opencode · opencode plugin · opencode observability · LLM tracing · agent tracing · Claude Code equivalent for opencode.

Quick start (30 seconds)

// opencode.json (project root, or ~/.config/opencode/opencode.json globally)
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-langsmith-tracing"]
}
# .opencode/langsmith.env (auto-loaded by the plugin; gitignore it!)
LANGSMITH_TRACING=true
OC_LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OC_LANGSMITH_PROJECT=my-opencode

That's it — start `opencode` and every conversation will appear in your LangSmith project in real time.

Tested with opencode `1.4.x`.

Trace hierarchy

OpenCode Turn                (chain)  ← one per user prompt
├── OpenCode Assistant       (llm)    ←