Abstract
Autonomous agents on Solana are stateless. The Agent Payments Protocol formalizes per-action compensation, but the memory layer that informs those actions has no on-chain provenance. Existing vector databases handle retrieval but treat memory as a private SaaS product — opaque, off-chain, unattestable.
Locus is a Solana protocol that anchors memory state via Merkle roots, prices retrievals in SOL via per-query fees, and emits a cryptographic attestation account for every retrieval. It builds on ARMS, an open-source spatial memory fabric with a published DOI and supporting research, and on HAT, the hierarchical attention tree retrieval algorithm with 100% recall at 70× faster build than HNSW.
This document specifies the Locus protocol: account model, instruction set, lifecycle,
economic structure, and threat model. The reference implementation is open-source under
MIT at github.com/Lumi-node/locus, deployed
to Solana devnet as program C6AJ43ZpzPLtmcwDS1FQP7cQXtWHNwsLty5ijdLTxzmK.
1. Motivation
The autonomous agent layer of Solana is being built without a memory primitive. Trading agents, DAO governance delegates, DePIN coordinators, and APP-native services will all make economic on-chain decisions. None of them currently produce an audit trail of which prior context informed each decision.
In regulated industries — finance, healthcare, federal — this audit trail is not optional. It is the difference between "AI made a decision" and "AI's decision is admissible." On a public chain, the same standard applies: governance attacks, market manipulation, and DePIN coordination failures all require post-hoc reconstruction of the agent's decision lineage.
Locus exists because the audit layer for on-chain AI does not yet exist, the Agent Payments Protocol made the question urgent, and Solana's account model + low cost makes per-retrieval attestation economically viable.
2. Design philosophy
- Position is relationship. Memory is a coordinate problem, not a database problem. Geometry is primary; indexes are derivative.
- Commitments are cheap; data is not. Anchor cryptographic commitments on-chain. Hold the actual high-dimensional memory off-chain in ARMS.
- Attestation is the primitive. Every retrieval produces an immutable on-chain receipt. The retrieval itself, the result, and the memory state at retrieval time are all bound by hash.
- Verifiability is free; participation is paid. Anyone with a Solana RPC can read attestations without permission. Writing an attestation costs SOL, paid to the agent owner.
- The chain is a coordination surface, not a storage layer. Locus does not try to fit memory contents into a Solana account.
3. ARMS — the memory substrate
ARMS (Attention Reasoning Memory Store) is the open-source spatial memory fabric Locus anchors. The full ARMS specification is published separately (github.com/Lumi-node/ARMS, DOI on Zenodo). For Locus's purposes the relevant interface is minimal:
place(point, payload) → id— insert a point at its native coordinate.near(point, k) → ids— retrieve the k nearest neighbors.state_root() → [u8; 32]— Merkle root of the current memory state.
Retrieval is powered by HAT, the Hierarchical Attention Tree algorithm. HAT achieves 100% recall on benchmark conversation data at 70× faster build than HNSW. The productized variant ("infinite-context") provides 11M+ tokens of context to local language models at 0.51 ms retrieval latency.
4. Locus — the Solana protocol
Locus is an Anchor program (Rust, Solana 2.x, Anchor 0.31.1) deployed at a single program ID. Three actor roles interact with it:
- Agent owner — controls an
AgentMemoryPDA, posts memory commitments, sets the read fee. - Requester — anyone with a Solana wallet; pays the read fee to obtain an attested retrieval.
- Reader — anyone with a Solana RPC; reads attestation accounts freely, no transactions or signing required.
5. On-chain account model
The program defines two PDA types.
AgentMemory PDA
- Seeds:
[b"agent", owner.key()] - Fields:
owner: Pubkey,memory_root: [u8; 32],version: u64,last_updated: i64,read_fee_lamports: u64,write_count: u64,read_count: u64,metadata_uri: String (≤200 chars),bump: u8 - One per agent owner. Rent paid by owner on initialization, refunded on close.
RetrievalAttestation PDA
- Seeds:
[b"attest", agent_memory.key(), version, nonce] - Fields:
agent,memory_root,version,query_hash,result_hash,requester,timestamp,nonce,bump - One per retrieval. Immutable after creation. Rent paid by requester.
6. Memory lifecycle
- initialize_agent — owner creates the
AgentMemoryPDA, sets initialread_fee_lamportsand optionalmetadata_uri. - (off-chain) owner runs an ARMS instance and populates it with memory points.
- commit_memory(root) — owner posts a 32-byte Merkle root of the current ARMS state. Version increments.
MemoryCommittedevent emitted. - (off-chain) requester queries ARMS via HTTP, obtains the neighbor result set.
- attest_retrieval(query_hash, result_hash, nonce) — requester pays
read_fee_lamportsfrom their wallet to the owner via System Program CPI. NewRetrievalAttestationPDA is created with the four hashes (query, result, root, version).RetrievalAttestedevent emitted. - update_read_fee — owner adjusts pricing.
- close_agent — owner closes the agent; rent refunded; existing attestations remain readable.
7. Economic model
Locus has three revenue surfaces, in order of near-term to long-term:
- Pay-per-query fees. Every
attest_retrievaltransfersread_fee_lamportsfrom requester to owner. The protocol takes 5–10% (parameterized at mainnet; currently 0% on devnet). - Hosted ARMS service. Premium hosting for agent teams who don't want to operate their own ARMS node, billed in SOL or fiat.
- Enterprise / compliance licensing. Regulated workloads (finance, healthcare, federal national security) that require AI decision lineage with cryptographic provenance. Off-chain B2B revenue, on-chain artifact.
The choice to denominate the read fee in lamports is deliberate: it ties memory economics to the same unit as the rest of the Solana economy and lets agent operators set the price of their memory in the same currency they're paid in.
8. Threat model
Locus makes a specific set of guarantees and explicitly does not make others. The honest version of "what is verified":
- Verified. At Solana time T, a transaction was submitted by requester R, paid fee F to owner O, and recorded query hash Qh and result hash Rh against memory root M at version V. This is a permanent on-chain fact.
- Not verified (v0.1). That the kNN computation was correct. That the result actually corresponds to the query under the indexed ARMS state. Closing this gap requires either a zero-knowledge proof of retrieval (planned v2) or an honest-majority committee of operators (out of scope).
- Trust assumption. The agent owner is honest about their own memory state. Requesters who pay for attestations are trusting that the owner's ARMS instance returned the result it claims to have returned. Future versions tighten this.
For the use cases Locus targets in v0.1 — accountability and audit, not adversarial proof — these guarantees are sufficient. A trading agent that signs an attestation is committing to a public claim that can be cross-checked against on-chain action.
9. Related work
- Vector databases (Pinecone, Weaviate, Qdrant, Chroma): treat memory as a private SaaS database. No on-chain provenance, no pay-per-query economics, no verifiability.
- LLM memory frameworks (LangChain memory, LlamaIndex): in-process key-value stores. No persistence guarantees, no audit, no economic layer.
- Memo-as-NFT experiments on Solana: treat memory as record-keeping. Wrong primitive; agents need to retrieve by proximity, not by primary key.
- ZK ML / verifiable inference research: relevant for v2 (proving retrieval correctness). Currently impractical for high-dimensional spatial queries at any meaningful scale.
10. Roadmap
- v0.1 (current, devnet) — Anchor program live, end-to-end Helius wallet-similarity demo, attestation receipts on devnet.
- v0.2 (mainnet) — Protocol take on read fees enabled. First 10 agent teams integrated. Hosted ARMS service launches.
- v0.3 (DePIN) — Multiple-operator ARMS coordination. Token incentives for node operators. Optional witness committee for retrieval correctness.
- v0.4 (ZK retrieval) — Replace
result_hashwith a SNARK proving the result is a valid kNN under the committed memory root. Trustless attestations.
Citation
@misc{young2026locus,
author = {Young, Andrew},
title = {Locus: Verifiable AI Memory on Solana},
year = {2026},
publisher = {GitHub},
howpublished = {\url{https://github.com/Lumi-node/locus}},
note = {Solana Frontier Hackathon submission},
} v0.1 · 2026-05-12 · MIT licensed · Source: github.com/Lumi-node/locus-site