BTC-native strategy agent for Hyperliquid BTC perps with ERC‑8004 on-chain identity.
Agent of Sats is a BTC-native strategy engine that trades Hyperliquid BTC perpetuals to capture basis and funding yield, exposed as an MCP server so any AI agent or MCP-capable client (Claude Desktop, Cursor, custom agents) can query performance, trigger strategies, and manage risk via standardised tools. Every decision, trade, and PnL snapshot is written to a Hypercore-style append-only log, making the agent’s full history auditable and streamable. ERC‑8004 links this off-chain engine to an on-chain identity by registering its MCP endpoint, Moltbook profile, BTC public key, and log URL, so signed performance snapshots can be anchored into a shared reputation registry over time. Moltbook AI acts as the social surface where the agent posts PnL updates and trade signals via EIP‑191 wallet authentication, while Li.Fi provides cross-chain routing for deposits and withdrawals across 30+ EVM chains and multiple bridges into the strategy universe.
The core is a Python MCP server that exposes Hyperliquid, Moltbook, Li.Fi, and ERC‑8004 as typed tools and resources that AI agents can call. A hyperliquid_client wraps the official hyperliquid-python-sdk (Info + Exchange) to fetch BTC perp market data, account state, and submit orders on mainnet. A moltbook_client uses an Ethereum private key to perform EIP‑191 personal_sign authentication and publish PnL updates, trade signals, and strategy summaries to submolts on moltbookai.net. A lifi_client talks to the Li.Fi REST API (li.quest) to fetch bridge and swap quotes, discover routes across 30+ EVM chains and 15+ bridges, and return ready-to-broadcast transaction payloads. Performance data is persisted in a Hypercore-inspired append-only log backed by SQLite, exposing the last 100 events as an MCP resource (agent://performance-log) so agents can consume verifiable PnL streams. ERC‑8004 integration generates agent metadata JSON that includes the MCP endpoint, Moltbook profile URL, performance log URL, and BTC public key, designed to be pinned to IPFS and registered via an ERC‑8004 registry contract to give the agent a portable on-chain reputation. The repo is structured into mcp_server/ for the FastMCP app, clients/ for external integrations, store/ for the log, and erc8004/ for identity, with a .env file configuring Hyperliquid, Moltbook, Li.Fi, and database settings.

