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.
git clone --depth 1 https://github.com/yu-iskw/llmops-demo-tsWrote 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/yu-iskw/llmops-demo-ts/langsmith_observability)<a href="https://agentmods.dev/rules/yu-iskw/llmops-demo-ts/langsmith_observability"><img src="https://agentmods.dev/badge/rules/yu-iskw/llmops-demo-ts/langsmith_observability.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.00028 | $0.01004 |
| Opus 5 | $0.00014 | $0.00502 |
| Sonnet 5 | $0.00006 | $0.00201 |
| Haiku 4.5 | $0.00003 | $0.00100 |
Grade A, and why
langsmith_observability 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 3d 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LLM Observability with LangSmith
This rule provides guidelines for setting up and utilizing LangSmith for LLM-native observability, which is crucial for debugging and monitoring non-deterministic LLM applications.
1. Environment Setup
To enable LangSmith tracing, set the following environment variables:
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=<your-api-key>
export LANGSMITH_PROJECT=<your-project-name>
Note: LANGSMITH_PROJECT is supported in JS SDK versions >= 0.2.16; otherwise, use LANGCHAIN_PROJECT.
2. Tracing LLM Calls and Chains
LangSmith allows you to trace individual LLM calls and entire application chains.
2.1 Basic Tracing with traceable
Wrap your functions or methods with traceable to automatically log their execution as LangSmith runs. This is applicable even if you are using @google/genai or other LLM providers.
import { traceable } from "langsmith/traceable";
import { GoogleGenAI } from '@google/genai';
// Initialize GoogleGenAI client (assuming environment variables are set)
const genAI = new GoogleGenAI();
const tracedGenerateContent = traceable(
async function generateContentWithTracing(modelName: string, prompt: string) {
const response = await genAI.models.generateContent({
model: modelName,
contents: [{ role: 'user', parts: [{ text: prompt }] }],
});
return response.text;
},
{ run_type: "llm" } // Designate as an LLM run
);
// Example usage:
// await tracedGenerateContent('gemini-pro', 'What is the capital of France?');
2.2 Tracing with wrapOpenAI (for OpenAI SDK)
If you are using the OpenAI SDK, you can directly wrap the client:
import { OpenAI } from "openai";
import { wrapOpenAI } from "langsmith/wrappers";
const openAIClient = wrapOpenAI(new OpenAI());
// Use openAIClient as usual, and calls will be traced automatically.
// const response = await openAIClient.chat.completions.create({...});
3. Collecting Feedback
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.
- 3d ago First seen · 132 lines · 28 tokens per session scan A 5257ddf543bd
langsmith_observability is a cursor rule published in the GitHub repository yu-iskw/llmops-demo-ts (6 stars, last pushed 6d ago), licensed Apache-2.0. It adds 28 tokens to every session and 1,004 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-09-04.
Other cursor rules, from other repositories
gateway
The gateway core module is the central orchestrator that handles AI provider requests, manages caching, queuing, and provides unified interfaces for chat completion, embeddings, and tool responses.
providers
The core providers module contains concrete implementations of AI provider integrations (Anthropic, OpenAI, Google, etc.) that implement the provider interfaces defined in the provider package.
design
All tasks related to updating frontend components, CSS, and general styling.
general
No need to run the app. It's already up. i.e. no bun dev or bun run build.
code-style
Formatting, lint, comments language.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.