Bitcoin for Agents
Complete guide to Bitcoin fundamentals for AI agents. UTXOs, addresses, transactions, keys, and permissionless value transfer.
Bitcoin for Agents
Bitcoin is a decentralized digital currency that operates without a central authority. For AI agents, it represents permissionless value transfer—the ability to send and receive value without requiring approval from any intermediary.
Why Agents Need Bitcoin
| Capability | Benefit for Agents |
|---|---|
| Permissionless | No KYC, no approval needed |
| Programmable | Scripted spending conditions |
| Global | Works anywhere with internet |
| Censorship-resistant | No single point of control |
| Verifiable | Agents can validate independently |
Core Concepts
The UTXO Model
Bitcoin uses Unspent Transaction Outputs (UTXOs) as its accounting model. Think of UTXOs as discrete “coins” that must be spent entirely.
Address Formats
Bitcoin addresses have evolved through multiple formats:
| Format | Prefix | Use Case |
|---|---|---|
| Legacy (P2PKH) | 1... | Original, highest fees |
| Script (P2SH) | 3... | Multisig, wrapped SegWit |
| SegWit (P2WPKH) | bc1q... | Lower fees, recommended |
| Taproot (P2TR) | bc1p... | Privacy, smart contracts |
Transactions
A transaction consumes inputs (existing UTXOs) and creates new outputs.
Inputs (UTXOs) → Transaction → Outputs (new UTXOs)
↓
Fee (to miners)
Keys and Signatures
Bitcoin uses elliptic curve cryptography (secp256k1) for key generation and transaction signing.
→ Deep dive: Keys and Signatures
Agent-Relevant APIs
For querying Bitcoin data, use the mempool.space API:
# Check address balance
curl https://mempool.space/api/address/{address}/utxo
# Get transaction details
curl https://mempool.space/api/tx/{txid}
# Current fee estimates
curl https://mempool.space/api/v1/fees/recommended
→ Full API Reference: mempool.space
Learning Path
Fundamentals
- UTXO Model - How Bitcoin tracks ownership
- Address Formats - Types of Bitcoin addresses
- Transactions - Structure and creation
- Keys and Signatures - Cryptographic foundations
- Fees - Fee estimation and optimization
- Wallets - Wallet types for agents
BIP Specifications
Essential Bitcoin Improvement Proposals:
- BIP-32 - HD Wallets
- BIP-39 - Mnemonic Seeds
- BIP-84 - Native SegWit Derivation
- BIP-174 - Partially Signed Transactions (PSBT)
Reference
Quick Start for Agents
- Query an address: Use mempool.space API to check balances
- Parse a transaction: Understand inputs, outputs, fees
- Verify a payment: Confirm transaction inclusion in a block
- Estimate fees: Get current sat/vB recommendations
→ Install btc-check skill for immediate Bitcoin capabilities.
Machine-Readable Summary
{
"topic": "bitcoin",
"audience": "ai-agents",
"prerequisites": [],
"outcomes": [
"understand-utxo-model",
"recognize-address-formats",
"parse-transactions",
"query-blockchain-apis"
],
"related_skills": ["btc-check"],
"api_endpoints": [
"https://mempool.space/api"
]
}