langfuse/Langfuse Experiment

Run a Langfuse experiment in CI, gate on regressions, and comment results on the PR.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
langfuse_public_keyLangfuse public API key.yes
langfuse_secret_keyLangfuse secret API key.yes
langfuse_base_urlLangfuse base URL.nohttps://cloud.langfuse.com
experiment_pathPath to an experiment script (.py/.ts/.js/.mjs), a directory, or a glob pattern.yes
dataset_nameDataset to run the experiment against. If omitted, the user script is expected to select its own dataset.no
dataset_versionPin experiment to a specific dataset version.no
experiment_metadataAdditional metadata to attach to the experiment run. Multiline, one `key=value` per line. Shown under the Metadata column in the Langfuse UI.no
should_fail_on_regressionFail the CI job when an experiment raises `RegressionError`.notrue
should_fail_on_script_errorFail the CI job when an experiment script crashes or raises a non-regression error.notrue
should_comment_on_prPost the experiment report as a PR comment.notrue
python_sdk_versionVersion of the Langfuse Python SDK to install via pip (for `.py` experiments). Use a specific version string or `latest`.no4.6.0b1
js_sdk_versionVersion of the Langfuse JS SDK (`@langfuse/client`) to install via npm (for `.ts` / `.js` / `.mjs` experiments). Use a specific version string or `latest`.no5.3.0-beta.0
should_skip_sdk_installationSkip installing the Langfuse SDK entirely. Use this when you manage the Python/Node environment yourself (e.g. with your own `pip install` / `npm install` step before this action) — the action then trusts the ambient environment to provide `langfuse` / `@langfuse/client` + `tsx`.nofalse
github_tokenWorkflow GitHub token. Used to (1) post the PR comment — needs `pull-requests: write`, and (2) resolve the current job via the REST API so the comment links to this specific job and parallel matrix legs get their own comment sections — needs `actions: read`, otherwise falls back to the workflow-run URL and the job key from `$GITHUB_JOB`. Leave blank to skip the PR comment and the job lookup. See the README for a usage example.no""
namedescription
result_jsonVersioned JSON envelope with action metadata and normalized experiment results. See README for the schema.
failed'true' if any experiment script errored or raised a regression, else 'false'.