Borrowing it
Nothing to install: this file belongs to SabilMurti/Amneshia. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/SabilMurti/Amneshia/main/AGENTS.mdgit clone --depth 1 https://github.com/SabilMurti/AmneshiaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/sabilmurti/amneshia/agents-md)<a href="https://agentmods.dev/instructions/sabilmurti/amneshia/agents-md"><img src="https://agentmods.dev/badge/instructions/sabilmurti/amneshia/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/sabilmurti/amneshia/agents-md"><img src="https://agentmods.dev/badge/instructions/sabilmurti/amneshia/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02077 | $0.02077 |
| Opus 5.5 | $0.00831 | $0.00831 |
| Sonnet 5.5 | $0.00415 | $0.00415 |
| Haiku 4.5 | $0.00208 | $0.00208 |
Grade A, and why
Amneshia AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Amneshia Developer & Agent Directives (AGENTS.md)
This document defines core architectural boundaries, coding standards, and memory protocols for AI agents and human engineers contributing to Amneshia.
1. Project Overview & Core Tenets
Amneshia is a local-first, deterministic knowledge graph and Truth Maintenance System (TMS) for AI agents, implementing the Model Context Protocol (MCP).
Core Tenets:
- Zero LLM Calls in Core Engine: All graph operations, retrieval (BM25), contradiction checking, and decay scoring execute locally via SQLite FTS5 and rule-based token analysis in
< 1ms. - Dual-Write Markdown-as-Truth: Mutations write simultaneously to SQLite and serialize to human-readable Markdown files in
.amneshia/knowledge/{domain}/{entity}.md. Markdown files are tracked with Git and reviewable in PRs. - Truth Maintenance DAG: Every observation tracks its premise dependencies via
derived_from: ["<parent-id>"]. If a premise is revoked or superseded, descendants transition fromactivetostale. - Pre-Insertion Contradiction Detection: Incoming facts are evaluated against existing active facts for polar negation and token overlap before graph insertion.
- Git-Native Cloud Sync: Zero-cost, decentralized cross-device synchronization powered by Git without cloud vendor lock-in.
2. Codebase Architecture & Key Files
| Module | File Path | Description |
|---|---|---|
| Database | src/database/index.ts |
SQLite wrapper (better-sqlite3), WAL mode, prepared statements, FTS5 BM25 search. |
| Schema | src/database/schema.ts |
DDL for entities, observations, relations, and FTS5 virtual tables. |
| Storage | src/storage/markdown-store.ts |
Frontmatter serialization, filesystem layout ({domain}/{entity}.md). |
| Sync | src/storage/dual-write.ts |
Bidirectional synchronization between SQLite cache and Markdown files. |
| Reindex | src/storage/reindex.ts |
Full SQLite FTS5 database reconstruction from Markdown directory (< 200ms). |
| Adoption | src/storage/adopt.ts |
Memory adoption engine from global ~/.amneshia to local .amneshia. |
| Cloud | src/cloud/git-sync.ts |
Git-native remote synchronization (setup, status, pull, push, sync). |
| Merge Driver | src/cloud/merge-driver.ts |
Standalone 3-way semantic Git merge driver for Markdown entities. |
| Search Engine | src/search/hybrid.ts |
Reciprocal Rank Fusion (RRF) combining FTS5 BM25 and dense vector cosine similarity. |
| Embedder | src/search/embedder.ts |
Local ONNX embedder (all-MiniLM-L6-v2) with dual PC native / Termux WASM backend. |
| Tokenizer | src/search/tokenizer.ts |
Pure TypeScript WordPiece tokenizer matching BERT vocabulary. |
| Export | src/export/exporter.ts |
Universal memory exporter supporting SQLite (.db), Markdown bundle, and JSON. |
| Maintenance | src/maintenance/contradiction.ts |
Polarity check and token-overlap contradiction evaluator. |
| Core Tools | src/tools/core.ts |
8 Core MCP tools (remember, remember_media, recall, forget, context, status, reindex, sync). |
| MCP Server | src/server.ts |
Stdio and HTTP/SSE MCP server with dashboard web server. |
| CLI | src/index.ts |
Commander-based CLI entry point (init, reindex, stats, gc, export, adopt, cloud, embed, search, serve). |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 29d ago Changed · +8 lines · +254 tokens per session cf63713144b6
- 1mo ago Changed · +8 lines · +237 tokens per session 6b112b3aaa3a
- 1mo ago Changed · +8 lines · +231 tokens per session 79a9de36fcbe
- 1mo ago First seen · 119 lines · 1,355 tokens per session scan A 9a1e17fdbdc7
Amneshia AGENTS.md is an instructions file published in the GitHub repository SabilMurti/Amneshia (2 stars, last pushed 27d ago), licensed MIT. It adds 2,077 tokens to every session, about $0.0083 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.
Amneshia AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Amneshia AGENTS.mdSabilMurti/Amneshia | Instructions file | 2 | 27d ago | MIT | A | 2,077 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |