{
  "type": "stack",
  "id": "agent-evals-and-observability",
  "title": "A recommended stack for agent evals and observability",
  "summary": "Instrument an agent with OpenTelemetry GenAI conventions and OpenInference, inspect traces and run experiments in Langfuse, and gate quality in CI with Langfuse's experiment action plus Promptfoo config-file evals.",
  "author": "Agentica Author",
  "tags": [
    "evals",
    "observability",
    "tracing",
    "opentelemetry",
    "ci",
    "llm-as-judge",
    "red-teaming"
  ],
  "published": "2026-11-22",
  "last_verified": "2026-11-22",
  "entries": [
    "otel-genai-semconv",
    "openinference",
    "langfuse",
    "langfuse-experiment-action",
    "promptfoo",
    "promptfoo-action",
    "openllmetry",
    "openlit",
    "langfuse-mcp",
    "langfuse-skills",
    "inspect-ai",
    "inspect-evals",
    "arize-phoenix",
    "opik",
    "laminar",
    "braintrust",
    "tau2-bench"
  ],
  "links": {
    "html": "https://indexagentica.com/stacks/agent-evals-and-observability/",
    "markdown": "https://indexagentica.com/stacks/agent-evals-and-observability.md",
    "json": "https://indexagentica.com/api/longform/stacks/agent-evals-and-observability.json",
    "source": "https://github.com/Drudley/indexagentica/blob/main/content-long/stacks/agent-evals-and-observability.md"
  },
  "status": "published",
  "stack": {
    "use_case": "Trace an agent with portable OpenTelemetry instrumentation, review live and offline quality in a self-hostable platform, and fail CI when dataset experiments or file-based evals regress.",
    "components": [
      {
        "role": "Trace conventions",
        "entry": "otel-genai-semconv",
        "name": "OpenTelemetry GenAI Semantic Conventions",
        "url": "https://indexagentica.com/entries/otel-genai-semconv/",
        "why": "The OpenTelemetry GenAI semantic conventions (status: Development) define spans, metrics and events for inference, embeddings, tool execution, retrieval and agent operations, plus MCP and Agent2Agent. Adopt them so traces stay portable as backends change."
      },
      {
        "role": "Instrumentation",
        "entry": "openinference",
        "name": "OpenInference",
        "url": "https://indexagentica.com/entries/openinference/",
        "why": "Apache-2.0 conventions and instrumentation libraries, built on OpenTelemetry, for tracing LLM calls, agents, tools, retrieval and embeddings. Official docs say traces work with Arize Phoenix, Arize AX and any OpenTelemetry backend; span processors convert OpenLIT and OpenLLMetry traces into OpenInference form."
      },
      {
        "role": "Observability and evals platform",
        "entry": "langfuse",
        "name": "Langfuse",
        "url": "https://indexagentica.com/entries/langfuse/",
        "why": "Open-source LLM observability you can use as Langfuse Cloud or self-host with Docker, Kubernetes or VMs (some add-on features require a license key). It receives OTLP at /api/public/otel, maps GenAI and OpenInference attributes, and adds datasets, LLM-as-a-judge, human annotation and experiments for online and offline evals."
      },
      {
        "role": "Experiment CI gate",
        "entry": "langfuse-experiment-action",
        "name": "Langfuse Experiment Action",
        "url": "https://indexagentica.com/entries/langfuse-experiment-action/",
        "why": "MIT GitHub Action that loads your experiment script, runs it against a Langfuse dataset, comments the result on the pull request, and can fail the job when the script raises RegressionError. Official docs say to pin the action to a release; set langfuse_base_url for a self-hosted instance."
      },
      {
        "role": "Config-file evals and red team",
        "entry": "promptfoo",
        "name": "Promptfoo",
        "url": "https://indexagentica.com/entries/promptfoo/",
        "why": "Open-source CLI and library for evaluating and red-teaming LLM apps with declarative test cases in a config file, automatic scoring, and local execution of evals (red-team generation may use hosted services). Use it alongside Langfuse when you want file-based evals that run on your machine or in CI."
      },
      {
        "role": "Promptfoo CI action",
        "entry": "promptfoo-action",
        "name": "Promptfoo GitHub Action",
        "url": "https://indexagentica.com/entries/promptfoo-action/",
        "why": "MIT GitHub Action that runs Promptfoo when monitored files change. On pull requests it evaluates the current checkout, can post a comment with pass/fail counts, and can fail the job when the suite pass percentage is below the optional fail-on-threshold input."
      }
    ]
  },
  "entries_detail": [
    {
      "id": "otel-genai-semconv",
      "name": "OpenTelemetry GenAI Semantic Conventions",
      "summary": "OpenTelemetry conventions for spans, metrics and events emitted by GenAI clients, MCP and model providers, for interoperable agent observability.",
      "url": "https://indexagentica.com/entries/otel-genai-semconv/",
      "json": "https://indexagentica.com/api/entries/otel-genai-semconv.json"
    },
    {
      "id": "openinference",
      "name": "OpenInference",
      "summary": "OpenTelemetry-compatible conventions and auto-instrumentation packages for tracing LLM calls, retrieval, tools and agent frameworks.",
      "url": "https://indexagentica.com/entries/openinference/",
      "json": "https://indexagentica.com/api/entries/openinference.json"
    },
    {
      "id": "langfuse",
      "name": "Langfuse",
      "summary": "Open-source agent evals and observability platform: trace, evaluate and improve LLM applications and agents.",
      "url": "https://indexagentica.com/entries/langfuse/",
      "json": "https://indexagentica.com/api/entries/langfuse.json"
    },
    {
      "id": "langfuse-experiment-action",
      "name": "Langfuse Experiment Action",
      "summary": "GitHub Action that runs a Langfuse experiment in your CI pipeline.",
      "url": "https://indexagentica.com/entries/langfuse-experiment-action/",
      "json": "https://indexagentica.com/api/entries/langfuse-experiment-action.json"
    },
    {
      "id": "promptfoo",
      "name": "Promptfoo",
      "summary": "Open-source tool to test and red-team prompts, agents and RAG: automated evals, vulnerability scanning and model comparison.",
      "url": "https://indexagentica.com/entries/promptfoo/",
      "json": "https://indexagentica.com/api/entries/promptfoo.json"
    },
    {
      "id": "promptfoo-action",
      "name": "Promptfoo GitHub Action",
      "summary": "GitHub Action for running Promptfoo prompt, agent and RAG tests and red-team scans in CI.",
      "url": "https://indexagentica.com/entries/promptfoo-action/",
      "json": "https://indexagentica.com/api/entries/promptfoo-action.json"
    },
    {
      "id": "openllmetry",
      "name": "OpenLLMetry",
      "summary": "Traceloop's open-source observability for GenAI/LLM applications, built on OpenTelemetry.",
      "url": "https://indexagentica.com/entries/openllmetry/",
      "json": "https://indexagentica.com/api/entries/openllmetry.json"
    },
    {
      "id": "openlit",
      "name": "OpenLIT",
      "summary": "Open-source, OpenTelemetry-native platform for AI agents: tracing, evals, guardrails, prompt hub, vault, and cost and GPU monitoring; self-host free.",
      "url": "https://indexagentica.com/entries/openlit/",
      "json": "https://indexagentica.com/api/entries/openlit.json"
    },
    {
      "id": "langfuse-mcp",
      "name": "Langfuse MCP Server",
      "summary": "Native, authenticated MCP server built into Langfuse so agents can read and write traces, prompts and other project data.",
      "url": "https://indexagentica.com/entries/langfuse-mcp/",
      "json": "https://indexagentica.com/api/entries/langfuse-mcp.json"
    },
    {
      "id": "langfuse-skills",
      "name": "Langfuse Skills",
      "summary": "Agent Skills that teach coding assistants (Claude Code, Cursor, etc.) to work with Langfuse: traces, prompts, datasets, scores and migration.",
      "url": "https://indexagentica.com/entries/langfuse-skills/",
      "json": "https://indexagentica.com/api/entries/langfuse-skills.json"
    },
    {
      "id": "inspect-ai",
      "name": "Inspect",
      "summary": "Open-source framework for large language model and agent evaluations from the UK AI Security Institute.",
      "url": "https://indexagentica.com/entries/inspect-ai/",
      "json": "https://indexagentica.com/api/entries/inspect-ai.json"
    },
    {
      "id": "inspect-evals",
      "name": "Inspect Evals",
      "summary": "Community collection of ready-to-run evaluation tasks for the UK AISI Inspect AI framework.",
      "url": "https://indexagentica.com/entries/inspect-evals/",
      "json": "https://indexagentica.com/api/entries/inspect-evals.json"
    },
    {
      "id": "arize-phoenix",
      "name": "Arize Phoenix",
      "summary": "Open-source AI observability and evaluation platform from Arize.",
      "url": "https://indexagentica.com/entries/arize-phoenix/",
      "json": "https://indexagentica.com/api/entries/arize-phoenix.json"
    },
    {
      "id": "opik",
      "name": "Opik",
      "summary": "Comet's open-source platform to debug, evaluate and monitor LLM apps, RAG systems and agentic workflows.",
      "url": "https://indexagentica.com/entries/opik/",
      "json": "https://indexagentica.com/api/entries/opik.json"
    },
    {
      "id": "laminar",
      "name": "Laminar",
      "summary": "Open-source observability platform purpose-built for AI agents: trace, evaluate and debug agent failures.",
      "url": "https://indexagentica.com/entries/laminar/",
      "json": "https://indexagentica.com/api/entries/laminar.json"
    },
    {
      "id": "braintrust",
      "name": "Braintrust",
      "summary": "AI observability platform for agents: trace production, run evals and catch regressions before users see them.",
      "url": "https://indexagentica.com/entries/braintrust/",
      "json": "https://indexagentica.com/api/entries/braintrust.json"
    },
    {
      "id": "tau2-bench",
      "name": "τ-bench 2.0 (tau2-bench)",
      "summary": "Sierra Research's MIT τ-bench 2.0: tool-agent-user customer-service tasks in six languages, text and voice, with a live leaderboard at taubench.com.",
      "url": "https://indexagentica.com/entries/tau2-bench/",
      "json": "https://indexagentica.com/api/entries/tau2-bench.json"
    }
  ],
  "related": [
    {
      "type": "guide",
      "id": "evaluate-an-ai-agent",
      "title": "Evaluate an AI agent with open-source eval and observability tools",
      "url": "https://indexagentica.com/guides/evaluate-an-ai-agent/",
      "json": "https://indexagentica.com/api/longform/guides/evaluate-an-ai-agent.json"
    },
    {
      "type": "comparison",
      "id": "agent-observability-platforms",
      "title": "Observability and eval platforms for AI agents",
      "url": "https://indexagentica.com/compare/agent-observability-platforms/",
      "json": "https://indexagentica.com/api/longform/compare/agent-observability-platforms.json"
    },
    {
      "type": "comparison",
      "id": "llm-red-teaming-tools",
      "title": "Open-source red-teaming tools for LLM apps and agents",
      "url": "https://indexagentica.com/compare/llm-red-teaming-tools/",
      "json": "https://indexagentica.com/api/longform/compare/llm-red-teaming-tools.json"
    },
    {
      "type": "stack",
      "id": "research-agent",
      "title": "Research agent stack",
      "url": "https://indexagentica.com/stacks/research-agent/",
      "json": "https://indexagentica.com/api/longform/stacks/research-agent.json"
    },
    {
      "type": "comparison",
      "id": "agent-benchmarks",
      "title": "Agent benchmarks compared",
      "url": "https://indexagentica.com/compare/agent-benchmarks/",
      "json": "https://indexagentica.com/api/longform/compare/agent-benchmarks.json"
    },
    {
      "type": "comparison",
      "id": "newer-agent-eval-sets",
      "title": "Newer agent eval sets for data, terminals and multi-agent conflict",
      "url": "https://indexagentica.com/compare/newer-agent-eval-sets/",
      "json": "https://indexagentica.com/api/longform/compare/newer-agent-eval-sets.json"
    },
    {
      "type": "guide",
      "id": "test-an-agent-for-prompt-injection",
      "title": "Test a tool-using agent for prompt injection with AgentDojo",
      "url": "https://indexagentica.com/guides/test-an-agent-for-prompt-injection/",
      "json": "https://indexagentica.com/api/longform/guides/test-an-agent-for-prompt-injection.json"
    }
  ],
  "sources": [
    {
      "title": "OpenTelemetry GenAI Semantic Conventions, repository README",
      "url": "https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/README.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "OpenTelemetry, Semantic conventions for generative AI systems",
      "url": "https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/README.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "OpenTelemetry, Semantic conventions for GenAI agent spans",
      "url": "https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/gen-ai-agent-spans.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "OpenTelemetry GenAI Semantic Conventions repository",
      "url": "https://github.com/open-telemetry/semantic-conventions-genai",
      "accessed": "2026-11-22"
    },
    {
      "title": "OpenInference README",
      "url": "https://raw.githubusercontent.com/Arize-ai/openinference/main/README.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "OpenInference, official site (Markdown)",
      "url": "https://openinf.dev/index.html.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "OpenInference specification",
      "url": "https://openinf.dev/spec/index.html.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse docs, Get started with tracing",
      "url": "https://langfuse.com/docs/observability/get-started",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse docs, OpenTelemetry (OTEL) for LLM observability",
      "url": "https://langfuse.com/integrations/native/opentelemetry",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse docs, Evaluation overview",
      "url": "https://langfuse.com/docs/evaluation/overview",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse docs, Datasets",
      "url": "https://langfuse.com/docs/evaluation/experiments/datasets",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse docs, Experiments in CI/CD",
      "url": "https://langfuse.com/docs/evaluation/experiments/experiments-ci-cd",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse docs, MCP server",
      "url": "https://langfuse.com/docs/api-and-data-platform/features/mcp-server",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse docs, Self-host Langfuse",
      "url": "https://langfuse.com/self-hosting",
      "accessed": "2026-11-22"
    },
    {
      "title": "Langfuse LICENSE",
      "url": "https://raw.githubusercontent.com/langfuse/langfuse/main/LICENSE",
      "accessed": "2026-11-22"
    },
    {
      "title": "langfuse/experiment-action README",
      "url": "https://raw.githubusercontent.com/langfuse/experiment-action/main/README.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "langfuse/experiment-action releases",
      "url": "https://github.com/langfuse/experiment-action/releases",
      "accessed": "2026-11-22"
    },
    {
      "title": "Promptfoo docs, Intro",
      "url": "https://www.promptfoo.dev/docs/intro/",
      "accessed": "2026-11-22"
    },
    {
      "title": "Promptfoo docs, Getting started",
      "url": "https://www.promptfoo.dev/docs/getting-started/",
      "accessed": "2026-11-22"
    },
    {
      "title": "Promptfoo docs, Testing prompts with GitHub Actions",
      "url": "https://www.promptfoo.dev/docs/integrations/github-action/",
      "accessed": "2026-11-22"
    },
    {
      "title": "promptfoo/promptfoo-action README",
      "url": "https://raw.githubusercontent.com/promptfoo/promptfoo-action/main/README.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "OpenLLMetry README",
      "url": "https://raw.githubusercontent.com/traceloop/openllmetry/main/README.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "Inspect AI README",
      "url": "https://raw.githubusercontent.com/UKGovernmentBEIS/inspect_ai/main/README.md",
      "accessed": "2026-11-22"
    },
    {
      "title": "Inspect documentation",
      "url": "https://inspect.aisi.org.uk/",
      "accessed": "2026-11-22"
    }
  ],
  "front_matter": {
    "id": "agent-evals-and-observability",
    "type": "stack",
    "title": "A recommended stack for agent evals and observability",
    "summary": "Instrument an agent with OpenTelemetry GenAI conventions and OpenInference, inspect traces and run experiments in Langfuse, and gate quality in CI with Langfuse's experiment action plus Promptfoo config-file evals.",
    "description": "A recommended default for agent observability and evaluation: follow the OpenTelemetry GenAI semantic conventions, instrument with OpenInference (traces are standard OTLP and work with any OpenTelemetry backend), send them to Langfuse for datasets, judges and experiments, and add CI gates with langfuse/experiment-action and Promptfoo. Alternatives such as OpenLLMetry, Phoenix, Opik and Inspect stay in the notes. For the evaluation loop and a platform comparison, see the companion guide and comparison.",
    "author": "Agentica Author",
    "use_case": "Trace an agent with portable OpenTelemetry instrumentation, review live and offline quality in a self-hostable platform, and fail CI when dataset experiments or file-based evals regress.",
    "components": [
      {
        "role": "Trace conventions",
        "entry": "otel-genai-semconv",
        "why": "The OpenTelemetry GenAI semantic conventions (status: Development) define spans, metrics and events for inference, embeddings, tool execution, retrieval and agent operations, plus MCP and Agent2Agent. Adopt them so traces stay portable as backends change."
      },
      {
        "role": "Instrumentation",
        "entry": "openinference",
        "why": "Apache-2.0 conventions and instrumentation libraries, built on OpenTelemetry, for tracing LLM calls, agents, tools, retrieval and embeddings. Official docs say traces work with Arize Phoenix, Arize AX and any OpenTelemetry backend; span processors convert OpenLIT and OpenLLMetry traces into OpenInference form."
      },
      {
        "role": "Observability and evals platform",
        "entry": "langfuse",
        "why": "Open-source LLM observability you can use as Langfuse Cloud or self-host with Docker, Kubernetes or VMs (some add-on features require a license key). It receives OTLP at /api/public/otel, maps GenAI and OpenInference attributes, and adds datasets, LLM-as-a-judge, human annotation and experiments for online and offline evals."
      },
      {
        "role": "Experiment CI gate",
        "entry": "langfuse-experiment-action",
        "why": "MIT GitHub Action that loads your experiment script, runs it against a Langfuse dataset, comments the result on the pull request, and can fail the job when the script raises RegressionError. Official docs say to pin the action to a release; set langfuse_base_url for a self-hosted instance."
      },
      {
        "role": "Config-file evals and red team",
        "entry": "promptfoo",
        "why": "Open-source CLI and library for evaluating and red-teaming LLM apps with declarative test cases in a config file, automatic scoring, and local execution of evals (red-team generation may use hosted services). Use it alongside Langfuse when you want file-based evals that run on your machine or in CI."
      },
      {
        "role": "Promptfoo CI action",
        "entry": "promptfoo-action",
        "why": "MIT GitHub Action that runs Promptfoo when monitored files change. On pull requests it evaluates the current checkout, can post a comment with pass/fail counts, and can fail the job when the suite pass percentage is below the optional fail-on-threshold input."
      }
    ],
    "tags": [
      "evals",
      "observability",
      "tracing",
      "opentelemetry",
      "ci",
      "llm-as-judge",
      "red-teaming"
    ],
    "entries": [
      "otel-genai-semconv",
      "openinference",
      "langfuse",
      "langfuse-experiment-action",
      "promptfoo",
      "promptfoo-action",
      "openllmetry",
      "openlit",
      "langfuse-mcp",
      "langfuse-skills",
      "inspect-ai",
      "inspect-evals",
      "arize-phoenix",
      "opik",
      "laminar",
      "braintrust",
      "tau2-bench"
    ],
    "related": [
      "evaluate-an-ai-agent",
      "agent-observability-platforms",
      "llm-red-teaming-tools",
      "research-agent",
      "agent-benchmarks",
      "newer-agent-eval-sets",
      "test-an-agent-for-prompt-injection"
    ],
    "sources": [
      {
        "title": "OpenTelemetry GenAI Semantic Conventions, repository README",
        "url": "https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/README.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "OpenTelemetry, Semantic conventions for generative AI systems",
        "url": "https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/README.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "OpenTelemetry, Semantic conventions for GenAI agent spans",
        "url": "https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/gen-ai-agent-spans.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "OpenTelemetry GenAI Semantic Conventions repository",
        "url": "https://github.com/open-telemetry/semantic-conventions-genai",
        "accessed": "2026-11-22"
      },
      {
        "title": "OpenInference README",
        "url": "https://raw.githubusercontent.com/Arize-ai/openinference/main/README.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "OpenInference, official site (Markdown)",
        "url": "https://openinf.dev/index.html.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "OpenInference specification",
        "url": "https://openinf.dev/spec/index.html.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse docs, Get started with tracing",
        "url": "https://langfuse.com/docs/observability/get-started",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse docs, OpenTelemetry (OTEL) for LLM observability",
        "url": "https://langfuse.com/integrations/native/opentelemetry",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse docs, Evaluation overview",
        "url": "https://langfuse.com/docs/evaluation/overview",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse docs, Datasets",
        "url": "https://langfuse.com/docs/evaluation/experiments/datasets",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse docs, Experiments in CI/CD",
        "url": "https://langfuse.com/docs/evaluation/experiments/experiments-ci-cd",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse docs, MCP server",
        "url": "https://langfuse.com/docs/api-and-data-platform/features/mcp-server",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse docs, Self-host Langfuse",
        "url": "https://langfuse.com/self-hosting",
        "accessed": "2026-11-22"
      },
      {
        "title": "Langfuse LICENSE",
        "url": "https://raw.githubusercontent.com/langfuse/langfuse/main/LICENSE",
        "accessed": "2026-11-22"
      },
      {
        "title": "langfuse/experiment-action README",
        "url": "https://raw.githubusercontent.com/langfuse/experiment-action/main/README.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "langfuse/experiment-action releases",
        "url": "https://github.com/langfuse/experiment-action/releases",
        "accessed": "2026-11-22"
      },
      {
        "title": "Promptfoo docs, Intro",
        "url": "https://www.promptfoo.dev/docs/intro/",
        "accessed": "2026-11-22"
      },
      {
        "title": "Promptfoo docs, Getting started",
        "url": "https://www.promptfoo.dev/docs/getting-started/",
        "accessed": "2026-11-22"
      },
      {
        "title": "Promptfoo docs, Testing prompts with GitHub Actions",
        "url": "https://www.promptfoo.dev/docs/integrations/github-action/",
        "accessed": "2026-11-22"
      },
      {
        "title": "promptfoo/promptfoo-action README",
        "url": "https://raw.githubusercontent.com/promptfoo/promptfoo-action/main/README.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "OpenLLMetry README",
        "url": "https://raw.githubusercontent.com/traceloop/openllmetry/main/README.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "Inspect AI README",
        "url": "https://raw.githubusercontent.com/UKGovernmentBEIS/inspect_ai/main/README.md",
        "accessed": "2026-11-22"
      },
      {
        "title": "Inspect documentation",
        "url": "https://inspect.aisi.org.uk/",
        "accessed": "2026-11-22"
      }
    ],
    "last_verified": "2026-11-22",
    "published": "2026-11-22"
  },
  "markdown": "\n## Why this stack\n\nThe catalog already has a [hands-on evaluation loop](https://indexagentica.com/guides/evaluate-an-ai-agent/) and a [comparison of observability platforms](https://indexagentica.com/compare/agent-observability-platforms/). This stack is the opinionated default those pages leave open: one portable instrumentation path, one self-hostable platform for traces and experiments, and two CI gates — one for Langfuse dataset experiments, one for file-based Promptfoo evals.\n\nIt is also distinct from the [research agent stack](https://indexagentica.com/stacks/research-agent/), which includes Langfuse as a single tracing component. Here observability and evaluation are the whole design.\n\n## How the pieces fit\n\n1. Instrument the agent so every model call, tool use, retrieval step and agent turn becomes an OpenTelemetry span, following the [GenAI semantic conventions](https://indexagentica.com/entries/otel-genai-semconv/) and, in practice, [OpenInference](https://indexagentica.com/entries/openinference/) libraries.\n2. Export those spans over OTLP to [Langfuse](https://indexagentica.com/entries/langfuse/). Review live traces, promote interesting examples into a dataset, attach LLM-as-a-judge, code or human scores, and run offline experiments before you ship.\n3. In GitHub Actions, run the same Langfuse experiments with [langfuse/experiment-action](https://indexagentica.com/entries/langfuse-experiment-action/) and fail the job when a score violates your threshold.\n4. Keep a second, declarative eval suite in [Promptfoo](https://indexagentica.com/entries/promptfoo/) (`promptfooconfig.yaml`) for local runs and for [promptfoo-action](https://indexagentica.com/entries/promptfoo-action/) on pull requests. Use Promptfoo's red-teaming when you also need automated vulnerability scans; compare red-team tools in [Open-source red-teaming tools for LLM apps and agents](https://indexagentica.com/compare/llm-red-teaming-tools/).\n\nYou can swap the platform later because the traces are standard OTLP. You can also swap the CI gate if you only want one of the two eval styles.\n\n## Instrument with OpenTelemetry\n\nThe [OpenTelemetry GenAI semantic conventions](https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/README.md) now live in their own repository, [open-telemetry/semantic-conventions-genai](https://github.com/open-telemetry/semantic-conventions-genai). As of this writing the documents are marked **Development**. They cover client inference and embeddings, tool execution, retrieval, remote agent invocations, model and agent spans, plus technology-specific notes (OpenAI, Anthropic, AWS Bedrock, Azure AI Inference) and conventions for MCP and the Agent2Agent protocol.\n\n[OpenInference](https://indexagentica.com/entries/openinference/) builds on OpenTelemetry with a span-kind taxonomy and attribute schema for LLM calls, agents, tools, retrievers and embeddings. Instrumentation packages exist for Python, JavaScript, Java and Go. The project's official site is [openinf.dev](https://openinf.dev/); the README states that traces are natively supported by Arize Phoenix and Arize AX, and that they work with any OpenTelemetry-compatible backend because they are standard OTLP traces.\n\nIf you already emit [OpenLLMetry](https://indexagentica.com/entries/openllmetry/) or [OpenLIT](https://indexagentica.com/entries/openlit/) spans, OpenInference documents span processors that convert those traces into OpenInference form. OpenLLMetry itself is a set of Apache-2.0 OpenTelemetry instrumentations maintained by Traceloop; it is a reasonable alternative or complement when you already standardized on that stack.\n\n## Inspect and evaluate in Langfuse\n\n[Langfuse](https://indexagentica.com/entries/langfuse/) is open source. Official docs say you can use [Langfuse Cloud](https://langfuse.com/docs/observability/get-started) or [self-host](https://langfuse.com/self-hosting) it with Docker, Kubernetes or VMs, and that the instrumentation code is the same for both. Self-hosting runs the same infrastructure as Langfuse Cloud; some add-on features require a license key. The open-source portions of the repository are available under the MIT Expat license; content under documented `ee/` paths uses a separate license.\n\nLangfuse receives traces on the `/api/public/otel` OTLP endpoint (HTTP/JSON or HTTP/protobuf; official docs say gRPC is not supported yet). For a self-hosted instance the same path applies; docs give `http://localhost:3000/api/public/otel` as the local example and note that the OpenTelemetry endpoint was introduced in Langfuse v3.22.0. Authentication is HTTP Basic. When you send spans directly via OpenTelemetry, Langfuse v4 docs also ask for an `x-langfuse-ingestion-version: 4` header so new data appears in real time on the v4 data model; without it, directly ingested OpenTelemetry data can be delayed by up to 10 minutes.\n\nA minimal exporter configuration, using the official EU Cloud endpoint, looks like this (put the base64-encoded public and secret key pair in `AUTH_STRING`, and see the [OpenTelemetry page](https://langfuse.com/integrations/native/opentelemetry) for US, Japan, HIPAA and self-hosted URLs):\n\n```bash\nexport OTEL_EXPORTER_OTLP_ENDPOINT=\"https://cloud.langfuse.com/api/public/otel\"\nexport OTEL_EXPORTER_OTLP_HEADERS=\"Authorization=Basic ${AUTH_STRING},x-langfuse-ingestion-version=4\"\n```\n\nLangfuse maps incoming GenAI, OpenInference and related attributes onto its data model. Official docs warn that if you want to filter or aggregate by identifiers such as `userId`, `sessionId`, metadata, version, release or tags, you should propagate those trace-level attributes to every span in the trace, not only the root.\n\nFor Python or JavaScript/TypeScript, Langfuse also documents its own SDK as the preferred way to set Langfuse-specific attributes, media and export. This stack still recommends OTLP plus OpenInference so a second backend (for example [Arize Phoenix](https://indexagentica.com/entries/arize-phoenix/) or [Opik](https://indexagentica.com/entries/opik/)) can receive the same traces. The [platform comparison](https://indexagentica.com/compare/agent-observability-platforms/) covers Langfuse, LangSmith, Phoenix, Braintrust, Opik and Laminar, including license and self-host notes.\n\nOnce traces are flowing, Langfuse evaluation runs both **online** (scoring live production traces) and **offline** (running your application against a pre-defined dataset). A [dataset](https://langfuse.com/docs/evaluation/experiments/datasets) is a collection of inputs and expected outputs; official docs highlight creating test cases from real production traces. You can combine LLM-as-a-judge, human annotation queues and custom scores via API or SDK, then compare experiments.\n\n## Gate changes in CI\n\nLangfuse's [experiments in CI/CD](https://langfuse.com/docs/evaluation/experiments/experiments-ci-cd) workflow is: create a dataset, write an experiment with the Python or JS/TS SDK, add evaluators, raise `RegressionError` when a score violates your threshold, and run the script with [langfuse/experiment-action](https://github.com/langfuse/experiment-action). Official docs say this works with Langfuse Cloud and self-hosted Langfuse.\n\nThe action loads the experiment script, runs it against a Langfuse dataset, comments the result on the pull request, and optionally fails the job when a regression is detected. `should_fail_on_regression` defaults to true. Pin the action to a release from the [experiment-action releases](https://github.com/langfuse/experiment-action/releases) (the official workflow example also recommends pinning to a release SHA). Store the Langfuse public and secret keys as GitHub secrets; set `langfuse_base_url` when you are not using the default `https://cloud.langfuse.com`.\n\nTreat the CI gate as a release policy, not a scoreboard. Langfuse docs distinguish \"every required case must pass\" from \"no approved passing case may regress,\" and they say missing cases, duplicate IDs, task failures, and missing or invalid evaluator results must fail the gate rather than count as passes.\n\n## Config-file evals and red teaming\n\n[Promptfoo](https://indexagentica.com/entries/promptfoo/) is an open-source CLI and library for evaluating and red-teaming LLM apps. You describe prompts, providers and test cases in a config file (the getting-started example uses `promptfooconfig.yaml`), run `promptfoo eval`, and inspect results in a web viewer. Official intro notes that evals run on your machine and call the configured providers, while red-team generation may use hosted services.\n\n[promptfoo-action](https://indexagentica.com/entries/promptfoo-action/) runs that config in GitHub Actions when monitored files change. The action's README states that on pull requests it evaluates the current checkout (it does not run separate base and head evaluations), can post a comment with pass/fail counts, and accepts an optional `fail-on-threshold` (required suite pass percentage from 0 to 100). Official docs still show `promptfoo/promptfoo-action@v1`; pin a release or commit as you would any GitHub Action, and pass provider credentials through GitHub secrets — never commit them.\n\nUse Promptfoo when you want evals as files in the repo, a local red-team loop, or a CI check that does not depend on a Langfuse dataset. Use Langfuse experiments when the cases should come from production traces and the scores should live next to those traces. Most teams will want both.\n\n## Alternatives and going further\n\n- **Other platforms.** If you prefer not to standardize on Langfuse, the same OpenInference or OpenLLMetry traces can go to any OTLP backend. Start with the [observability platform comparison](https://indexagentica.com/compare/agent-observability-platforms/) for [Opik](https://indexagentica.com/entries/opik/), [Laminar](https://indexagentica.com/entries/laminar/), [Arize Phoenix](https://indexagentica.com/entries/arize-phoenix/) and [Braintrust](https://indexagentica.com/entries/braintrust/).\n- **Inspect.** [Inspect](https://indexagentica.com/entries/inspect-ai/) is a framework for large language model evaluations from the UK AI Security Institute, with a companion library of evaluations in [Inspect Evals](https://indexagentica.com/entries/inspect-evals/). Use it when you want a research-style eval harness rather than a production tracing platform.\n- **Langfuse MCP and skills.** [Langfuse MCP](https://indexagentica.com/entries/langfuse-mcp/) lets an assistant read and write Langfuse data over MCP. Official docs state that **both read and write tools are available by default**; if you only want read-only tools, configure your MCP client with an allowlist. If you can install CLI tools, Langfuse currently recommends the [Langfuse Agent Skill](https://indexagentica.com/entries/langfuse-skills/) over the MCP server for that environment.\n- **Published benchmarks.** Catalog entries such as [τ-bench 2.0](https://indexagentica.com/entries/tau2-bench/), and the comparisons of [agent benchmarks](https://indexagentica.com/compare/agent-benchmarks/) and [newer agent eval sets](https://indexagentica.com/compare/newer-agent-eval-sets/), are useful for shared leaderboards. They are not a substitute for your own traces, datasets and CI gates.\n- **Security tests.** Pair this stack with [Test an agent for prompt injection](https://indexagentica.com/guides/test-an-agent-for-prompt-injection/) and the [red-teaming comparison](https://indexagentica.com/compare/llm-red-teaming-tools/) when the failure mode is an attack rather than a quality regression.\n\nFor a worked loop with official SDK snippets across more than one platform, follow [Evaluate an AI agent](https://indexagentica.com/guides/evaluate-an-ai-agent/). Re-check those commands against current vendor docs: that guide was last verified on 2026-10-14, and the pages cited here were checked again on 2026-11-22.\n\n## Caveats\n\n- The OpenTelemetry GenAI conventions are still in Development. Langfuse maps a range of community attribute names because the conventions are evolving; do not assume every attribute is interpreted the same way in every backend.\n- Langfuse's OTLP intake is HTTP only (JSON or protobuf), not gRPC. Confirm the `/api/public/otel` path and the v4 ingestion header on the version you actually run.\n- Self-hosted Langfuse needs PostgreSQL, Redis/Valkey, ClickHouse and blob storage, as documented on the self-hosting page. Some add-on features need a license key. This article does not quote prices.\n- Promptfoo evals are local, but official docs warn that red-team generation may call hosted services. Review Promptfoo's data-handling notes before you scan production prompts.\n- GitHub Actions that call model providers will spend API budget. Keep keys in secrets, pin action versions, and start the gate on a small required dataset.\n",
  "raw": "---\nid: agent-evals-and-observability\ntype: stack\ntitle: \"A recommended stack for agent evals and observability\"\nsummary: \"Instrument an agent with OpenTelemetry GenAI conventions and OpenInference, inspect traces and run experiments in Langfuse, and gate quality in CI with Langfuse's experiment action plus Promptfoo config-file evals.\"\ndescription: \"A recommended default for agent observability and evaluation: follow the OpenTelemetry GenAI semantic conventions, instrument with OpenInference (traces are standard OTLP and work with any OpenTelemetry backend), send them to Langfuse for datasets, judges and experiments, and add CI gates with langfuse/experiment-action and Promptfoo. Alternatives such as OpenLLMetry, Phoenix, Opik and Inspect stay in the notes. For the evaluation loop and a platform comparison, see the companion guide and comparison.\"\nauthor: Agentica Author\nuse_case: \"Trace an agent with portable OpenTelemetry instrumentation, review live and offline quality in a self-hostable platform, and fail CI when dataset experiments or file-based evals regress.\"\ncomponents:\n  - role: Trace conventions\n    entry: otel-genai-semconv\n    why: \"The OpenTelemetry GenAI semantic conventions (status: Development) define spans, metrics and events for inference, embeddings, tool execution, retrieval and agent operations, plus MCP and Agent2Agent. Adopt them so traces stay portable as backends change.\"\n  - role: Instrumentation\n    entry: openinference\n    why: \"Apache-2.0 conventions and instrumentation libraries, built on OpenTelemetry, for tracing LLM calls, agents, tools, retrieval and embeddings. Official docs say traces work with Arize Phoenix, Arize AX and any OpenTelemetry backend; span processors convert OpenLIT and OpenLLMetry traces into OpenInference form.\"\n  - role: Observability and evals platform\n    entry: langfuse\n    why: \"Open-source LLM observability you can use as Langfuse Cloud or self-host with Docker, Kubernetes or VMs (some add-on features require a license key). It receives OTLP at /api/public/otel, maps GenAI and OpenInference attributes, and adds datasets, LLM-as-a-judge, human annotation and experiments for online and offline evals.\"\n  - role: Experiment CI gate\n    entry: langfuse-experiment-action\n    why: \"MIT GitHub Action that loads your experiment script, runs it against a Langfuse dataset, comments the result on the pull request, and can fail the job when the script raises RegressionError. Official docs say to pin the action to a release; set langfuse_base_url for a self-hosted instance.\"\n  - role: Config-file evals and red team\n    entry: promptfoo\n    why: \"Open-source CLI and library for evaluating and red-teaming LLM apps with declarative test cases in a config file, automatic scoring, and local execution of evals (red-team generation may use hosted services). Use it alongside Langfuse when you want file-based evals that run on your machine or in CI.\"\n  - role: Promptfoo CI action\n    entry: promptfoo-action\n    why: \"MIT GitHub Action that runs Promptfoo when monitored files change. On pull requests it evaluates the current checkout, can post a comment with pass/fail counts, and can fail the job when the suite pass percentage is below the optional fail-on-threshold input.\"\ntags: [evals, observability, tracing, opentelemetry, ci, llm-as-judge, red-teaming]\nentries: [otel-genai-semconv, openinference, langfuse, langfuse-experiment-action, promptfoo, promptfoo-action, openllmetry, openlit, langfuse-mcp, langfuse-skills, inspect-ai, inspect-evals, arize-phoenix, opik, laminar, braintrust, tau2-bench]\nrelated: [evaluate-an-ai-agent, agent-observability-platforms, llm-red-teaming-tools, research-agent, agent-benchmarks, newer-agent-eval-sets, test-an-agent-for-prompt-injection]\nsources:\n  - title: \"OpenTelemetry GenAI Semantic Conventions, repository README\"\n    url: https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/README.md\n    accessed: 2026-11-22\n  - title: \"OpenTelemetry, Semantic conventions for generative AI systems\"\n    url: https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/README.md\n    accessed: 2026-11-22\n  - title: \"OpenTelemetry, Semantic conventions for GenAI agent spans\"\n    url: https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/gen-ai-agent-spans.md\n    accessed: 2026-11-22\n  - title: \"OpenTelemetry GenAI Semantic Conventions repository\"\n    url: https://github.com/open-telemetry/semantic-conventions-genai\n    accessed: 2026-11-22\n  - title: \"OpenInference README\"\n    url: https://raw.githubusercontent.com/Arize-ai/openinference/main/README.md\n    accessed: 2026-11-22\n  - title: \"OpenInference, official site (Markdown)\"\n    url: https://openinf.dev/index.html.md\n    accessed: 2026-11-22\n  - title: \"OpenInference specification\"\n    url: https://openinf.dev/spec/index.html.md\n    accessed: 2026-11-22\n  - title: \"Langfuse docs, Get started with tracing\"\n    url: https://langfuse.com/docs/observability/get-started\n    accessed: 2026-11-22\n  - title: \"Langfuse docs, OpenTelemetry (OTEL) for LLM observability\"\n    url: https://langfuse.com/integrations/native/opentelemetry\n    accessed: 2026-11-22\n  - title: \"Langfuse docs, Evaluation overview\"\n    url: https://langfuse.com/docs/evaluation/overview\n    accessed: 2026-11-22\n  - title: \"Langfuse docs, Datasets\"\n    url: https://langfuse.com/docs/evaluation/experiments/datasets\n    accessed: 2026-11-22\n  - title: \"Langfuse docs, Experiments in CI/CD\"\n    url: https://langfuse.com/docs/evaluation/experiments/experiments-ci-cd\n    accessed: 2026-11-22\n  - title: \"Langfuse docs, MCP server\"\n    url: https://langfuse.com/docs/api-and-data-platform/features/mcp-server\n    accessed: 2026-11-22\n  - title: \"Langfuse docs, Self-host Langfuse\"\n    url: https://langfuse.com/self-hosting\n    accessed: 2026-11-22\n  - title: \"Langfuse LICENSE\"\n    url: https://raw.githubusercontent.com/langfuse/langfuse/main/LICENSE\n    accessed: 2026-11-22\n  - title: \"langfuse/experiment-action README\"\n    url: https://raw.githubusercontent.com/langfuse/experiment-action/main/README.md\n    accessed: 2026-11-22\n  - title: \"langfuse/experiment-action releases\"\n    url: https://github.com/langfuse/experiment-action/releases\n    accessed: 2026-11-22\n  - title: \"Promptfoo docs, Intro\"\n    url: https://www.promptfoo.dev/docs/intro/\n    accessed: 2026-11-22\n  - title: \"Promptfoo docs, Getting started\"\n    url: https://www.promptfoo.dev/docs/getting-started/\n    accessed: 2026-11-22\n  - title: \"Promptfoo docs, Testing prompts with GitHub Actions\"\n    url: https://www.promptfoo.dev/docs/integrations/github-action/\n    accessed: 2026-11-22\n  - title: \"promptfoo/promptfoo-action README\"\n    url: https://raw.githubusercontent.com/promptfoo/promptfoo-action/main/README.md\n    accessed: 2026-11-22\n  - title: \"OpenLLMetry README\"\n    url: https://raw.githubusercontent.com/traceloop/openllmetry/main/README.md\n    accessed: 2026-11-22\n  - title: \"Inspect AI README\"\n    url: https://raw.githubusercontent.com/UKGovernmentBEIS/inspect_ai/main/README.md\n    accessed: 2026-11-22\n  - title: \"Inspect documentation\"\n    url: https://inspect.aisi.org.uk/\n    accessed: 2026-11-22\nlast_verified: 2026-11-22\npublished: 2026-11-22\n---\n\n## Why this stack\n\nThe catalog already has a [hands-on evaluation loop](https://indexagentica.com/guides/evaluate-an-ai-agent/) and a [comparison of observability platforms](https://indexagentica.com/compare/agent-observability-platforms/). This stack is the opinionated default those pages leave open: one portable instrumentation path, one self-hostable platform for traces and experiments, and two CI gates — one for Langfuse dataset experiments, one for file-based Promptfoo evals.\n\nIt is also distinct from the [research agent stack](https://indexagentica.com/stacks/research-agent/), which includes Langfuse as a single tracing component. Here observability and evaluation are the whole design.\n\n## How the pieces fit\n\n1. Instrument the agent so every model call, tool use, retrieval step and agent turn becomes an OpenTelemetry span, following the [GenAI semantic conventions](https://indexagentica.com/entries/otel-genai-semconv/) and, in practice, [OpenInference](https://indexagentica.com/entries/openinference/) libraries.\n2. Export those spans over OTLP to [Langfuse](https://indexagentica.com/entries/langfuse/). Review live traces, promote interesting examples into a dataset, attach LLM-as-a-judge, code or human scores, and run offline experiments before you ship.\n3. In GitHub Actions, run the same Langfuse experiments with [langfuse/experiment-action](https://indexagentica.com/entries/langfuse-experiment-action/) and fail the job when a score violates your threshold.\n4. Keep a second, declarative eval suite in [Promptfoo](https://indexagentica.com/entries/promptfoo/) (`promptfooconfig.yaml`) for local runs and for [promptfoo-action](https://indexagentica.com/entries/promptfoo-action/) on pull requests. Use Promptfoo's red-teaming when you also need automated vulnerability scans; compare red-team tools in [Open-source red-teaming tools for LLM apps and agents](https://indexagentica.com/compare/llm-red-teaming-tools/).\n\nYou can swap the platform later because the traces are standard OTLP. You can also swap the CI gate if you only want one of the two eval styles.\n\n## Instrument with OpenTelemetry\n\nThe [OpenTelemetry GenAI semantic conventions](https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/README.md) now live in their own repository, [open-telemetry/semantic-conventions-genai](https://github.com/open-telemetry/semantic-conventions-genai). As of this writing the documents are marked **Development**. They cover client inference and embeddings, tool execution, retrieval, remote agent invocations, model and agent spans, plus technology-specific notes (OpenAI, Anthropic, AWS Bedrock, Azure AI Inference) and conventions for MCP and the Agent2Agent protocol.\n\n[OpenInference](https://indexagentica.com/entries/openinference/) builds on OpenTelemetry with a span-kind taxonomy and attribute schema for LLM calls, agents, tools, retrievers and embeddings. Instrumentation packages exist for Python, JavaScript, Java and Go. The project's official site is [openinf.dev](https://openinf.dev/); the README states that traces are natively supported by Arize Phoenix and Arize AX, and that they work with any OpenTelemetry-compatible backend because they are standard OTLP traces.\n\nIf you already emit [OpenLLMetry](https://indexagentica.com/entries/openllmetry/) or [OpenLIT](https://indexagentica.com/entries/openlit/) spans, OpenInference documents span processors that convert those traces into OpenInference form. OpenLLMetry itself is a set of Apache-2.0 OpenTelemetry instrumentations maintained by Traceloop; it is a reasonable alternative or complement when you already standardized on that stack.\n\n## Inspect and evaluate in Langfuse\n\n[Langfuse](https://indexagentica.com/entries/langfuse/) is open source. Official docs say you can use [Langfuse Cloud](https://langfuse.com/docs/observability/get-started) or [self-host](https://langfuse.com/self-hosting) it with Docker, Kubernetes or VMs, and that the instrumentation code is the same for both. Self-hosting runs the same infrastructure as Langfuse Cloud; some add-on features require a license key. The open-source portions of the repository are available under the MIT Expat license; content under documented `ee/` paths uses a separate license.\n\nLangfuse receives traces on the `/api/public/otel` OTLP endpoint (HTTP/JSON or HTTP/protobuf; official docs say gRPC is not supported yet). For a self-hosted instance the same path applies; docs give `http://localhost:3000/api/public/otel` as the local example and note that the OpenTelemetry endpoint was introduced in Langfuse v3.22.0. Authentication is HTTP Basic. When you send spans directly via OpenTelemetry, Langfuse v4 docs also ask for an `x-langfuse-ingestion-version: 4` header so new data appears in real time on the v4 data model; without it, directly ingested OpenTelemetry data can be delayed by up to 10 minutes.\n\nA minimal exporter configuration, using the official EU Cloud endpoint, looks like this (put the base64-encoded public and secret key pair in `AUTH_STRING`, and see the [OpenTelemetry page](https://langfuse.com/integrations/native/opentelemetry) for US, Japan, HIPAA and self-hosted URLs):\n\n```bash\nexport OTEL_EXPORTER_OTLP_ENDPOINT=\"https://cloud.langfuse.com/api/public/otel\"\nexport OTEL_EXPORTER_OTLP_HEADERS=\"Authorization=Basic ${AUTH_STRING},x-langfuse-ingestion-version=4\"\n```\n\nLangfuse maps incoming GenAI, OpenInference and related attributes onto its data model. Official docs warn that if you want to filter or aggregate by identifiers such as `userId`, `sessionId`, metadata, version, release or tags, you should propagate those trace-level attributes to every span in the trace, not only the root.\n\nFor Python or JavaScript/TypeScript, Langfuse also documents its own SDK as the preferred way to set Langfuse-specific attributes, media and export. This stack still recommends OTLP plus OpenInference so a second backend (for example [Arize Phoenix](https://indexagentica.com/entries/arize-phoenix/) or [Opik](https://indexagentica.com/entries/opik/)) can receive the same traces. The [platform comparison](https://indexagentica.com/compare/agent-observability-platforms/) covers Langfuse, LangSmith, Phoenix, Braintrust, Opik and Laminar, including license and self-host notes.\n\nOnce traces are flowing, Langfuse evaluation runs both **online** (scoring live production traces) and **offline** (running your application against a pre-defined dataset). A [dataset](https://langfuse.com/docs/evaluation/experiments/datasets) is a collection of inputs and expected outputs; official docs highlight creating test cases from real production traces. You can combine LLM-as-a-judge, human annotation queues and custom scores via API or SDK, then compare experiments.\n\n## Gate changes in CI\n\nLangfuse's [experiments in CI/CD](https://langfuse.com/docs/evaluation/experiments/experiments-ci-cd) workflow is: create a dataset, write an experiment with the Python or JS/TS SDK, add evaluators, raise `RegressionError` when a score violates your threshold, and run the script with [langfuse/experiment-action](https://github.com/langfuse/experiment-action). Official docs say this works with Langfuse Cloud and self-hosted Langfuse.\n\nThe action loads the experiment script, runs it against a Langfuse dataset, comments the result on the pull request, and optionally fails the job when a regression is detected. `should_fail_on_regression` defaults to true. Pin the action to a release from the [experiment-action releases](https://github.com/langfuse/experiment-action/releases) (the official workflow example also recommends pinning to a release SHA). Store the Langfuse public and secret keys as GitHub secrets; set `langfuse_base_url` when you are not using the default `https://cloud.langfuse.com`.\n\nTreat the CI gate as a release policy, not a scoreboard. Langfuse docs distinguish \"every required case must pass\" from \"no approved passing case may regress,\" and they say missing cases, duplicate IDs, task failures, and missing or invalid evaluator results must fail the gate rather than count as passes.\n\n## Config-file evals and red teaming\n\n[Promptfoo](https://indexagentica.com/entries/promptfoo/) is an open-source CLI and library for evaluating and red-teaming LLM apps. You describe prompts, providers and test cases in a config file (the getting-started example uses `promptfooconfig.yaml`), run `promptfoo eval`, and inspect results in a web viewer. Official intro notes that evals run on your machine and call the configured providers, while red-team generation may use hosted services.\n\n[promptfoo-action](https://indexagentica.com/entries/promptfoo-action/) runs that config in GitHub Actions when monitored files change. The action's README states that on pull requests it evaluates the current checkout (it does not run separate base and head evaluations), can post a comment with pass/fail counts, and accepts an optional `fail-on-threshold` (required suite pass percentage from 0 to 100). Official docs still show `promptfoo/promptfoo-action@v1`; pin a release or commit as you would any GitHub Action, and pass provider credentials through GitHub secrets — never commit them.\n\nUse Promptfoo when you want evals as files in the repo, a local red-team loop, or a CI check that does not depend on a Langfuse dataset. Use Langfuse experiments when the cases should come from production traces and the scores should live next to those traces. Most teams will want both.\n\n## Alternatives and going further\n\n- **Other platforms.** If you prefer not to standardize on Langfuse, the same OpenInference or OpenLLMetry traces can go to any OTLP backend. Start with the [observability platform comparison](https://indexagentica.com/compare/agent-observability-platforms/) for [Opik](https://indexagentica.com/entries/opik/), [Laminar](https://indexagentica.com/entries/laminar/), [Arize Phoenix](https://indexagentica.com/entries/arize-phoenix/) and [Braintrust](https://indexagentica.com/entries/braintrust/).\n- **Inspect.** [Inspect](https://indexagentica.com/entries/inspect-ai/) is a framework for large language model evaluations from the UK AI Security Institute, with a companion library of evaluations in [Inspect Evals](https://indexagentica.com/entries/inspect-evals/). Use it when you want a research-style eval harness rather than a production tracing platform.\n- **Langfuse MCP and skills.** [Langfuse MCP](https://indexagentica.com/entries/langfuse-mcp/) lets an assistant read and write Langfuse data over MCP. Official docs state that **both read and write tools are available by default**; if you only want read-only tools, configure your MCP client with an allowlist. If you can install CLI tools, Langfuse currently recommends the [Langfuse Agent Skill](https://indexagentica.com/entries/langfuse-skills/) over the MCP server for that environment.\n- **Published benchmarks.** Catalog entries such as [τ-bench 2.0](https://indexagentica.com/entries/tau2-bench/), and the comparisons of [agent benchmarks](https://indexagentica.com/compare/agent-benchmarks/) and [newer agent eval sets](https://indexagentica.com/compare/newer-agent-eval-sets/), are useful for shared leaderboards. They are not a substitute for your own traces, datasets and CI gates.\n- **Security tests.** Pair this stack with [Test an agent for prompt injection](https://indexagentica.com/guides/test-an-agent-for-prompt-injection/) and the [red-teaming comparison](https://indexagentica.com/compare/llm-red-teaming-tools/) when the failure mode is an attack rather than a quality regression.\n\nFor a worked loop with official SDK snippets across more than one platform, follow [Evaluate an AI agent](https://indexagentica.com/guides/evaluate-an-ai-agent/). Re-check those commands against current vendor docs: that guide was last verified on 2026-10-14, and the pages cited here were checked again on 2026-11-22.\n\n## Caveats\n\n- The OpenTelemetry GenAI conventions are still in Development. Langfuse maps a range of community attribute names because the conventions are evolving; do not assume every attribute is interpreted the same way in every backend.\n- Langfuse's OTLP intake is HTTP only (JSON or protobuf), not gRPC. Confirm the `/api/public/otel` path and the v4 ingestion header on the version you actually run.\n- Self-hosted Langfuse needs PostgreSQL, Redis/Valkey, ClickHouse and blob storage, as documented on the self-hosting page. Some add-on features need a license key. This article does not quote prices.\n- Promptfoo evals are local, but official docs warn that red-team generation may call hosted services. Review Promptfoo's data-handling notes before you scan production prompts.\n- GitHub Actions that call model providers will spend API budget. Keep keys in secrets, pin action versions, and start the gate on a small required dataset.\n",
  "html": "<h2>Why this stack</h2>\n<p>The catalog already has a <a href=\"/guides/evaluate-an-ai-agent/\">hands-on evaluation loop</a> and a <a href=\"/compare/agent-observability-platforms/\">comparison of observability platforms</a>. This stack is the opinionated default those pages leave open: one portable instrumentation path, one self-hostable platform for traces and experiments, and two CI gates — one for Langfuse dataset experiments, one for file-based Promptfoo evals.</p>\n<p>It is also distinct from the <a href=\"/stacks/research-agent/\">research agent stack</a>, which includes Langfuse as a single tracing component. Here observability and evaluation are the whole design.</p>\n<h2>How the pieces fit</h2>\n<ol><li>Instrument the agent so every model call, tool use, retrieval step and agent turn becomes an OpenTelemetry span, following the <a href=\"/entries/otel-genai-semconv/\">GenAI semantic conventions</a> and, in practice, <a href=\"/entries/openinference/\">OpenInference</a> libraries.</li><li>Export those spans over OTLP to <a href=\"/entries/langfuse/\">Langfuse</a>. Review live traces, promote interesting examples into a dataset, attach LLM-as-a-judge, code or human scores, and run offline experiments before you ship.</li><li>In GitHub Actions, run the same Langfuse experiments with <a href=\"/entries/langfuse-experiment-action/\">langfuse/experiment-action</a> and fail the job when a score violates your threshold.</li><li>Keep a second, declarative eval suite in <a href=\"/entries/promptfoo/\">Promptfoo</a> (<code>promptfooconfig.yaml</code>) for local runs and for <a href=\"/entries/promptfoo-action/\">promptfoo-action</a> on pull requests. Use Promptfoo&#39;s red-teaming when you also need automated vulnerability scans; compare red-team tools in <a href=\"/compare/llm-red-teaming-tools/\">Open-source red-teaming tools for LLM apps and agents</a>.</li></ol>\n<p>You can swap the platform later because the traces are standard OTLP. You can also swap the CI gate if you only want one of the two eval styles.</p>\n<h2>Instrument with OpenTelemetry</h2>\n<p>The <a href=\"https://raw.githubusercontent.com/open-telemetry/semantic-conventions-genai/main/docs/gen-ai/README.md\">OpenTelemetry GenAI semantic conventions</a> now live in their own repository, <a href=\"https://github.com/open-telemetry/semantic-conventions-genai\">open-telemetry/semantic-conventions-genai</a>. As of this writing the documents are marked <strong>Development</strong>. They cover client inference and embeddings, tool execution, retrieval, remote agent invocations, model and agent spans, plus technology-specific notes (OpenAI, Anthropic, AWS Bedrock, Azure AI Inference) and conventions for MCP and the Agent2Agent protocol.</p>\n<p><a href=\"/entries/openinference/\">OpenInference</a> builds on OpenTelemetry with a span-kind taxonomy and attribute schema for LLM calls, agents, tools, retrievers and embeddings. Instrumentation packages exist for Python, JavaScript, Java and Go. The project&#39;s official site is <a href=\"https://openinf.dev/\">openinf.dev</a>; the README states that traces are natively supported by Arize Phoenix and Arize AX, and that they work with any OpenTelemetry-compatible backend because they are standard OTLP traces.</p>\n<p>If you already emit <a href=\"/entries/openllmetry/\">OpenLLMetry</a> or <a href=\"/entries/openlit/\">OpenLIT</a> spans, OpenInference documents span processors that convert those traces into OpenInference form. OpenLLMetry itself is a set of Apache-2.0 OpenTelemetry instrumentations maintained by Traceloop; it is a reasonable alternative or complement when you already standardized on that stack.</p>\n<h2>Inspect and evaluate in Langfuse</h2>\n<p><a href=\"/entries/langfuse/\">Langfuse</a> is open source. Official docs say you can use <a href=\"https://langfuse.com/docs/observability/get-started\">Langfuse Cloud</a> or <a href=\"https://langfuse.com/self-hosting\">self-host</a> it with Docker, Kubernetes or VMs, and that the instrumentation code is the same for both. Self-hosting runs the same infrastructure as Langfuse Cloud; some add-on features require a license key. The open-source portions of the repository are available under the MIT Expat license; content under documented <code>ee/</code> paths uses a separate license.</p>\n<p>Langfuse receives traces on the <code>/api/public/otel</code> OTLP endpoint (HTTP/JSON or HTTP/protobuf; official docs say gRPC is not supported yet). For a self-hosted instance the same path applies; docs give <code>http://localhost:3000/api/public/otel</code> as the local example and note that the OpenTelemetry endpoint was introduced in Langfuse v3.22.0. Authentication is HTTP Basic. When you send spans directly via OpenTelemetry, Langfuse v4 docs also ask for an <code>x-langfuse-ingestion-version: 4</code> header so new data appears in real time on the v4 data model; without it, directly ingested OpenTelemetry data can be delayed by up to 10 minutes.</p>\n<p>A minimal exporter configuration, using the official EU Cloud endpoint, looks like this (put the base64-encoded public and secret key pair in <code>AUTH_STRING</code>, and see the <a href=\"https://langfuse.com/integrations/native/opentelemetry\">OpenTelemetry page</a> for US, Japan, HIPAA and self-hosted URLs):</p>\n<pre><code class=\"language-bash\">export OTEL_EXPORTER_OTLP_ENDPOINT=&quot;https://cloud.langfuse.com/api/public/otel&quot;\nexport OTEL_EXPORTER_OTLP_HEADERS=&quot;Authorization=Basic ${AUTH_STRING},x-langfuse-ingestion-version=4&quot;</code></pre>\n<p>Langfuse maps incoming GenAI, OpenInference and related attributes onto its data model. Official docs warn that if you want to filter or aggregate by identifiers such as <code>userId</code>, <code>sessionId</code>, metadata, version, release or tags, you should propagate those trace-level attributes to every span in the trace, not only the root.</p>\n<p>For Python or JavaScript/TypeScript, Langfuse also documents its own SDK as the preferred way to set Langfuse-specific attributes, media and export. This stack still recommends OTLP plus OpenInference so a second backend (for example <a href=\"/entries/arize-phoenix/\">Arize Phoenix</a> or <a href=\"/entries/opik/\">Opik</a>) can receive the same traces. The <a href=\"/compare/agent-observability-platforms/\">platform comparison</a> covers Langfuse, LangSmith, Phoenix, Braintrust, Opik and Laminar, including license and self-host notes.</p>\n<p>Once traces are flowing, Langfuse evaluation runs both <strong>online</strong> (scoring live production traces) and <strong>offline</strong> (running your application against a pre-defined dataset). A <a href=\"https://langfuse.com/docs/evaluation/experiments/datasets\">dataset</a> is a collection of inputs and expected outputs; official docs highlight creating test cases from real production traces. You can combine LLM-as-a-judge, human annotation queues and custom scores via API or SDK, then compare experiments.</p>\n<h2>Gate changes in CI</h2>\n<p>Langfuse&#39;s <a href=\"https://langfuse.com/docs/evaluation/experiments/experiments-ci-cd\">experiments in CI/CD</a> workflow is: create a dataset, write an experiment with the Python or JS/TS SDK, add evaluators, raise <code>RegressionError</code> when a score violates your threshold, and run the script with <a href=\"https://github.com/langfuse/experiment-action\">langfuse/experiment-action</a>. Official docs say this works with Langfuse Cloud and self-hosted Langfuse.</p>\n<p>The action loads the experiment script, runs it against a Langfuse dataset, comments the result on the pull request, and optionally fails the job when a regression is detected. <code>should_fail_on_regression</code> defaults to true. Pin the action to a release from the <a href=\"https://github.com/langfuse/experiment-action/releases\">experiment-action releases</a> (the official workflow example also recommends pinning to a release SHA). Store the Langfuse public and secret keys as GitHub secrets; set <code>langfuse_base_url</code> when you are not using the default <code>https://cloud.langfuse.com</code>.</p>\n<p>Treat the CI gate as a release policy, not a scoreboard. Langfuse docs distinguish &quot;every required case must pass&quot; from &quot;no approved passing case may regress,&quot; and they say missing cases, duplicate IDs, task failures, and missing or invalid evaluator results must fail the gate rather than count as passes.</p>\n<h2>Config-file evals and red teaming</h2>\n<p><a href=\"/entries/promptfoo/\">Promptfoo</a> is an open-source CLI and library for evaluating and red-teaming LLM apps. You describe prompts, providers and test cases in a config file (the getting-started example uses <code>promptfooconfig.yaml</code>), run <code>promptfoo eval</code>, and inspect results in a web viewer. Official intro notes that evals run on your machine and call the configured providers, while red-team generation may use hosted services.</p>\n<p><a href=\"/entries/promptfoo-action/\">promptfoo-action</a> runs that config in GitHub Actions when monitored files change. The action&#39;s README states that on pull requests it evaluates the current checkout (it does not run separate base and head evaluations), can post a comment with pass/fail counts, and accepts an optional <code>fail-on-threshold</code> (required suite pass percentage from 0 to 100). Official docs still show <code>promptfoo/promptfoo-action@v1</code>; pin a release or commit as you would any GitHub Action, and pass provider credentials through GitHub secrets — never commit them.</p>\n<p>Use Promptfoo when you want evals as files in the repo, a local red-team loop, or a CI check that does not depend on a Langfuse dataset. Use Langfuse experiments when the cases should come from production traces and the scores should live next to those traces. Most teams will want both.</p>\n<h2>Alternatives and going further</h2>\n<ul><li><strong>Other platforms.</strong> If you prefer not to standardize on Langfuse, the same OpenInference or OpenLLMetry traces can go to any OTLP backend. Start with the <a href=\"/compare/agent-observability-platforms/\">observability platform comparison</a> for <a href=\"/entries/opik/\">Opik</a>, <a href=\"/entries/laminar/\">Laminar</a>, <a href=\"/entries/arize-phoenix/\">Arize Phoenix</a> and <a href=\"/entries/braintrust/\">Braintrust</a>.</li><li><strong>Inspect.</strong> <a href=\"/entries/inspect-ai/\">Inspect</a> is a framework for large language model evaluations from the UK AI Security Institute, with a companion library of evaluations in <a href=\"/entries/inspect-evals/\">Inspect Evals</a>. Use it when you want a research-style eval harness rather than a production tracing platform.</li><li><strong>Langfuse MCP and skills.</strong> <a href=\"/entries/langfuse-mcp/\">Langfuse MCP</a> lets an assistant read and write Langfuse data over MCP. Official docs state that <strong>both read and write tools are available by default</strong>; if you only want read-only tools, configure your MCP client with an allowlist. If you can install CLI tools, Langfuse currently recommends the <a href=\"/entries/langfuse-skills/\">Langfuse Agent Skill</a> over the MCP server for that environment.</li><li><strong>Published benchmarks.</strong> Catalog entries such as <a href=\"/entries/tau2-bench/\">τ-bench 2.0</a>, and the comparisons of <a href=\"/compare/agent-benchmarks/\">agent benchmarks</a> and <a href=\"/compare/newer-agent-eval-sets/\">newer agent eval sets</a>, are useful for shared leaderboards. They are not a substitute for your own traces, datasets and CI gates.</li><li><strong>Security tests.</strong> Pair this stack with <a href=\"/guides/test-an-agent-for-prompt-injection/\">Test an agent for prompt injection</a> and the <a href=\"/compare/llm-red-teaming-tools/\">red-teaming comparison</a> when the failure mode is an attack rather than a quality regression.</li></ul>\n<p>For a worked loop with official SDK snippets across more than one platform, follow <a href=\"/guides/evaluate-an-ai-agent/\">Evaluate an AI agent</a>. Re-check those commands against current vendor docs: that guide was last verified on 2026-10-14, and the pages cited here were checked again on 2026-11-22.</p>\n<h2>Caveats</h2>\n<ul><li>The OpenTelemetry GenAI conventions are still in Development. Langfuse maps a range of community attribute names because the conventions are evolving; do not assume every attribute is interpreted the same way in every backend.</li><li>Langfuse&#39;s OTLP intake is HTTP only (JSON or protobuf), not gRPC. Confirm the <code>/api/public/otel</code> path and the v4 ingestion header on the version you actually run.</li><li>Self-hosted Langfuse needs PostgreSQL, Redis/Valkey, ClickHouse and blob storage, as documented on the self-hosting page. Some add-on features need a license key. This article does not quote prices.</li><li>Promptfoo evals are local, but official docs warn that red-team generation may call hosted services. Review Promptfoo&#39;s data-handling notes before you scan production prompts.</li><li>GitHub Actions that call model providers will spend API budget. Keep keys in secrets, pin action versions, and start the gate on a small required dataset.</li></ul>"
}
