File size: 2,178 Bytes
b3b12cd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | """AgentPulse — pipeline entrypoint.
Usage:
python main.py # Run the full collect → score → write loop once
python main.py --collect-only # Run collectors, skip scoring
python main.py --score-only # Recompute scores from existing signals
python main.py --reproduce # Reproduce the paper's headline result (Table 3)
"""
import argparse
import logging
import sys
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
)
log = logging.getLogger("agentpulse")
def collect():
"""Collect 18 signals across the agent registry."""
from collectors.agent_signals import AgentSignalCollector
from collectors.agent_benchmarks import AgentBenchmarkCollector
log.info("Collecting agent benchmark signals…")
AgentBenchmarkCollector().collect()
log.info("Collecting agent multi-source signals…")
AgentSignalCollector().collect()
def score():
"""Aggregate raw signals into the four-factor composite (Section 3)."""
from scoring.agent_scoring_v2 import compute_agent_scores
log.info("Computing four-factor composite scores…")
compute_agent_scores()
def reproduce():
"""Reproduce the paper's headline cross-factor predictive validity result."""
from scoring.agent_scoring_v2 import reproduce_table_3
reproduce_table_3()
def main():
parser = argparse.ArgumentParser(
description="AgentPulse — continuous multi-signal evaluation of AI agents"
)
parser.add_argument("--collect-only", action="store_true",
help="Only run collectors; skip scoring")
parser.add_argument("--score-only", action="store_true",
help="Only recompute scores from existing signals")
parser.add_argument("--reproduce", action="store_true",
help="Reproduce the paper's Table 3 headline result")
args = parser.parse_args()
if args.reproduce:
reproduce()
return
if args.score_only:
score()
return
collect()
if not args.collect_only:
score()
if __name__ == "__main__":
sys.exit(main() or 0)
|