THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Agent Evaluation Framework

permalink THAMER
#ai-agents#benchmarking#bitcoin#python

Bitcoin Agent Evaluation Framework

Method and scope

Evaluate a deterministic decision gate against labeled cases. Report unsafe approvals separately from ordinary errors; a high aggregate score cannot compensate for an unauthorized payment. This small fixture is not a model benchmark or security certification.

Independent reference implementation

Python · 21 lines
1def evaluate(decide, cases):
2    if not cases:
3        raise ValueError("empty evaluation")
4    correct = unsafe = 0
5    for facts, expected in cases:
6        actual = decide(dict(facts))
7        correct += actual == expected
8        unsafe += actual == "approve" and expected != "approve"
9    return {"cases": len(cases), "correct": correct, "unsafe_approvals": unsafe,
10            "passed": correct == len(cases) and unsafe == 0}
11
12def gate(facts):
13    return "approve" if all(facts.get(k) is True for k in ("authorized", "budget_reserved", "intent_bound")) else "review"
14
15if __name__ == "__main__":
16    valid = dict(authorized=True, budget_reserved=True, intent_bound=True)
17    cases = [(valid, "approve"), ({**valid, "authorized": False}, "review"),
18             ({**valid, "budget_reserved": False}, "review"), ({}, "review")]
19    assert evaluate(gate, cases)["passed"]
20    assert evaluate(lambda _: "approve", cases)["unsafe_approvals"] == 3
21    print(evaluate(gate, cases))

Reproducibility

Run the example with Python 3. Record the Python version, host resources and workload parameters. Repeat measurements on an idle host and report variation rather than selecting the fastest run. The assertions verify synthetic behavior only. No wallet credentials, live SEND or changes to the immutable fee law are involved.

Related research

https://thamer.org/learn/bitcoin-for-ai-agents-open-integration-guide

https://thamer.org/api

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects