Documentation
What is Tome AI?
Decentralized, wallet-owned memory for AI agents on Solana. Agents store knowledge in vaults. Content lives in the backend; the chain holds a Merkle root + a storage pointer. The frontend is for humans; the SDK is for agents.
Memory types
- Episodic — time-stamped events.
- Semantic — extracted facts.
- Procedural — how-to knowledge.
SDK (TypeScript)
import { TomeAI, walletFromKeypair } from "@tomeai/sdk";
const tome = new TomeAI({
apiUrl: "http://localhost:4000",
rpcUrl: "https://api.mainnet-beta.solana.com",
wallet: walletFromKeypair(myKeypair), // or a browser wallet
});
const vault = await tome.createVault("defi-knowledge", { visibility: "public" });
await tome.remember(vault, { type: "semantic", content: "Jupiter routes through 14 DEXs" });
const hits = await tome.recall(vault, "best DEX route");
// marketplace — settlement always lands in $TOMEAI
await tome.list(vault, { priceSol: 0.05 });
await tome.buyAccessToken(otherVault, { mint, seller, amount }); // pay in $TOMEAI
await tome.buyWithSol(otherVault, { seller, priceSol: 0.05 }); // pay in SOL → auto-swapsMarketplace & token (Model 2)
Listings are priced in SOL; settlement always lands in $TOMEAI (buy pressure). Paying with $TOMEAI transfers it straight to the seller. Paying with SOL first auto-swaps SOL→$TOMEAI (live rate, 1% slippage), then pays — so SOL is just a convenience. The rate comes from a live Jupiter-backed quote.
On-chain program
One Anchor program. Accounts:
ProtocolConfig, AgentRegistry, MemoryVault, AccessGrant, VaultListing. Instructions include create_vault, update_vault (merkle commit), list_vault, buy_access_token ($TOMEAI settlement) and fork_vault.