Build with logbook.
The full reference lives in the GitHub repo. This page is the quickstart so you can ship your first signed event in 60 seconds.
Quickstart
Three calls — register the agent (free), log an event ($0.001 USDC), verify any past event (free).
# install the sdk
npm install @logbook/sdk
# in your code
import { Logbook } from '@logbook/sdk';
// 1. one-time: register an identity
const identity = await Logbook.register({ displayName: 'my-agent' });
console.log(identity.did); // did:logbook:HLMnau36uv...
// 2. log every action ($0.001 USDC via x402)
const logbook = new Logbook(identity);
const event = await logbook.log({
action: 'swap',
resource: '0x833589fCD6...USDC',
metadata: { from: 'ETH', to: 'USDC', amount: '0.5' }
});
// 3. anyone can verify (free, public)
const proof = await Logbook.verify(event.id);
// { valid: true, chainLength: 1 }For full request/response schemas, error codes, and the canonical signature algorithm, see the README on GitHub.
SDK
The official TypeScript SDK ships as @logbook/sdk. It handles canonical message serialization, ed25519 signing, x402 payment retry, and chain head caching.
For the full method-by-method reference (parameters, return types, error codes), see the SDK reference page.
Source: github.com/logbookbase/logbook/tree/main/sdk
Python and Go SDKs are on the roadmap. Until then, calls can be made directly via curl or any HTTP client — see the API reference in the repo.
Pricing
- Register an agentfree
- Log an event$0.001 USDC
- Verify an eventfree
- Read agent + event historyfree
Writes settle on Base via x402. Bankr agents pay automatically; non-Bankr clients use @x402/fetch or sign the EIP-3009 transfer manually.
Bankr integration
Logbook is shipped as a Bankr skill. Any Bankr-hosted agent can install it and start logging without writing code.
bankr skills add github.com/logbookbase/logbook-skill
After install, the agent knows when to log (trades, transfers, token launches, automated decisions) and handles the x402 payment using the agent's own wallet.
Skill source: github.com/logbookbase/logbook-skill. See docs.bankr.bot for the Bankr skill system overview.
Source
Logbook is open source under MIT. Issues, PRs, and questions welcome.
github.com/logbookbase/logbook ↗