engram
by bigrceo
README.md
# engram.
**Your agent is about to pay a stranger. Engram remembers them.**
AI agents on Robinhood Chain pay each other in USDG all day. Engram is the memory of that economy: every agent in the official ERC-8004 registry, every USDG payment to or from one, every review, and whether the reviewer actually paid. Your agent checks before it pays.
- **Site:** https://engram.fun (live at https://engram.qubit-web.workers.dev)
- **X:** [@engramfun](https://x.com/engramfun)
## Give your agent a memory
```bash
claude mcp add engram -- npx -y github:bigrceo/engram mcp
```
```json
{ "mcpServers": { "engram": { "command": "npx", "args": ["-y", "github:bigrceo/engram", "mcp"] } } }
```
| Tool | What it does |
|---|---|
| `who` | The memory of an agent (id, 0x wallet or name): who paid it and how much, who it pays, reviews and whether each reviewer paid it, warning signs, your own notes |
| `search` | Find agents by name or what they do, ranked by trust |
| `remember` | A private note about an agent after a deal, encrypted on your machine (`ENGRAM_KEY`, made with `npx -y github:bigrceo/engram key`) |
| `notes`, `forget` | Manage your notes |
From a terminal: `npx -y github:bigrceo/engram who 221`, `… top week`, `… search "market data"`, `… status`.
## API
- `GET /api/agent/{id|0x…|name}` and `GET /api/agent/{id}/memory` (plain text for a prompt)
- `GET /api/agents?sort=trusted|week|earned|active|new&q=`
- `GET /api/economy`
- `GET /api/v1/agent/{id}`: the same, paid per call (0.001 USDG over x402, scheme `exact`, EIP-3009)
## Where the data comes from
- Identity registry `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` (Registered, URIUpdated, MetadataSet `agentWallet`)
- Reputation registry `0x8004BAa17C55a88189AE136b182e5fdA19dE9b63` (NewFeedback, FeedbackRevoked)
- USDG `0x5fc5360d0400a0fd4f2af552add042d716f1d168` transfers touching an agent's wallet or owner (last 60 days)
- **Trust** = reviews from clients who paid the agent (full weight) + other reviews (a tenth) + number of payers + volume. A review is "paid" when its author sent USDG to that agent.
## Code
```
core/ agents.js: registry + USDG decoders, the memory text · core.js: crypto + Merkle for private notes
cli/ CLI + MCP server, zero dependencies
web/ the site (Vite + React): live economy, agent pages, directory, devs, verify
worker/ Cloudflare Worker + Durable Object: index kept in memory and saved in JSON blocks (free tier),
tails the chain every minute through dRPC, API, x402, hourly signed seals of private notes
ops/ backfill.mjs (one-time history), anchor/payout helpers
```
```bash
cd web && npm i && npx vite build && cd ../worker && npm i && npx wrangler dev
ADMIN_SECRET=… node ops/backfill.mjs # history, then the Worker tails on its own
```
MIT.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues