laminar

laminar is a cursor rule for Cursor from lmnr-ai/lmnr. It costs 29 tokens per session (3,877 once invoked), scanned A, original, Apache-2.0.

Project rules for adding Laminar, a platform that records and evaluates the behavior of AI applications. They describe how to initialize it, trace code, group related activity, and configure its API key.

In plain words
What is it for?
Use them when instrumenting Python, JavaScript, or TypeScript AI applications, adding function traces, grouping user sessions, or creating Laminar evaluations.
Why use it?
They help keep AI-application monitoring consistent and prevent common setup mistakes such as missing initialization, incomplete traces, or incorrect shutdown handling.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions Cursor.

Good fit Use them when instrumenting Python, JavaScript, or TypeScript AI applications, adding function traces, grouping user sessions, or creating Laminar evaluations.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/lmnr-ai/lmnr/laminar
About the project

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.

lmnr-ai/lmnr · 3,451 stars · on GitHub · laminar.sh

Install

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.

Clone the repo
git clone --depth 1 https://github.com/lmnr-ai/lmnr

Made for: Cursor.

Wrote 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.

agentmods badge for laminar

README.md
[![agentmods](https://agentmods.dev/badge/rules/lmnr-ai/lmnr/laminar/github.svg)](https://agentmods.dev/rules/lmnr-ai/lmnr/laminar)
Your own site
<a href="https://agentmods.dev/rules/lmnr-ai/lmnr/laminar"><img src="https://agentmods.dev/badge/rules/lmnr-ai/lmnr/laminar/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for laminar

Your own site · 80×15
<a href="https://agentmods.dev/rules/lmnr-ai/lmnr/laminar"><img src="https://agentmods.dev/badge/rules/lmnr-ai/lmnr/laminar.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,877 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.03877
Opus 5.5 $0.00012 $0.01551
Sonnet 5.5 $0.00006 $0.00775
Haiku 4.5 $0.00003 $0.00388

Measured 1mo ago against content hash 1945516b8654, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

rules/laminar.mdc · 698 lines

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"]
)

Read the full file on GitHub · 698 lines

Changes

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.

  1. 1mo ago First seen · 698 lines · 29 tokens per session scan A 1945516b8654

Subscribe to this mod's changes

laminar is a cursor rule published in the GitHub repository lmnr-ai/lmnr (3,451 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.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.