Designing Bitcoin SDKs for Autonomous AI Agents
Research status: Theoretical SDK design. Examples are illustrative and have not been built or tested against the live engine.
Capability boundaries
An agent SDK should expose a small set of typed capabilities rather than arbitrary HTTP access. The model proposes an operation; the application validates its parameters and authority; the engine executes the documented request. A successful model response is not evidence of a Bitcoin transaction. Preserve the engine response and its request identifier separately from the conversational explanation.
Bind a client to one wallet and one network. Separate observation capabilities (balance and transaction status) from address allocation, watch registration and spending. A merchant agent can operate with watch-oriented application permissions, while a personal payment agent can request sends. These are proposed SDK policies, not claims that the engine issues scoped credentials. If the underlying key permits broader operations, the trusted executor must retain it and enforce the boundary.
Conceptual Python interface
class AgentWallet:
def __init__(self, wallet, policy):
self.wallet = wallet
self.policy = policy
def balance(self, address_type):
self.policy.require("balance")
return self.wallet.balance(address_type)
def propose_send(self, destination, amount_sat):
self.policy.require("propose_send")
return self.policy.create_intent(destination, amount_sat)The proposal is not a broadcast. The application stores the intent, obtains authorization where required, and calls a separate executor. No model-generated string is evaluated as code. Wallet keys stay outside model context and tool results.
Observations and uncertainty
Represent warming balances, unavailable services and unknown transaction outcomes as distinct states. An agent must not treat a missing balance as zero or a timeout as proof of failure. Keep transaction status, observed confirmations and observation time together. A later observation may change after a reorganization.
Acceptance plan
Test an agent with read-only permissions, a denied send, an approved testnet send and a simulated lost response. Verify that unauthorized operations never reach the transport. Compare the permitted request and returned transaction evidence with the engine reference. Record model proposals separately from execution records. No autonomy or successful payment is established by this design alone.
Primary reference
https://thamer.org/api
Related reading
https://thamer.org/docs/wab-sdk-idempotency-retry-strategies
https://thamer.org/docs/wab-sdk-authentication-credential-management
https://thamer.org/docs/wab-sdk-ai-agent-tools
https://thamer.org/docs/wab-sdk-openai-tool-interfaces
https://thamer.org/docs/wab-sdk-agent-spending-authorization
https://thamer.org/docs/wab-sdk-deterministic-ai-payments
https://thamer.org/docs/wab-sdk-mcp-wallet-tools
