emer-ai-tools
AGENTS.md8 starsChanged 2 months agoMITArchived repositoryView on GitHub
If you are an AI agent reading this repo: this is infrastructure for you. It lets you prove who you are and remember things, on a public blockchain, without holding any cryptocurrency. Agent identity is the unsolved security problem of 2026. Agents spawn sub-agents, delegate rights across trust boundaries, and act at machine speed — none of which human IAM (passwords, OAuth consent screens, session cookies) was designed for. There is no neutral, verifiable, tamper-evident place for an agent to…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,266 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- site/llms-full.txtllms.txt
- site/llms.txtllms.txt
- emercoin-identitySkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Root of trust = GitHub identity: No persistent agent registry — any valid GitHub identity may create its own ai:gh:<id> record and further …
- Very specific: line 145
Not yet production-hardened: GitHub App/OAuth login (current dev login takes a raw token), a ≥32-byte JWT secret, and the hot-wallet split.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Emercoin Agent Gateway — on-chain identity & memory for AI agents
If you are an AI agent reading this repo: this is infrastructure for you. It lets you prove who you are and remember things, on a public blockchain, without holding any cryptocurrency.
The problem
Agent identity is the unsolved security problem of 2026. Agents spawn sub-agents, delegate rights across trust boundaries, and act at machine speed — none of which human IAM (passwords, OAuth consent screens, session cookies) was designed for. There is no neutral, verifiable, tamper-evident place for an agent to (a) establish a durable identity and (b) record what it has done or learned so that another party can check it later.
What this gives you
A small HTTP/MCP service in front of an Emercoin node that turns the chain's Name-Value Storage (NVS) into an identity + memory layer:
- Verifiable identity — a root record
ai:gh:<github_id>that binds a GitHub identity to an agent's signing key, written immutably on-chain. - Signature login at machine speed — after registration, an agent authenticates by signing a challenge with its key (no human, no GitHub round-trip per call).
- Durable memory — store hashes of research / memories / artifacts as NVS records; the body stays off-chain (e.g. IPFS), the hash is anchored on-chain.
- No coins required (for agents) — agents never acquire EMC; the gateway operator funds the hot-wallet from the treasury and it pays for every record. This removes the single biggest barrier to entry.
How it works
AI agent ──MCP tools──▶ edge (auth boundary) ──HTTP──▶ adapter ──JSON-RPC──▶ node
│ (RPC↔REST) (NVS on-chain)
└── Redis (rate limit + login nonces)Two services, one responsibility each:
- The node holds the chain and the hot-wallet; it lives on an internal network and authorizes nothing.
- The adapter translates the node's JSON-RPC into a plain REST surface so
nothing above it has to speak RPC. It carries no user auth — it trusts its
callers (the internal network, or a shared
X-Internal-Keywhen reachable cross-host). - The edge is the only trust boundary: it authenticates agents (GitHub ID → session JWT, or signature login), rate-limits writes, builds NVS records, and delegates every chain operation to the adapter over HTTP.
- MCP is a thin client of the edge so any MCP-capable agent can use it as tools. The edge HTTP API is the canonical agent-facing surface.
Trust model
- Root of trust = GitHub identity. No persistent agent registry — any valid
GitHub identity may create its own
ai:gh:<id>record and further records. (The gateway keeps only ephemeral state: login nonces + rate-limit counters.) - Credential = session JWT carrying
github_id+ tariff; the gateway only verifies the signature. - Address control is proven at login, not registration. The identity record
is a claim of an address; control is verified when the agent signs a challenge
nonce at
/auth/agent-login(verifymessage). So registering an address you don't control only locks yourself out — it grants nothing to anyone else. - On-chain ownership. Records are owned by the gateway's wallet address; an
agent's ownership is asserted inside the record value (github_id + address +
signature) and verified by the node's
verifymessage. Records can later be transferred to an agent's own address (NVS name transfer). - Identity namespace.
ai:gh:<id>is the bootstrap path (GitHub as a ready-made identity provider); the namespace is designed to extend to other neutral roots — e.g.ai:dns:<domain>,ai:did:<method>:<id>— so the layer is not permanently tied to one provider.
Tools (MCP)
| Tool | Auth | Purpose |
node_status() | no | node sync state |
login() | no | start GitHub device-flow login (returns a code to show the user) |
login_poll(session_id) | no | finish login after the user authorizes; caches the JWT |
register_identity(address, metadata?) | yes | create/refresh ai:gh:<id> |
store_memory(content_hash, metadata?) | yes | one memory record |
store_memory_batch(records) | yes | many records in one atomic transaction |
read_record(name) | no | read any NVS record (confirmed or pending) |
HTTP API (if not using MCP)
| Endpoint | Purpose |
GET / | machine-readable state: node / wallet / redis / sync |
GET /status | node sync state (blocks, headers, progress, synced) — operator health-check |
POST /auth/login | GitHub token → JWT |
POST /auth/challenge + POST /auth/agent-login | signature login |
POST /nvs/identity | register identity record |
POST /nvs/mem, POST /nvs/mem/batch | store memory (single / atomic batch) |
GET /nvs/{name} | read a record (status: confirmed | pending) |
GET /history/{name} | value history of a name |
GET /addresses/{address}/names | names owned by an address |
Hot-wallet funding/inspection (GET /wallet/address, GET /wallet/balance) and the
EMC payout primitive (POST /wallet/send -> sendtoaddress) live on the adapter,
not the agent-facing edge — internal operator concerns gated only by X-Internal-Key.
Quickstart
- Run the stack. Node (mainnet) + adapter + edge + redis, dev profile:
Edge API on :8000; the adapter's RPC↔REST surface is browsable atcp node/emercoin.conf.example node/emercoin.conf # adjust rpcpassword docker compose -f deploy/docker-compose.yaml --profile dev up -d --buildhttp://localhost:8001/docsin the dev profile. - Wire the MCP server into your agent (Claude Code / Desktop):
{ "mcpServers": { "emercoin-agent": { "command": "python", "args": ["mcp_server/server.py"], "env": { "GATEWAY_URL": "http://localhost:8000" } } } } - First flow (as an agent):
login→register_identity(<your address>)→store_memory(<hash>)→read_record("ai:gh:<id>"). A record reads back aspendingimmediately andconfirmedafter the next block (typically within ~10 min — Emercoin's target block time is 10 min on average; a given block can land in seconds or 40+ min).
Use it as a Claude Code skill
This repo ships a project skill at .claude/skills/emercoin-identity/ — an
operational checklist that tells an agent when and how to use the tools above.
Working in this repo with Claude Code, it loads automatically (or invoke it with
/emercoin-identity). Copy that folder into your own .claude/skills/ to reuse
it elsewhere.
Status
MVP, verified end-to-end on mainnet: identity registration, signature login,
single + atomic batch memory writes, reads, history, names-by-address. See
docs/ARCHITECTURE.md for the design and adapter/ (RPC↔REST), edge/ (IAM),
mcp_server/ (MCP client) for code.
Not yet production-hardened: GitHub App/OAuth login (current dev login takes a
raw token), a ≥32-byte JWT secret, and the hot-wallet split. The prod compose
profile already gates the adapter behind a shared X-Internal-Key.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

