Introduction
Laminar is an open-source observability platform designed specifically for AI agents, addressing the unique challenges of monitoring and debugging complex agent workflows. Released in 2024 under the Apache 2.0 license, it is built with TypeScript and Rust, combining developer-friendly interfaces with high-performance backend systems. The platform is self-hostable via Docker, offering flexibility for teams to deploy it in environments ranging from local development to production clusters.
The core motivation behind Laminar is to provide a comprehensive solution for tracing, analyzing, and evaluating AI agent behavior. Unlike traditional observability tools, it integrates deeply with agent frameworks and large language model (LLM) providers, capturing not just LLM interactions but also tool calls, sub-agent workflows, and even browser sessions. This holistic approach ensures that every aspect of an agent’s execution is visible, traceable, and analyzable.
Laminar’s architecture is optimized for performance, particularly for long-running agents. It achieves a 20x reduction in trace storage through intelligent deduplication of repeated messages, a common issue in agent traces where the same context is repeatedly sent to LLMs.
The platform supports a wide range of agent frameworks and LLM providers, including Vercel AI SDK, Browser Use, Stagehand, LangChain, OpenAI, Anthropic, Gemini, and Azure AI services. Additionally, Laminar provides both a managed cloud service and self-hosted options, catering to organizations with varying infrastructure requirements and compliance needs.
How It Works
Laminar operates on three primary pillars: tracing, signals, and evaluations, each serving a distinct but interconnected role in observability.
Tracing
It captures every interaction within an agent’s execution, including LLM calls, tool invocations, and control flow. The platform uses an OpenTelemetry-native SDK, allowing developers to instrument their agents with minimal effort—often just a single line of code.
Traces are stored efficiently using a deduplication technique that identifies and stores only unique messages within a trace. This approach reduces storage requirements significantly, especially for long-running agents where the same context is repeatedly referenced. The deduplication process is transparent to users; traces are reconstructed on demand, ensuring that the data presented in the UI or via APIs is identical to the original execution.
Laminar’s tracing capabilities extend beyond basic logging. Additionally, the platform integrates with browser-based agents, capturing session data alongside traditional LLM interactions.
Signals
Signals are Laminar’s mechanism for detecting and analyzing unexpected behaviors or failures in agent runs. Unlike traditional alerting systems, Signals are defined in plain English, allowing developers to specify conditions such as ‘agent is stuck in a loop’ or ‘tool call failed without retry.’ Laminar continuously monitors agent runs and triggers alerts in Slack or other notification channels when these conditions are met.
Signals work by analyzing traces in real-time and clustering similar failures into distinct patterns. This clustering provides a high-level overview of recurring issues, helping teams prioritize debugging efforts.
The Signals system is extensible, allowing teams to define custom conditions tailored to their specific use cases.
Evaluations
The platform includes an unopinionated SDK and CLI for running evaluations locally or as part of a CI/CD pipeline.
Laminar’s evaluation framework supports dataset creation and annotation, enabling teams to build labeled datasets for fine-tuning or benchmarking. These datasets can be derived from production traces, ensuring that evaluations are grounded in real-world usage patterns.
Evaluations are tightly integrated with tracing and signals. For instance, a failed signal can automatically trigger the creation of an evaluation dataset, allowing teams to validate fixes or iterate on improvements with confidence. This end-to-end workflow ensures that observability and evaluation are seamlessly connected, reducing the friction in debugging and optimization.
Use Cases
Laminar is designed to address the observability needs of teams developing and deploying AI agents at scale. Its features are particularly valuable in scenarios where agents interact with complex environments, such as web browsers, APIs, or other autonomous systems.
Debugging Agent Failures
One of the primary use cases for Laminar is debugging agent failures. The platform’s tracing capabilities provide a detailed transcript of each agent run, including every LLM call, tool invocation, and decision point.
They can inspect the inputs and outputs of each LLM call, identify incorrect assumptions, or spot missing tool interactions. This capability is particularly useful for long-running agents, where debugging can be challenging due to the volume of data generated.
Monitoring Agent Performance
The platform’s dashboards allow developers to visualize these metrics over time, identifying trends or anomalies that may indicate performance issues.
The platform also supports custom SQL queries, giving teams the flexibility to analyze traces using their own metrics or dimensions. This capability is useful for teams with specific performance requirements or compliance needs.
Evaluating Agent Behavior
These evaluations can be run automatically as part of a CI/CD pipeline, ensuring that new changes do not introduce regressions.
By comparing evaluation results across different agent versions, teams can measure progress and identify areas for improvement.
Browser Agent Observability
Laminar extends its observability capabilities to browser-based agents, capturing session data alongside traditional LLM interactions. This is particularly useful for agents that interact with web applications, where understanding the sequence of actions and their outcomes is critical.
Cost Optimization
LLM-based agents can incur significant costs, particularly when running long or complex workflows.
Additionally, Laminar’s trace compression reduces storage costs, making it feasible to retain traces for longer periods without incurring prohibitive expenses. This long-term retention is valuable for teams that need to analyze historical agent behavior or debug intermittent issues.
Key Features & Capabilities
The platform’s features are built to address the unique challenges of AI agent observability, from tracing and debugging to evaluation and cost management.
Automatic Tracing with Minimal Instrumentation
Laminar’s tracing system is designed to require minimal setup. Developers can instrument their agents with a single line of code, thanks to the platform’s OpenTelemetry-native SDK. This SDK supports a wide range of agent frameworks and LLM providers, including LangChain, OpenAI, Anthropic, and Azure AI services.
The instrumentation automatically captures LLM calls, tool invocations, and function executions, providing a comprehensive view of an agent’s workflow.
High-Performance Trace Storage and Compression
One of Laminar’s standout features is its ability to compress agent traces by up to 20x. This compression is achieved through message deduplication, which identifies and stores only unique messages within a trace. As a result, storage requirements scale linearly with the number of unique messages, rather than quadratically with the number of turns in an agent’s execution.
Traces are reconstructed on demand, ensuring that the data presented in the UI or via APIs is identical to the original execution. This approach is particularly beneficial for long-running agents, where trace sizes can become prohibitively large without compression.
Real-Time Signal Detection and Alerting
Laminar’s Signals feature allows teams to define custom conditions for detecting unexpected agent behaviors. These conditions are specified in plain English, making them accessible to developers without deep technical expertise. When a condition is met, Laminar triggers alerts in Slack or other notification channels, ensuring that teams are promptly informed of potential issues.
Signals also include clustering capabilities, grouping similar failures into distinct patterns. This clustering provides a high-level overview of recurring issues, helping teams prioritize debugging efforts.
Extensible Evaluation Framework
The platform includes a CLI and SDK for running evaluations locally or as part of a CI/CD pipeline, ensuring that tests can be integrated into existing workflows.
Evaluations can be derived from production traces, enabling teams to create labeled datasets for fine-tuning or benchmarking. This end-to-end workflow ensures that observability and evaluation are seamlessly connected.
SQL Access for Advanced Analysis
Laminar provides full SQL access to trace data, allowing teams to query traces using custom queries. The platform’s MCP (Machine Code Processor) and CLI also support SQL queries, enabling developers to investigate traces programmatically.
SQL access extends to dashboards, where teams can build custom visualizations to track metrics such as token usage, cost, or execution time.
Self-Hosting and Deployment Flexibility
Laminar is designed to be self-hostable via Docker, offering teams the flexibility to deploy the platform in environments ranging from local development to production clusters. The platform supports both lightweight deployments for quickstarts and full-featured installations for production use.
Self-hosting also allows teams to customize Laminar’s configuration, such as targeting specific database schemas or disabling telemetry.
Integration with Agent Frameworks and LLMs
Laminar supports a broad range of agent frameworks and LLM providers, including LangChain, OpenAI, Anthropic, Gemini, and Azure AI services. The platform’s SDKs provide instrumentation for these frameworks, making it easy to start tracing agent interactions with minimal effort.
Additionally, Laminar includes support for browser-based agents, capturing session data alongside traditional LLM interactions. This capability is valuable for teams developing agents that interact with web applications or dynamic environments.
Technical Implementation
Laminar’s architecture combines a TypeScript-based frontend with a high-performance Rust backend, ensuring both developer-friendly interfaces and efficient data processing.
Frontend (TypeScript)
The frontend of Laminar is built with TypeScript, providing a responsive and intuitive UI for visualizing traces, signals, and evaluations. The platform’s dashboard builder allows teams to create custom visualizations using SQL queries, giving them full control over how data is presented.
The frontend also includes a debugging interface that allows developers to replay agent runs step-by-step. This capability is particularly useful for identifying the root cause of failures or unexpected behaviors. Additionally, the UI supports data annotation and dataset creation, enabling teams to build labeled datasets for fine-tuning or benchmarking.
Backend (Rust)
The backend of Laminar is written in Rust, a language known for its performance and safety guarantees. This choice ensures that the platform can handle large volumes of trace data efficiently, even for long-running agents. The backend includes a custom real-time engine for viewing traces as they happen, providing low-latency access to observability data.
Data Storage and Compression
The platform’s deduplication technique further reduces storage requirements by storing only unique messages within each trace.
The compression process is fully automatic and does not impact query performance. Traces are reconstructed on demand, ensuring that the data presented in the UI or via APIs is identical to the original execution. This approach makes it feasible to retain traces for longer periods without incurring prohibitive storage costs.
CLI and MCP for Programmatic Access
Laminar includes a CLI and MCP (Machine Code Processor) for programmatic access to trace data. These tools allow developers to query traces using SQL, investigate issues programmatically, or automate observability workflows.
The MCP extends this capability by providing a server-side interface for querying traces. This allows coding agents or other automated systems to investigate issues or build datasets without manual intervention.
