본문으로 건너뛰기
cccskills
무료GitHub에 공개

langsmith-tracing

LangSmith tracing and debugging setup for LLM applications. Configure observability, capture traces, and enable debugging for LangChain/LangGraph agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.9 KB
  • README.md4.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

langsmith-tracing

Configure LangSmith observability and tracing for LLM applications built with LangChain and LangGraph frameworks.

Overview

LangSmith is the managed observability suite by LangChain that provides:

  • Dashboards and alerting for LLM applications
  • Human-in-the-loop evaluation capabilities
  • Deep LangChain/LangGraph integration
  • Run Tree model for nested traces
  • MCP connectivity to Claude, VSCode

Capabilities

Core Tracing Setup

  • Initialize LangSmith client and API configuration
  • Configure project/workspace settings
  • Set up trace collection and sampling
  • Enable debug logging for agent execution

Integration Patterns

  • LangChain chain tracing with automatic instrumentation
  • LangGraph workflow state tracking
  • Custom span creation for non-LangChain code
  • Parent-child trace relationships

Debugging Features

  • Fetch execution traces for analysis
  • Query run history and metadata
  • Export traces for offline analysis
  • Compare runs across different versions

Usage

Environment Setup

# Set required environment variables
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_API_KEY=<your-api-key>
export LANGCHAIN_PROJECT=<project-name>

Python Integration

from langsmith import Client, traceable
from langchain.callbacks.tracers import LangChainTracer

# Initialize client
client = Client()

# Use @traceable decorator for custom functions
@traceable(name="custom_operation")
def my_function(input_data):
    # Your logic here
    return result

# Initialize tracer for LangChain
tracer = LangChainTracer(project_name="my-project")

# Use with LangChain chains
chain.invoke(input, config={"callbacks": [tracer]})

Trace Retrieval

# Fetch traces from LangSmith
runs = client.list_runs(
    project_name="my-project",
    start_time=datetime.now() - timedelta(hours=24),
    execution_order=1,  # Root runs only
    error=False,  # Successful runs only
)

for run in runs:
    print(f"Run ID: {run.id}")
    print(f"Latency: {run.latency_p99}")
    print(f"Tokens: {run.total_tokens}")

Task Definition

When used in a babysitter process, this skill produces:

const langsmithTracingTask = defineTask({
  name: 'langsmith-tracing-setup',
  description: 'Configure LangSmith tracing for the application',

  inputs: {
    projectName: { type: 'string', required: true },
    apiKeyEnvVar: { type: 'string', default: 'LANGCHAIN_API_KEY' },
    samplingRate: { type: 'number', default: 1.0 },
    enableDebug: { type: 'boolean', default: false }
  },

  outputs: {
    configured: { type: 'boolean' },
    projectUrl: { type: 'string' },
    artifacts: { type: 'array' }
  },

  async run(inputs, taskCtx) {
    return {
      kind: 'skill',
      title: `Configure LangSmith tracing for ${inputs.projectName}`,
      skill: {
        name: 'langsmith-tracing',
        context: {
          projectName: inputs.projectName,
          apiKeyEnvVar: inputs.apiKeyEnvVar,
          samplingRate: inputs.samplingRate,
          enableDebug: inputs.enableDebug,
          instructions: [
            'Verify LangSmith API credentials are available',
            'Create or validate project configuration',
            'Set up tracing instrumentation in codebase',
            'Configure sampling rate and debug settings',
            'Verify traces are being captured correctly'
          ]
        }
      },
      io: {
        inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
        outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
      }
    };
  }
});

Applicable Processes

  • llm-observability-monitoring
  • agent-evaluation-framework
  • react-agent-implementation
  • conversation-quality-testing
  • regression-testing-agent

External Dependencies

  • LangSmith account and API key
  • LangChain Python library
  • langsmith Python package

References

Related Skills

  • SK-OBS-002 langfuse-integration
  • SK-OBS-003 phoenix-arize-setup
  • SK-OBS-004 opentelemetry-llm

Related Agents

  • AG-OPS-004 observability-engineer
  • AG-SAF-004 agent-evaluator

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Provide implementations of advanced data structures

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Fresh adversarial code review with binary PASS/FAIL verdicts, evidence citations, and anchoring bias prevention via fresh reviewer spawning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

WASM-based instant code transforms for simple tasks, achieving 352x speedup over LLM inference with zero cost.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Coordinate Crew (persistent) and Polecat (transient) agents using Gas Town's hook-based work distribution and GUPP principle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Generate visual representations of algorithm execution

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Hierarchical coordination and drift detection with frequent checkpoints, shared memory coherence validation, role specialization enforcement, and short task cycles.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

a5c-ai의 스킬 모두 보기

이 스킬의 문제 신고