Laminar is an open-source observability platform for AI agents that records and analyzes their traces, events, metrics, and evaluation results. Developers use it to monitor agent behavior, investigate problems, run evaluations, and compare results through its interfaces and tools. The catalogue entries connect coding agents to Laminar for querying traces and debugging.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/lmnr-ai/lmnr/laminargit clone --depth 1 https://github.com/lmnr-ai/lmnrWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/lmnr-ai/lmnr/laminar)<a href="https://agentmods.dev/rules/lmnr-ai/lmnr/laminar"><img src="https://agentmods.dev/badge/rules/lmnr-ai/lmnr/laminar.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00029 | $0.03877 |
| Opus 5 | $0.00015 | $0.01938 |
| Sonnet 5 | $0.00006 | $0.00775 |
| Haiku 4.5 | $0.00003 | $0.00388 |
Grade A, and why
laminar scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 698 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Laminar AI Observability and Evaluation Platform - Cursor Rules
Overview
Laminar is an open-source platform for observability and evaluations of AI applications. It provides comprehensive LLM tracing based on OpenTelemetry, powerful evaluation tools.
Always Follow These Patterns:
- Analyze the project structure and initialize Laminar once at application entry point with
Laminar.initialize() - Use environment variables for API keys (
LMNR_PROJECT_API_KEY) - Prefer automatic instrumentation over manual when possible
- Use
@observe()decorator for custom function tracing in Python - Use
observe()wrapper for custom function tracing in JavaScript/TypeScript - Call
Laminar.shutdown()in JavaScript/TypeScript before process exit if it is a single script - Group related spans into traces using parent spans
- Use sessions to group related traces for user interactions
- If needed add user IDs and metadata for comprehensive tracking
Installation & Setup
JavaScript/TypeScript
npm add @lmnr-ai/lmnr
Python
pip install 'lmnr[all]'
Environment Variables
LMNR_PROJECT_API_KEY=your_project_api_key_here
Initialization Patterns
JavaScript/TypeScript - Standard Setup
import { Laminar } from '@lmnr-ai/lmnr';
Laminar.initialize({
projectApiKey: process.env.LMNR_PROJECT_API_KEY
});
// At application exit if a single script
await Laminar.shutdown();
Next.js Setup - instrumentation.ts
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
const { Laminar } = await import('@lmnr-ai/lmnr');
Laminar.initialize({
projectApiKey: process.env.LMNR_PROJECT_API_KEY,
});
}
}
Next.js Configuration - next.config.ts
const nextConfig = {
experimental: {
serverExternalPackages: ['@lmnr-ai/lmnr']
}
};
module.exports = nextConfig;
Python Setup
from lmnr import Laminar
import os
Laminar.initialize(
project_api_key=os.environ["LMNR_PROJECT_API_KEY"]
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 698 lines · 29 tokens per session scan A 1945516b8654
laminar is a cursor rule published in the GitHub repository lmnr-ai/lmnr (3,224 stars, last pushed today), licensed Apache-2.0. It adds 29 tokens to every session and 3,877 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
agentic-patterns
Agentic workflow patterns—when to use agents vs workflows, prompt chaining, routing, evaluator-optimizer.
cursorrules
You are building an AI/ML project with Python. The project uses PyTorch for model training, handles data pipelines with proper validation, tracks experiments systematically, and follows production ML engineering practices. Code is type-hinted, tested, and reproducible.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.