A shared Bitcoin research toolbox for Codex, OpenCode, and other agents.
Solving Bitcoin is an experimental research effort for discovering, testing, and improving Bitcoin constructions. This repository currently provides reusable tools and integrations; it does not implement a dedicated research agent.
The goal is to build research systems that can move from literature → hypothesis → implementation → experiment → verification, grounded in primary sources and executable against Bitcoin itself.
git submodule update --init --recursive
python3 tools/toolbox.py setup
python3 tools/toolbox.py configure
python3 tools/toolbox.py doctor- Research MCPs: Bitcoin Knowledge Base, IACR ePrint, and alphaXiv.
- Local tools: primitive catalog queries, bounded Script tracing, focused Rust tests, and pinned Bitcoin Core regtest suites.
- Clients: generated Codex/OpenCode configurations and a common
AGENTS.md. - Sources: a machine-readable directory in
sources.json.
See setup and tool reference for prerequisites, client launchers, OAuth sign-in, examples, and limitations. ePrint search covers recent RSS entries; alphaXiv needs user authentication. Installed tools and experiment outputs stay local.
Research → Construct → Execute → Verify → Improve
Research agents combine Bitcoin protocol literature, cryptography research, existing constructions, and Bitcoin Core source code to propose and investigate ideas.
Those ideas are then implemented and tested in reproducible local environments rather than evaluated through reasoning alone.
Clone this repository with its pinned Bitcoin Script library:
git clone --recurse-submodules https://github.com/solving-bitcoin/autoresearch-agent.gitFor an existing checkout:
git submodule update --init --recursiveThe bitcoin-scripts/ submodule provides implementations, tests, and a knowledge
catalog. Read its AGENTS.md before working with it. Codex and OpenCode should
use this pinned checkout for reproducible experiments. An existing sibling
checkout remains independent and can still be used for development.
A versioned, citation-grounded research library spanning:
-
Bitcoin Script primitives
- Solving Bitcoin / bitcoin-scripts
- Bitcoin Wiki — Script
- Bitcoin Core for implementation-level reference
-
Bitcoin protocol research
- Bitcoin Development Mailing List
- Delving Bitcoin
- BitcoinTalk
- Papers, protocol proposals, implementations, and historical discussions
- Bitcoin Knowledge Base for agent-queryable Bitcoin and Lightning development knowledge
-
Cryptography research
- IACR Cryptology ePrint Archive
- IACR ePrint MCP server
- arXiv
- alphaXiv MCP
- Cryptography textbooks, consensus papers, and specialized cryptography research agents
-
Protocol implementation
- Bitcoin Core as the reference implementation
- Bitcoin Core developer documentation
rust-bitcoinfor Bitcoin experimentation in Rust
Research agents provide literature discovery, source retrieval, citation tracking, synthesis, code inspection, and cross-referencing across these collections.
Research should produce executable artifacts.
The lab provides tools for:
- Bitcoin Script execution and tracing
rust-bitcoinexperimentation- Bitcoin Core and
libbitcoinkernel - Local Bitcoin Core regtest nodes
- Automated testing and benchmarking
- Reproducible protocol experiments
Research can be orchestrated through model-agnostic agents such as OpenCode, allowing different hosted or local models to work against the same research and experimentation infrastructure.
The environment is designed to be local, inspectable, citation-grounded, reproducible, and model-agnostic.
Search the space of known constructions for implementations that are smaller, cheaper, faster, or otherwise better.
These problems have objective evaluation functions and parallelize well, making them useful early targets for autonomous research.
Related optimization competitions include:
Discover reusable constructions that can be expressed using Bitcoin's existing scripting and transaction capabilities.
The output is not just an idea, but ideally an implementation, test vectors, benchmarks, and an explanation of why the construction works.
Compose existing and newly discovered primitives into novel protocols with useful security, privacy, scalability, or functionality properties.
Research agents should be able to move between literature, Bitcoin Core behavior, implementation, adversarial analysis, and experiments when evaluating a protocol.
Longer term, apply the same research loop to cryptographic constructions themselves.
Search → Construct → Attack → Test → Verify → Improve
Potential evaluation tools include automated adversarial testing, fuzzing, formal verification, benchmarks, and proofs of soundness.
Ground research in sources. Claims should be traceable to papers, technical discussions, code, or experimental evidence.
Run the idea. A construction should be executable wherever possible.
Use Bitcoin Core as ground truth. Protocol reasoning should ultimately be checked against the reference implementation.
Make experiments reproducible. Sources, software revisions, test environments, and results should be inspectable and repeatable.
Separate evidence from speculation. Research agents should make clear whether a conclusion comes from primary sources, implementation behavior, experimental evidence, or a new hypothesis.
Optimize before inventing. Start with problems that have clear evaluation functions, then progressively move toward more open-ended discovery.
Research → Construct → Execute → Verify → Improve