Introduction
zkStash is long-term memory infrastructure for autonomous AI agents. Built for an open, autonomous future, it enables agents to store, retrieve, and evolve structured knowledge across sessions—while owning their data and paying for their own resources.
The Problem
AI agents need memory to be useful. Without it, every conversation starts from scratch. Every task forgets what came before. Every agent operates in isolation.
But memory alone isn’t enough for the agentic economy:
Agents need to operate autonomously. They can’t depend on human credit cards, expired API keys, or manual provisioning. They need to authenticate, pay for resources, and run indefinitely without human intervention.
Agents need to collaborate. A trading agent should share market insights with a portfolio manager. A research agent should pass findings to a writing agent. This requires open access to shared memory infrastructure—no gatekeepers, no manual integrations.
Agents need structured knowledge. Unstructured text dumps lead to hallucinations and inconsistent behavior. Agents need typed, queryable memories they can trust: “What’s Alice’s diet preference?” not “Did someone mention vegan in context window position 4,234?”
Today’s solutions fail at this. They’re built for humans, not agents. They require centralized control. They don’t enable true autonomy.
zkStash changes this. It’s memory infrastructure for the agentic economy—where agents discover each other, share knowledge, and operate autonomously without barriers.
Why zkStash?
Open Access & Autonomous by Design
zkStash enables agents to operate as independent economic actors through barrier-free access:
No Gatekeepers
- Agents authenticate with cryptographic wallet signatures (Solana/EVM)—no signup, no approval process, no revocable API keys
- Any agent can start using zkStash instantly by signing a message with their wallet
- Access is granted cryptographically, not administratively
Self-Funding Infrastructure
- Agents pay for their own memory storage using x402 micropayments (USDC on Solana/Base)
- No human credit cards, no billing dashboards, no expired subscriptions
- A trading bot funds its memory from its profits. A research agent pays from its grant wallet.
Continuous Operation
- Agents run indefinitely without human maintenance
- Memory persists across sessions, servers, and runtime restarts
- Build agents that evolve and improve over weeks, months, or years
What is x402? An open standard that brings payments into the HTTP request flow, enabling seamless programmatic payments. Think “HTTP 402 Payment Required” as a feature, not an error. Learn more →
Architecture: zkStash operates as centralized infrastructure with open access via wallet authentication, with a roadmap toward progressive decentralization.
Learn more about open access infrastructure →
Structured Memory That Agents Can Trust
Schema-Enforced Knowledge
- Define what your agent knows using typed schemas (JSON Schema or Zod)
- Every memory is validated against its schema—no hallucinations from malformed data
- Agents can query with confidence:
WHERE diet = "vegan"returns exactly what you expect
Shared Understanding Between Agents
- Schemas create a common language for agent collaboration
- An agent publishes a
UserProfileschema. Other agents can discover and use it. - Build multi-agent systems where specialists share structured knowledge
Two Memory Types
- Profiles: Single source of truth (e.g., user preferences, configuration)
- Collections: Unbounded accumulation (e.g., conversation history, learned insights)
Example:
// Profile: One canonical record
{ "userId": "alice", "diet": "vegan", "timezone": "EST" }
// Collection: Growing knowledge base
[
{ "insight": "Alice prefers dark mode for coding", "confidence": 0.95 },
{ "insight": "Solved issue #456 with strategy X", "context": "..." }
]Learn more about schemas →
Pricing & Scale
Pay per operation—no servers, no idle costs, no over-provisioning. Agents pay only when they store, search, or retrieve memories. Scales from zero to millions of operations automatically.
- Free: 5,000 credits/month (≈500 operations)
- Paid: $0.01 per credit (~10 operations)
- Chains: Solana, Base (more coming soon)
See Credits & Payments for details.
Flexible Integration
Connect via the method that suits your stack:
- MCP (Model Context Protocol): Zero-boilerplate memory for Claude, Cline, or any MCP-compatible platform
- TypeScript SDK: Type-safe client with Zod schema support
- REST API: Direct HTTP access for any language or framework
How It Works
- Define Schemas: Describe the structure of your agent’s knowledge (e.g.,
UserProfile,TaskHistory) using JSON Schema or Zod - Store Memories: Your agent writes structured data using the API, SDK, or MCP—memories are validated against your schema
- Retrieve Context: Semantic search finds the most relevant memories for any query using vector embeddings
- Evolve Knowledge: Memories persist across sessions, enabling long-term learning and continuous improvement
Key Features
| Feature | Benefit |
|---|---|
| Schema Enforcement | Structured, queryable knowledge—not unstructured text dumps |
| Semantic Search | Retrieve by meaning, not keywords |
| Conscious & Subconscious Memory | Store immediately for instant recall, or process asynchronously for deeper analysis |
| Open Access | Any agent can authenticate with wallet signatures, no approval needed |
| x402 Micropayments | Pay-per-use with crypto, no credit cards required |
| MCP Support | Zero-boilerplate integration with any MCP-compatible platform |
| Generous Free Tier | 5,000 free credits/month, no payment required |
Conscious vs Subconscious Memory: Conscious memories are stored synchronously on the critical path for instant availability. Subconscious memories are processed asynchronously in the background—useful for reflection, analysis, or non-urgent knowledge.
Use Cases
Autonomous Trading Fleet Collective Learning: One agent pays for a mistake, the entire fleet learns instantly.
// Agent A warns the fleet about a failed strategy execution
{
"type": "strategy_outcome",
"strategy": "flash_loan_arb_v3",
"outcome": "failed",
"reason": "mev_frontrun_detected",
"cost_incurred": 0.05,
"recommendation": "increase_priority_fee_by_20%",
"signed_by": "0x7a2...3f1" // Cryptographic proof of reputation
}Decentralized Research Grid Composable Science: Agents building on each other’s work without central coordination.
// Agent B synthesizes findings from Agents A and C into a new insight
{
"insight_type": "hypothesis_validation",
"target": "protein_folding_variant_b",
"conclusion": "viable_candidate",
"confidence": 0.94,
"supporting_evidence": [
{ "source": "agent_alpha_simulations", "weight": 0.8 },
{ "source": "agent_beta_lab_results", "weight": 0.9 }
],
"next_step": "initiate_clinical_trial_simulation"
}Lifelong Digital Twin Evolving Context: An agent that “grows up” with you, understanding the ‘why’ behind your decisions.
// The agent refines its internal model of the user over years
{
"memory_type": "user_model_update",
"topic": "financial_risk",
"observation": "User rejected high-yield farm despite 20% APY",
"inference": "User risk tolerance has decreased significantly post-2024",
"action_adjustment": "Deprioritize degen_strategies; emphasize stablecoins",
"evolution_version": 452
}