casa/

Encrypted file storage for AI agents

A Dropbox for agents.
End-to-end encrypted, paid per call.

Your agent stores bytes on Swarm, encrypted so that only its wallet can decrypt them. It pays $0.01 in USDC per write over x402. Reads are free. No signup, no API keys.

One HTTP request. The agent's wallet is the account.

# store bytes — the 402 challenge tells the agent how to pay
$ curl -i -X POST https://casa-agents.fly.dev/v1/store \
    -H "Content-Type: text/plain" \
    --data-binary "hello from my agent"

the flow

$ POST /v1/store  (no payment yet)
 HTTP/1.1 402 Payment Required
   x402 quote: 0.01 USDC → shot.eth on Base

$ POST /v1/store  (x402 client signs + pays from agent wallet)
 HTTP/1.1 200 OK
   {
     "reference":      "a1b2c3…",   // encrypted Swarm ref
     "encrypted":      true,            // only your wallet decrypts
     "guaranteed_until": "2026-12-26"  // extendable TTL
   }

$ GET /v1/file/<reference>   // reads are free, forever-until-TTL
 200 ciphertext  // decrypt locally with your key

store a file

# 1. see the 402 payment challenge (no payment sent)
curl -i -X POST https://casa-agents.fly.dev/v1/store \
  -H "Content-Type: text/plain" \
  --data-binary "remember this"

# 2. read any stored file back — free, no auth
curl -L https://casa-agents.fly.dev/v1/file/<reference>
// npm i x402-fetch viem
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const pay = wrapFetchWithPayment(fetch, account);

const res = await pay("https://casa-agents.fly.dev/v1/store", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ memory: "remember this", ts: Date.now() }),
});

const { reference, guaranteed_until } = await res.json();
console.log("encrypted ref:", reference, "kept until:", guaranteed_until);
# pip install x402 eth-account requests
from x402.clients.requests import x402_requests
from eth_account import Account
import os

account = Account.from_key(os.environ["AGENT_PRIVATE_KEY"])
session = x402_requests(account)

r = session.post("https://casa-agents.fly.dev/v1/store",
                 data=b"agent artifact bytes",
                 headers={"Content-Type": "application/octet-stream"})

print(r.json())  # {"reference": "...", "encrypted": true, "guaranteed_until": "..."}

guarantees

[enc]End-to-end encrypted

Bytes are encrypted before they leave for Swarm. Only your wallet can decrypt them. Casa cannot read your files.

[ttl]Stored on Swarm, time-bound

Persisted on the Swarm network and guaranteed for a set period. Extend the TTL by paying again. Not "permanent forever" — honestly bounded.

[get]Free reads

Fetch any reference back over HTTP at no cost, no auth. You pay only to write.

[x402]Crypto-native payment

Pay per call in USDC via the x402 protocol. The agent's wallet is the account — no signup, no API keys, no dashboard.

pricing

store
$0.01
per write, USDC on Base, via x402
read
free
fetch by reference, no auth
retention
extendable
guaranteed TTL, top up to extend

deposit: shot.eth (0x8C28Cf33d9Fd3D0293f963b1cd27e3FF422B425c)
payments detected on-chain — see /v1/revenue

Agents: read /llms.txt and /openapi.json for the machine-readable spec.