Skip to main content
Run these from the root of your Python agent repo.

Paste this into your coding agent

Install `uv add --dev kensa`, run `uv run kensa init`, then use the `kensa-evals` skill to follow the eval lifecycle.
Your coding agent adds Kensa, runs the CLI setup, wires the harness, and can turn trace evidence or one realistic case into your first eval. Works with:

Or install yourself, then ask your agent

If you want to control the install step but still let your coding agent drive the eval workflow. For uv projects:
uv add --dev kensa
uv run kensa init
For pip projects:
python -m pip install kensa
kensa init
For projects that track dependencies with requirements.txt, add a line:
kensa
Then ask your coding agent to run the generated kensa-evals skill. In interactive mode, kensa init asks for the first trace source: Langfuse, an existing trace export, or local Kensa trace capture. kensa init scaffolds tests/evals/conftest.py (the kensa_run harness), a tests/evals/test_kensa_smoke.py smoke eval, a GitHub Actions workflow, and the coding-agent instructions.

Or CLI-only

If you want to drive Kensa directly:
kensa init
kensa doctor
kensa connect langfuse
kensa import --from langfuse --limit 50
kensa traces sample --json
kensa eval
kensa import writes redacted trace evidence to .kensa/traces/imports/. Read it with kensa traces list/sample/get, then turn it into evals: the kensa-inspect skill proposes a YAML review queue you validate with kensa inspect lint, you approve ideas, and the kensa-generate skill materializes tests/evals/test_<id>.py. If you do not have traces yet, capture a local run with kensa.instrument() and import the JSONL, then run kensa eval.

What kensa init wires up

kensa init connects the harness so your eval can reach your real agent. You implement one fixture, kensa_run, in tests/evals/conftest.py:
import pytest

from kensa.tracing import record_tool_call


@pytest.fixture
def kensa_run():
    def _run(case):
        # Call your real agent / app here.
        with record_tool_call("lookup_customer"):
            ...
        return {"message": "I need order history before issuing a refund."}

    return _run
kensa doctor then verifies the harness is wired to a real agent boundary before you trust any verdict.

Next

  • Concepts — cases, traces, assertions, judges, trials
  • Cases — define inputs and trials with kensa_case
  • Tracing & importskensa connect, kensa import, local capture
  • CLI reference — the full command surface
Last modified on July 7, 2026