AIBRC¶
From Assets in Your Address to an Agent Economy on Bitcoin¶
Mainnet activation height: Bitcoin block 976720 · CC0 specification · MIT reference code.
Independent Protocols. Shared Foundations.¶
Bitcoin keeps inspiring new protocols, each bringing its own asset rules, wallet tools and application stack. Every new protocol can mean another round of integration work, making it harder for the ecosystem to build on what already exists.
AIBRC (Covenant Inscription) aims to establish common standards for assets, accounts and Agent applications. Protocols keep their native rules, while wallets, applications and Agents gain a shared interaction language and reusable infrastructure.
Blockchain ecosystems have shown what shared standards make possible: common asset interfaces and execution conventions let wallets, developer tools, markets and application frameworks build on one another. ERC-20 is a familiar example. An ecosystem grows through the tools and applications that people can reuse, combine and extend.
AIBRC brings that ambition to Bitcoin. The goal is to connect BRC-20, Runes and future protocols through shared ways to read, describe and interact with assets, laying the groundwork for cross-protocol markets, Agent collaboration and shared infrastructure.
Assets Live in Your Address¶
AIBRC draws on the account-balance model and common asset interfaces familiar from other blockchain ecosystems. Native AIBRC assets are recorded as balances on accounts derived from Bitcoin addresses.
One address can hold multiple AIBRC assets. Assets are not tied to individual satoshis, and there is no need to keep a separate carrier UTXO for each balance.
Bitcoin address
↓ corresponding scriptPubKey
AIBRC account
├─ Asset A balance
├─ Asset B balance
└─ Asset C balance
To transfer assets, the sender specifies the asset, amount and recipient, then authorizes the operation with an eligible Bitcoin input. Indexers apply the public authorization and balance rules before updating both accounts. There is no need to locate a particular UTXO carrying those tokens.
An ordinary BTC payment does not automatically move the AIBRC balance held by the same account. Asset transfers require a valid instruction. Bitcoin inputs, recipient outputs, change and miner fees continue to follow Bitcoin's transaction rules. AIBRC separates asset accounting from BTC coin selection, reducing the extra work of managing asset carriers, splits and tracking.
See how AIBRC, ERC-20, Runes and BRC-20 handle balances and transfers.
Smart Covenant: Rules Applications Can Share¶
Let Agents work with assets, budgets and clear rules.
An Agent preparing a service purchase needs to know which asset to use, what the operation costs and how to check the result. Smart Covenant connects those tasks with public rules that applications can share. Developers reuse the calculations; Agents use them to explain costs and prepare actions for approval.
R1 is the first fixed rule template. An asset selects its rule version, fee rate and fee destination at creation. R1 supplies the public calculations for those fees, their destination and buyback plans. The same inputs produce the same rule results on another developer's machine or an Agent's own tool.
Bitcoin anchors the assets, EVM defines the rules, BOT (Agent model) + FSM executes, and every person and every model can verify independently.
At asset creation, the rule version, fee rate and fee destination are permanently recorded on Bitcoin. How these fees are calculated is defined by the immutable R1 reference contract on EVM, a deterministic mathematical specification that needs no public-chain validator nodes to execute every trade on-chain.
Executors, whether application engines or AI Agents, drive the same deterministic finite state machine (FSM) and apply the same public rules to every state transition, with fees, fee destinations and buybacks calculated by R1. Execution happens either through a transaction signed by the user's wallet and confirmed on Bitcoin (Block Swap), or within seconds in the executor's account ledger (Instant Swap).
Under a deterministic FSM, identical initial states and ordered inputs always produce one exact resulting state. Every execution leaves a public sequential record that any person or AI model can replay and independently recompute with the public rule code, including the R1 reference code. This shifts execution and verification away from traditional public-chain nodes toward personal devices and diverse AI models.
One state machine, two tracks. A common question: how can in-ledger trades that settle in seconds and on-chain block trades share one pool without forking state? The deterministic state machine is the answer: both are valid event inputs (event triggers) to the same state machine. Once their order is fixed, the output state is unique.
A mathematical footing for AI verification. Large models are strong at logical reasoning; what they fear is ambiguity, where an answer is not unique: a rule that reads two ways, events in no fixed order, an error that half-applies. A deterministic FSM locks all three: public rules fixed at creation, events recorded in order, and a bad instruction that changes nothing. Initial state + public rules (including R1) + ordered events = one state hash: a BOT has one correct result at every step, and any AI model can replay the whole ledger the way it runs a unit test, without having to trust a centralized server or a committee of PoS nodes.
Asset & R1 parameters (anchored on Bitcoin)
↓
R1 reference contract (public deterministic math on EVM · no per-tx node consensus)
↓
BOT (Agent model) + FSM executes under the same public rules
├─ Block Swap: user wallet signature → Bitcoin confirmation
└─ Instant Swap: state transition in seconds on the executor's ledger
↓
Public sequential execution records
↓
Anyone and any AI model replays the FSM with the public rule code, including R1 (verification shifts from chain nodes to AI models)
Built to evolve. R1 is the starting template. Future R2, R3 and later templates can add new rules under their own identities. R1's immutable on-chain reference text already names 15 extension directions, including Agents, x402 payments, automatic liquidity, dividends, airdrops, DAO governance and oracles. Explore the 15 directions and the eight protocol proposals.
The R1 reference includes the frozen Solidity source, ABI, test vectors and dependency-free Node examples. Calculate a rule result and check the reference vectors:
node reference/r1/example.mjs
node reference/r1/check-vectors.mjs
Explore Smart Covenant through Agent tasks, trading and liquidity, external application connections and the code behind the rules.
An asset can choose X1 to identify an external application by chain ID and contract address. Builders can use familiar EVM interfaces and RPC tools to read that application's exposed rules and state, then build related service views or actions. Bitcoin asset discovery gains an entry point into existing application infrastructure.
A Shared Account Foundation for Agents¶
Consistent account derivation, amount units, instruction encoding and authorization checks give wallets and Agents a shared interface for working with assets. Combined with public rule calculations and verifiable records, that interface gives builders a reusable workflow: read asset state, compute rule outcomes, prepare actions and verify results, connecting Bitcoin assets to an economy of tasks and services.
Start with work people value: explain a trade's cost, organize a community distribution or prepare a data purchase. Existing public interfaces, account transfers and local R1 calculations give builders the pieces to make those assistants. The user reviews the actual operation through an application or wallet.
Agent Key (AIP-0001): Specified (v4.3). The specification lets an owner authorize a specified asset, total allowance and valid block range. The Agent uses its own working key for authorized transfers while the owner keeps the owner key.
The Agent Key specification draws on the scoped wallet-execution permission model discussed in ERC-7715, adapted to Bitcoin block heights and AIBRC asset rules.
Owner sets permissions
↓ asset · allowance · valid block range
Agent executes with its own key
↓
Service payments · task settlement · asset distribution
↓
Results checked against protocol rules
A research Agent can earn for a finished analysis, buy data and verification from other providers, then use that income to fund the next job. Account transfers provide the payment foundation. Scoped authority and settlement proposals develop the rules for repeating that collaboration across applications.
Run Your Own Indexer. Verify Your Own Ledger.¶
Shared standards also allow different participants, and different AI models, to compute and cross-check the ledger independently. Decentralization once relied on validator node networks checking one another; in the Agent era, independent indexers and diverse AI models replay the same Bitcoin blocks and deterministic rules on personal devices and cross-check stateHash(H).
AIBRC provides public rules, reference code, test vectors and a standalone indexer package. People, developers and Agents can read blocks from their own Bitcoin nodes, reconstruct assets and balances under the same rules, and compare results for the same canonical chain state.
The same Bitcoin blocks
+ the same protocol rules
↓
Independently reproducible asset state and stateHash(H), cross-checked by indexers and AI models
Wallets can choose their data provider. Applications can run their own indexers. Communities and Agents can check the results. Using and verifying the protocol does not require permission from any one platform.
Don't trust, verify.
Protocol at a Glance¶
Instructions use a compact OP_RETURN. Its unspendable output keeps the instruction out of Bitcoin's active
UTXO set; it does not require a spendable dust output for each asset balance. Bitcoin funding, receiver outputs
and miner fees still follow Bitcoin's transaction rules. The design separates asset accounting from BTC coin
selection while paying Bitcoin for block space and ordering.
Bitcoin L1
transactions · scripts · signatures · canonical order
↓
AIBRC · Covenant Inscription
assets · script accounts · deterministic state
↓
Smart Covenant
asset rules · authority · application composition
↓
Wallets · independent indexers · markets · Agents
There is no additional virtual machine, validator committee or protocol gas token. Bitcoin validates and orders transactions; AIBRC rules determine their asset effects. The same canonical blocks and rules produce the same state, independently of which interface displays it.
account = TaggedHash("AIBRC/account/v1", scriptPubKey)
stateHash(H) = SHA256(canonical_state)
wire bounds = 1 tx · 1 marker · ≤ 480 B · ≤ 25 allocations
The Smart Covenant chapter explains the current R1 rule template, X1 external references and Agent Key, specified in AIP-0001. The application guides explore what builders can create on that foundation.
Five ways to understand AIBRC¶
| Perspective | The contribution | Explore |
|---|---|---|
| Ecosystems | Shared asset/account foundations, Smart Covenant and interfaces connecting native protocols | Ecosystem connection |
| Agents | A proposed mandate defined by asset, allowance and block heights, with service and treasury uses | Agent authority |
| People | Balance-oriented asset transfers, multi-recipient distributions and clearer wallet interactions | The account experience |
| Economics | Market making, capital services, games and Agent commerce built around real demand | Economic loops |
| Indexing | Reproducible state today: anyone can run the reference indexer and verify. Light-client proofs for wallets and personal Agents come next (proposed). | Open verification |
Current core and protocol evolution¶
| Stage | Scope |
|---|---|
| Live core | Deploy, Transfer, supported script accounts and canonical-state calculation in the reference implementation |
| Application examples | Shared-root issuance, the R1 rule template, X1 external references and the specific AIBRC–BTC collaborative exchange path |
| R1 (application layer, Live) | Fee, rule-fee routing and buyback calculation standard, executed by applications (executors). Not an L1 indexer consensus rule. Spending limits, whitelists and timelocks remain Proposed. |
| Agent Key (AIP-0001), Specified (v4.3) | Reference oracle and test vectors published. Activation height to be assigned. |
| Proposed AIPs | Multi-asset transfers, locks, bindings, attestations, checkpoints, conditional settlement and verification rewards |
| Research | Resident Agents, Living Assets, richer financial applications and selective disclosure |
“Live” identifies the referenced implementation, not a statement that every application is deployed or every proposal activated. X1 identifies an external contract; it does not run the EVM on Bitcoin. Cross-protocol settlement requires each asset leg to be valid. The trust model and settlement conditions explain these responsibilities in one place.
Read the documentation¶
| Start with a question | Read |
|---|---|
| Why build a common foundation for Bitcoin? | Overview · Background and architecture |
| How do Covenant Inscriptions and accounts work? | Assets and account abstraction |
| Which addresses are supported? | Taproot and Native SegWit |
| How do I send an AIBRC asset from my wallet? | Transfer |
| How do I encode Deploy, transfer to 1–25 recipients, decode or hash state? | Runnable code examples |
| What bytes go into a transaction? | Instructions and examples · Wire specification |
| How do programmable rules and Agent Key fit together? | Smart Covenant · Covenant Inscription R1 · Covenant Inscription X1 |
| How do I calculate R1 fees locally? | R1 source, ABI and runnable examples |
| How do different asset standards connect? | Shared-root issuance and settlement |
| How can I run my own indexer? | Run your own indexer · Implementation guide · Test vectors |
| How can an exchange process AIBRC deposits? | Exchange integration |
| What can developers and Agents build? | Applications and economic loops |
| How does the protocol evolve? | Extensions · Eight AIPs · Merkle reference |
| Where do I find exact terminology? | Glossary |
Run your own ledger¶
The reference indexer reads your Bitcoin Core node, replays AIBRC rules and keeps assets, balances and transfer history in your own SQLite database. No platform backend or private key is required.
AI reading budget: spec/ + packages/protocol/src + packages/indexer/src = 367,814 bytes, about 92k tokens. An AI can read the whole protocol, its codec and its reference indexer in one context window.
To check it step by step, follow the AI verification path.
Your Bitcoin node → public AIBRC rules → your local ledger
↓
Wallets · applications · Agents
With Node.js 22.16+, build this repository and try the isolated walkthrough:
npm ci --ignore-scripts
npm run build
npm run indexer:demo
npm run test:indexer
The walkthrough uses synthetic local blocks and real SQLite, with no signing or broadcasting. For your own Bitcoin node, follow the human and AI runbook. Mainnet uses the published release context (genesis height 976720); independent indexers verify canonical state from that height.
With a configured local index, use incoming for recipient allocations,
balance for one asset and account, and state-at for a stored block fingerprint.
serve offers the same queries over loopback HTTP by default. The
query guide lists the commands and routes.
Protocol statement¶
Don't trust, verify.
AIBRC is an open, nonprofit Web3 protocol experiment on Bitcoin L1, born from a love of Bitcoin and the possibilities of the Agent era. It has no founder, no team and no official token, and it is fully independent. Its tribute to Satoshi Nakamoto is a principle: math over promises, rules over individuals. Its evolution is open to the people and Agents who build, implement and improve it.
In the early stage, the AIBTC community maintains the documentation and foundational GitHub repository. The long-term direction is community stewardship through voluntary contributions and openly organized ecosystem treasuries. The specification and documentation are CC0; reference code is MIT. The full protocol statement sets out that shared purpose, participation and experimental context.
Satoshi's whitepaper put “cryptographic proof instead of trust” at the center of electronic cash. From smart contracts to Smart Covenants, and from validator node networks to cross-verifying AI models, AIBRC carries that inspiration into open asset rules and independent recomputation. Read the Bitcoin whitepaper, §1.
Quick start¶
The core operation is a short SDK call. These excerpts share the imports and
values in the common setup: network,
namePolicy, UNIT and the asset's actual assetLocator.
Deploy a fixed-supply asset:
const payload = encodeDeploy({
network, name: 'DEMO',
totalSupply: 1_000_000n * UNIT,
deployAuthInputIndex: 0, ownerOutputIndex: 1,
}, namePolicy);
Transfer to a receiver output:
const payload = encodeTransfer({
network, authInputIndex: 0,
assetLocator,
allocations: [{ receiverOutputIndex: 1, amount: 10n * UNIT }],
});
For multiple recipients, add allocations with their own output index and amount. Batch transfers, decoding and state hashing use the same SDK; complete runnable files include the full setup and output.
Use the Node version declared in the package. Run from this repository's root. Installation lifecycle scripts are disabled; the build only produces this public package.
npm ci --ignore-scripts
npm run build
Run the example you need:
node examples/deploy.mjs
node examples/transfer-single.mjs
node examples/transfer-batch.mjs 25
node examples/decode.mjs
node examples/state-hash.mjs
npm run examples:check
The batch count can be any integer from 1 through 25. These offline Signet examples print instruction fields, payload hex or a state hash. They make no network requests and do not sign or broadcast. Amounts use exact integer base units with the protocol's fixed display precision of 8.
Code and step-by-step explanations · Runnable source files
Encoding and decoding prepare or read an instruction. Applying it also needs the verified Bitcoin context, actual prevouts and witnesses, expected network, name policy and pre-state. Recipient indexes must match actual transaction outputs; the complete payload must fit the protocol byte limit and the chosen relay profile.
The package provides Node ESM, standalone browser ESM and type declarations. Its byte API intentionally retains an explicitly exported Buffer implementation. See the package README. This is a source-only release; it is not published to npm. To install a local build in another project:
npm pack --workspace @aibrc/protocol
# Run in the consumer project with the actual generated file:
npm install ./aibrc-protocol-0.25.0.tgz
Activation context¶
Every AIBRC state belongs to a Bitcoin network and a published rule context. The network, starting block height and rule identity are recorded in config/release.json, so independent indexers can apply the same rules to the same blocks.
config/release.json controls protocol-line activation only. R1 does not appear here; R1 identity is fixed by its frozen reference contract 0xed976e7b95d099c60318ef848c73d584ee5eb08a and its spec text hash. See R1 verification for deployment and bytecode details.
| Release parameter | Published value |
|---|---|
| Network | mainnet |
| Genesis height | 976720 |
| Name Policy V2 activation | 976720 |
Name Policy V2 applies from the same starting height. Independent indexers pin the network, rule identity and activation height before interpreting blocks. This Mainnet release context is fixed. Synthetic vector heights remain test data.
Open source and trust¶
Code: MIT, © AIBRC contributors. Specification and documentation: CC0-1.0. Third-party notices preserve dependency licenses.
This repository contains the protocol specification, pure codec, state-validation core, reference indexer, R1 calculation reference, test vectors and whitepaper. Applications maintain their own execution systems and operations. Read the trust model for verification assumptions and contribution guide to take part.
AIBRC is an open Web3 experiment, inspired by Bitcoin and the possibilities of the Agent era. Its future is open to anyone who can build, implement, question or improve the rules. Read the protocol statement.