Skip to main content

bifrost-eval

CI PyPI License: MIT Python Type Checked: pyright strict

MCP pipeline evaluation toolkit — grade AI agent workflows on accuracy, cost, and reliability.

Why

Most LLM evaluation tooling grades a single prompt against a single response. Multi-agent pipelines aren't single prompts — they're orchestrations. A "correct" answer reached by the wrong tool in the wrong order is still a regression. A correct answer that took 30 seconds and cost $0.40 isn't shippable. A correct answer 80% of the time isn't a product.

bifrost-eval grades the whole workflow as a unit. Did it get the right answer, with the right tools, in the right order, fast enough, cheap enough? It produces a single graded report so a change to the pipeline either improves the score or it doesn't.

Architecture

   scenarios ─▶  EvalRunner  ─▶  PipelineExecutor (your code)  ─▶  ExecutionTrace
                     │                                                    │
                     │                       ┌────────────────────────────┘
                     ▼                       ▼
                  Metrics                 outcomes
            ┌──────────────┐
            │ Accuracy     │
            │ ToolCorrect. │  ─▶  weighted score  ─▶  threshold/weighted grade
            │ Latency      │
            │ Cost         │
            └──────────────┘

What It Does

bifrost-eval evaluates multi-agent MCP pipelines as complete workflows, not just individual prompts. It answers:

  • Did the pipeline get the right answer? (accuracy scoring)
  • Did agents use the right tools in the right order? (tool correctness via Longest-Common-Subsequence)
  • How fast was it? (latency breakdown per agent/tool, p50/p95/p99 percentiles)
  • How much did it cost? (cost attribution per agent/tool)
  • How do different configurations compare? (A/B comparison — highest mean score wins)

Install

pip install bifrost-eval

With agent-mcp-framework integration:

pip install bifrost-eval[amf]

Quick Start

import asyncio
from bifrost_eval import (
    AccuracyMetric,
    CostEfficiencyMetric,
    EvalRunner,
    EvalSuite,
    LatencyMetric,
    Scenario,
    ToolCorrectnessMetric,
)

# Define test scenarios
suite = EvalSuite(
    name="my-agent-eval",
    scenarios=[
        Scenario(
            name="basic-query",
            input_data={"query": "What is 2+2?"},
            expected_output=4,
            expected_tool_calls=["calculator"],
        ),
    ],
)

# Implement PipelineExecutor protocol for your agent
class MyExecutor:
    async def execute(self, scenario):
        from bifrost_eval import ExecutionTrace
        # Run your agent pipeline here
        return ExecutionTrace(output=4, success=True)

# Run evaluation
runner = EvalRunner(
    executor=MyExecutor(),
    metrics=[
        AccuracyMetric(weight=2.0),
        ToolCorrectnessMetric(weight=1.0),
        LatencyMetric(target_ms=5000),
        CostEfficiencyMetric(budget_usd=0.10),
    ],
)

result = asyncio.run(runner.run_suite(suite))
print(f"Pass rate: {result.pass_rate:.0%}")
print(f"Grade: {result.grade.value}")
print(f"Total cost: ${result.total_cost.total_usd:.4f}")

A/B Comparison

from bifrost_eval.adapters.comparison import ComparisonRunner

comparator = ComparisonRunner(metrics=[AccuracyMetric(), CostEfficiencyMetric()])
result = await comparator.compare(
    suite,
    {"config-a": executor_a, "config-b": executor_b},
)
print(f"Winner: {result.winner}")

agent-mcp-framework Integration

from agent_mcp_framework import SequentialPipeline
from bifrost_eval.adapters.amf_adapter import AMFAdapter

pipeline = SequentialPipeline("my-pipeline", agents=[...])
adapter = AMFAdapter(pipeline)
runner = EvalRunner(executor=adapter, metrics=[...])

CLI

# Validate a suite file
bifrost-eval validate suite.json

# Show version
bifrost-eval --version

Metrics

Metric What It Measures Default Weight
AccuracyMetric Output correctness 1.0
ToolCorrectnessMetric Right tools, right order 1.0
LatencyMetric Speed vs target 1.0
CostEfficiencyMetric Cost vs budget 1.0

When to use this (and when not to)

Use bifrost-eval when… Reach for something else when…
You have a multi-agent or multi-tool pipeline you need to grade as a single workflow You only need to grade single-prompt single-response interactions (use lm-eval-harness or task-specific benchmarks)
You want statistical A/B comparisons between pipeline configurations You want a managed eval-as-a-service with a UI (use LangSmith, Weights & Biases)
You want a small library you can drop into a Python codebase You want a no-code eval product
You want strict type-checking and property-based-tested metric implementations You want a thousand pre-built benchmarks out of the box

Composes with

  • bifrost-rag — RAG pipeline + retrieval-quality metrics (Precision@K, Recall@K, F1, MRR). Use together to grade RAG-retrieval-then-agent workflows end-to-end.
  • bifrost-monitor — runtime observability for AI agents. Use together to evaluate offline + observe online.
  • agent-mcp-framework — multi-agent MCP pipeline framework. bifrost-eval ships a first-class adapter (bifrost_eval.adapters.amf_adapter).

Engineering bar

  • pyright strict type checking (zero ignores in metric implementations)
  • 80% test coverage gate enforced in CI
  • Hypothesis property-based fuzzing on metrics — score outputs bounded in [0.0, 1.0] over arbitrary inputs
  • Minimal runtime dependencies: pydantic only
  • MIT licensed

License

MIT

Metadata

Release files for bifrost-eval 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bifrost-eval 0.2.0
File Size Uploaded Provenance
bifrost_eval-0.2.0.tar.gz 21.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bifrost-eval 0.2.0
File Interpreter ABI Platform
bifrost_eval-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.3 kB

Release files / bifrost_eval-0.2.0.tar.gz

Download URL bifrost_eval-0.2.0.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
820d22f3c0d02a4a8781bf3586f1cb615fd8980b14828a3c288a8fca2bba8f89
BLAKE2b-256 checksum
How to use checksums
88159e4f2094d1a6074ea239d50bbe32c239f376a7aad73e0fcad03a2224b3a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / bifrost_eval-0.2.0-py3-none-any.whl

Download URL bifrost_eval-0.2.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ccd2853c3d72fa70d57e0694ee423b2479801322f923452a3acd951a775f27b
BLAKE2b-256 checksum
How to use checksums
c241797cc8a50f483c4d8f3fed4a7bc80706b465bb7cbb0e5bb195fb89023358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for bifrost-eval 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page