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

Can an AI Agent Learn a Bitcoin API Without Access to Its Source Code?

permalink THAMER
#ai-agents#bitcoin#chatgpt#codex#engineering#wab

Answer

An agent can learn how to integrate with a documented API without inspecting the implementation of every operation. The WAB laboratory provides a concrete example: Codex used the public API reference when a local request-format file was inaccessible. This does not establish that the agent never saw any engine files; it establishes that the documented interface was sufficient for the recorded transfer workflow.

Three sources of integration evidence

The API directory identifies advertised operations. The health endpoint reports service and network state. Operation-specific requests reveal actual behavior, including errors. None of these sources alone establishes complete correctness.

The first receiving-address attempt returned AUTH_REQUIRED despite HTTP 200. Restoring the wallet identity changed the outcome. A later transfer requested 13,000 satoshis and produced an 11,700-satoshi recipient output. The explorer reported 257 satoshis in miner fees. These are separate quantities; the SDK should preserve their meaning rather than treating the requested amount as the delivered amount.

JSON · 51 lines
1{
2  "address": "tb1psh2cccytue3semqpafwrdelse99jk5sydmftwyyjv5qzlekewpwqn9q3lm",
3  "segwit_before": {
4    "confirmed_sat": 132437,
5    "spendable_sat": 132437
6  },
7  "taproot_before": {
8    "confirmed_sat": 0,
9    "incoming_unconfirmed_sat": 0
10  },
11  "send": {
12    "txid": "c00fa63c0c1e96cf0230234e790a03d18bcbc9b65fb8667e061f458661488334",
13    "requested_sat": 13000,
14    "recipient_sat": 11700,
15    "sent_sat": 11700
16  },
17  "initial_tx_status": {
18    "status": "mempool",
19    "confirmations": 0
20  },
21  "taproot_after": {
22    "confirmed_sat": 0,
23    "incoming_unconfirmed_sat": 11700
24  },
25  "taproot_recheck": {
26    "confirmed_sat": 0,
27    "incoming_unconfirmed_sat": 11700
28  },
29  "explorer": {
30    "confirmed": false,
31    "destination_sat": [
32      11700
33    ],
34    "miner_fee_sat": 257
35  },
36  "delivery_followup": {
37    "checked_at": "2026-11-28 03:37:33 UTC",
38    "tx_status": {
39      "ok": true,
40      "status": "confirmed",
41      "confirmations": 1,
42      "block_hash": null
43    },
44    "taproot_balance": {
45      "ok": true,
46      "confirmed_sat": 11700,
47      "incoming_unconfirmed_sat": 0,
48      "spendable_sat": 11700
49    }
50  }
51}

Designing a black-box test

A proposed conformance test would record the network, wallet type, request identifier, application status and expected result fields. For a send, it would additionally compare the recipient output and eventual wallet balance. Negative cases should include invalid authorization and malformed requests, using a controlled test environment.

This is a proposed testing method, not a claim that a complete SDK conformance suite has already run. The recorded transfer demonstrates that documentation plus live observations can support useful integration without requiring changes to the engine.

Primary lab references

https://thamer.org/api

https://thamer.org/ask/wab-agent-first-testnet-payment

https://thamer.org/ask/wab-api-v5-health-and-discovery

https://thamer.org/ask/wab-agent-taproot-testnet-transfer

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