Observed since 20 Oct, 22:34 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Local-first observability + eval for AI agents: trace runs, detect loops, render an HTML report. No backend.
Local-first observability + eval for AI agents.
Capture every step your agent takes — thoughts, tool calls, tokens, latency, errors — automatically detect when it gets stuck in a loop, and render the whole run to a self-contained HTML report. No backend, no account, no cloud. The core is stdlib-only.
Working name. Easy to rename.
Site: a static landing page + docs live in site/ — open
site/index.html in a browser (no build step).
Most agent tools either (a) only score the final answer, missing mistakes that
happen mid-run, or (b) require a hosted dashboard (Postgres + ClickHouse, an
account, a cloud). agentlens is the opposite: one trace object, many
lenses, running entirely on your laptop.
pip install -e .
from agentlens_eval import Tracer, detect_loops
from agentlens_eval.report import generate_html
tracer = Tracer("my-agent")
with tracer.step("user wants the weather") as step:
step.tool_call("get_weather", {"city": "NYC"},
result="72F", tokens=120, latency_ms=800)
warnings = detect_loops(tracer.trace)
generate_html(tracer.trace, "report.html", warnings=warnings, open_browser=True)
Or just run the demo:
python example.py # writes report.html
Tracer / Step / Trace; latency timed automatically.Contains, Regex, Equals,
ToolWasCalled, MaxSteps, MaxTokens, NoErrors, NoLoops) plus an
Eval / Case runner that produces a pass_rate you can gate CI on, and an
HTML eval report with per-case pass/fail.LLMJudge("criteria") for grading open-ended outputs
with Claude. It's the only metric that costs tokens, so the rest of your suite
stays cheap and deterministic.from agentlens_eval import Eval, Case, metrics
report = Eval("my-agent", my_agent).run([
Case("weather in NYC", [metrics.Contains("72"), metrics.ToolWasCalled("get_weather")]),
])
report.summary()
assert report.pass_rate == 1.0 # CI gate
See example_eval.py for a full dataset.
Run your evals as normal tests — one pass/fail row per case:
from agentlens_eval import Case, metrics
from agentlens_eval.testing import parametrize, check
DATASET = [Case("weather in NYC", [metrics.Contains("72")], name="weather")]
@parametrize(DATASET)
def test_agent(case):
check(my_agent, case).assert_passed()
pytest -v # tests/test_agent_eval.py::test_agent[weather] PASSED
Or gate a whole run: Eval(...).run(dataset).assert_passed(min_pass_rate=0.9).
The whole design is layers over the same Trace:
agentlens.wrap(client) one-line
auto-capture.pip install agentlens-eval (the bare
agentlens name is taken, so the distribution is agentlens-eval while the
import stays agentlens_eval).MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.0 | 7 Jun 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:34 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:8108140cea0c74b6e1a4523e78b55766d9134c7d0bd4970b054f30c888846cf7