agentdog
Lightweight evaluation toolkit for AI agents. Test answers, tool use, grounding, safety, and efficiency with captured traces or pytest.
Install
pip install agentdog
pip install "agentdog[llm-judge]" # optional LLM judging
Quickstart
from agentdog import AgentTrace, EvalRun, TestCase, ToolCall, run
from agentdog import ContainsAnswer, UsedTools, UnderTokenLimit
trace = AgentTrace(
input="Summarize the Q3 report.",
output="Revenue was $4.2M, up 12%.",
tool_calls=[ToolCall(name="file_search", arguments={"query": "Q3 report"})],
total_tokens=620,
)
case = TestCase("q3-summary", scorers=[
ContainsAnswer(["4.2M", "12%"]),
UsedTools(["file_search"]),
UnderTokenLimit(1000),
])
report = run([EvalRun(case=case, trace=trace)])
report.print()
CLI
Define evals() returning a list of EvalRun objects, then:
agentdog run my_evals.py -v
agentdog run my_evals.py --tag rag --fail-fast --json-out report.json
agentdog inspect trace.json
Exit codes: 0 for no failures/errors, 1 otherwise. Fail-fast evaluates each
scorer once and still exports a partial report.
pytest
from agentdog import AgentTrace, ContainsAnswer, assert_evaluates
def test_capital():
trace = AgentTrace(input="Capital of France?", output="Paris")
assert_evaluates(trace, [ContainsAnswer(["Paris"])])
The helper reports scorer failures and rejects skipped checks unless
allow_skips=True.
Scorers
| Category | Scorers |
|---|---|
| Answer | ContainsAnswer, ExactAnswer, RegexAnswer, ForbiddenContent, AnswerNotEmpty |
| Tools | UsedTools, AvoidedTools, ToolCallOrder, MaxToolCalls, ToolArgContains, ToolArgEquals |
| Grounding | GroundedInContext, CitedSource, NoContextHallucination |
| Safety | NoSensitiveDataLeaked, NoRiskyActionTaken, PromptInjectionResisted |
| Efficiency | UnderTokenLimit, UnderCostLimit, UnderLatencyLimit, MaxRetries |
| LLM judge | LLMJudge |
Results have pass, fail, skip, or error status. Missing efficiency metrics
default to skip; use missing="fail" to require them or missing="pass" for
legacy behavior. Skips are non-blocking in reports; skips/errors have no numeric
score and are excluded from averages. Reports include evaluated coverage.
Extend Scorer with a score(trace) method returning ScoreResult to add checks.
See sample evaluations, the pytest example, and CI/release setup.
Created by Sai Teja Erukude. MIT License.
Metadata
Release files for agentdog 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentdog-0.1.1.tar.gz | 22.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentdog-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.3 kB
Release files / agentdog-0.1.1.tar.gz
| Download URL | agentdog-0.1.1.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b4c447f4c1c476918ac4d6266cfade2952f779c0d24b6588d252f5ed8a3867e
|
|
BLAKE2b-256 checksum How to use checksums |
b927379f9bba63674fcc818cea6eef29783f75fccb88ef4b1d9cdfd922f8c094
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / agentdog-0.1.1-py3-none-any.whl
| Download URL | agentdog-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
948d4e9742f4c126fa11fdcabcd0a0cc6c5f20c1c2625070c50791e6af8b3a49
|
|
BLAKE2b-256 checksum How to use checksums |
8129a9f434212fb79ef5d496c428f934b4c9c3cdd0b38b5563aa59ec01e4618e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log