Introducing opensmith: A Local-First, Open-Source Alternative to LangSmith
Observability is a cornerstone of developing reliable Large Language Model (LLM) applications. While tools like LangSmith have set the standard for tracing and debugging complex LLM pipelines, they often come with a significant trade-off: a heavy reliance on cloud-hosted infrastructure and account requirements. For developers who prioritize data privacy, local development, or simply want to avoid the friction of cloud setup, these barriers can be restrictive.
Enter opensmith, a new open-source, local-first LLM pipeline tracer designed to bring observability directly to the developer's machine. By removing the cloud from the equation, opensmith allows developers to inspect traces without accounts, hosted services, or complex Docker configurations.
The Local-First Philosophy
The primary motivation behind opensmith is the removal of cloud-dependency. As the author, shivnathtathe, noted on Hacker News:
I built this because LangSmith needs a cloud account to see my own traces.
By utilizing a local SQLite database (stored by default at ~/.opensmith/traces.db), opensmith ensures that no trace data ever leaves the user's machine. This approach not only enhances privacy and security but also simplifies the development loop by removing the need for an internet connection to view debugging data.
Core Features and Implementation
opensmith is designed for ease of integration, offering three primary ways to instrument Python LLM pipelines:
1. The @trace Decorator
For granular control, developers can wrap any Python function with the @trace decorator. This captures the inputs and outputs of the function, making it easy to track the flow of data through a RAG (Retrieval-Augmented Generation) pipeline or a complex agentic workflow.
2. Context Managers
For blocks of code that don't fit neatly into a single function, the trace context manager allows for manual logging of specific events or variables within a pipeline.
3. Zero-Code autopatch()
Perhaps the most powerful feature for rapid prototyping is autopatch(). This function allows opensmith to automatically instrument popular LLM and vector database backends without requiring manual changes to the business logic.
Currently, supported backends include:
- LLMs: OpenAI, Anthropic, LiteLLM
- Vector Databases: Qdrant, ChromaDB, Pinecone
Analyzing Traces: Dashboard and CLI
Tracing is only useful if the data is easily accessible. opensmith provides two primary ways to interact with the captured data:
The Local Dashboard
By running opensmith ui, developers launch a local dashboard at http://localhost:7823. This provides a visual interface to explore the traces, inspect the steps of a pipeline, and analyze the performance of LLM calls.
The Command Line Interface (CLI)
For those who prefer the terminal, the CLI offers several utility commands:
opensmith traces: Lists recent traces.opensmith stats: Provides aggregate statistics on traces, steps, tokens, and costs.opensmith clear: Wipes the local database to start fresh.
Configuration and Flexibility
opensmith is highly configurable via an opensmith.json file in the current working directory. Developers can specify a custom database path, toggle console mode (which prints results to the terminal in real-time), and define which backends should be autopatched or excluded.
Conclusion
While still in its alpha stage (v0.1.2), opensmith represents a shift toward more accessible, private, and lightweight LLM observability. By focusing on a "no cloud, no setup" experience, it provides a streamlined alternative for developers who want the power of LangSmith-style tracing without the overhead of cloud accounts and data egress.