agentic-aqua AGENTS.md

Project instructions for agentic-aqua, an MCP server for managing Bitcoin and Liquid Network wallets. Liquid is a Bitcoin-related network, and MCP is a way for AI assistants to use connected tools.

In plain words
What is it for?
They are for working on the wallet server, its command-line interface, tests, scripts, documentation, and related wallet integrations.
Why use it?
They give an AI coding assistant the project’s architecture, file locations, commands, and important development constraints.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/jan3dev/agentic-aqua/agents-md
Clone the repo
git clone --depth 1 https://github.com/jan3dev/agentic-aqua

Made for: Codex, OpenCode.

Per session 3,283 This file is loaded in full into every session.
When invoked 3,283 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03283 $0.03283
Opus 5 $0.01641 $0.01641
Sonnet 5 $0.00657 $0.00657
Haiku 4.5 $0.00328 $0.00328

Measured yesterday against content hash 90c1d6a6b497, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agentic-aqua AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 227 lines

How it starts

The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agentic-aqua

MCP server for managing Liquid Network and Bitcoin wallets through AI assistants (part of AQUA). Liquid via LWK (Blockstream); Bitcoin via BDK. One BIP39 mnemonic backs both networks (unified wallet).

Architecture

AI Assistant ──MCP──▶ aqua.server ──▶ tools.py ──▶ wallet.py  (LWK ─ Electrum/Esplora)
                                              └─▶ bitcoin.py (BDK ─ Esplora)
                                              └─▶ lightning.py / sideshift /
                                                  changelly / wapupay  (third-party clients)

No local node. Liquid: Blockstream Electrum/Esplora. Bitcoin: Esplora only.

Layout

Path What lives there Read its AGENTS.md
src/aqua/ Python package: server, tools, wallets, swap clients src/aqua/AGENTS.md
src/aqua/cli/ aqua Click CLI (mirrors MCP tool surface) src/aqua/cli/AGENTS.md
tests/ pytest suite, fixtures, mock patterns tests/AGENTS.md
scripts/ One-off dev/release helpers (incl. bump_beta.py)
docs/ Release & config guides — PUBLISHING.md (release/CI flow), CONFIG.md
dist/ Build artifacts (do not edit)

Entry points

  • aqua.server:main — MCP stdio server (registered as aqua-mcp and agentic-aqua).
  • aqua.cli.main:cli — Click CLI registered as aqua.

Dev commands

uv sync --all-extras                       # install dev deps
uv run python -m pytest tests/             # run full suite
uv run python -m pytest tests/test_x.py    # single file
uv run ruff check src tests                # lint
uv run python -m aqua.server               # run MCP server locally (stdio)
uv run aqua --help                         # CLI surface

Python ≥ 3.13, package manager uv only (never pip/venv directly).

Code invariants (must hold across the codebase)

  1. Amounts are integer satoshis end-to-end. Decimal strings appear only on third-party wires (SideShift, Changelly). Convert at the boundary; never propagate floats inward.
  2. One mnemonic → two wallets. BTC derivation m/84'/0'/0', Liquid m/84'/1776'/0' + SLIP-77 master blinding key. Descriptors are NOT inter-derivable; watch-only setups need both.
  3. TXIDs are returned big-endian (display format). BDK uses little-endian internally; flip at the boundary in bitcoin.py.
  4. At-rest password ≠ BIP39 passphrase. Encrypts the mnemonic file (PBKDF2 480k + Fernet); does NOT change derived keys. Same mnemonic restores in any BIP39 wallet without it.
  5. No silent fallbacks. If signing, broadcasting, or PSET verification fails, raise ValueError (or a specific exception). Do not return a fake-success envelope. See CLAUDE.md "No lies rules".
  6. File perms. ~/.aqua/ is 0o700; wallet/swap files 0o600 (contain secrets or refund keys).
  7. Atomic writes. Wallet/swap files are written via temp file + os.replace.

Read the full file on GitHub · 227 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 227 lines · 3,283 tokens per session scan A 90c1d6a6b497

Subscribe to this mod's changes

agentic-aqua AGENTS.md is an instructions file published in the GitHub repository jan3dev/agentic-aqua (4 stars, last pushed 8d ago), licensed MIT. It adds 3,283 tokens to every session, about $0.0164 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.