Amneshia: Instructions file for Codex

AGENTS.md

Amneshia AGENTS.md is an instructions file for Codex, OpenCode from SabilMurti/Amneshia. It costs 2,077 tokens per session, scanned A, original, MIT.

A repository instruction document for the Amneshia project. AGENTS.md files tell coding agents and developers about a project’s architecture, rules, testing standards, and working practices.

In plain words
What is it for?
It is for guiding coding-agent and developer work on Amneshia, including architecture, testing, and repository conventions.
Why use it?
It gives contributors shared guidance on how the codebase works and what constraints changes must follow, including its local knowledge graph and memory rules.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is SabilMurti/Amneshia's own configuration. It tells Codex and OpenCode how to work on Amneshia itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Amneshia configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/SabilMurti/Amneshia/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/SabilMurti/Amneshia

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for Amneshia AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sabilmurti/amneshia/agents-md/github.svg)](https://agentmods.dev/instructions/sabilmurti/amneshia/agents-md)
Your own site
<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.

agentmods 80×15 button for Amneshia AGENTS.md

Your own site · 80×15
<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>
Per session 2,077 This file is loaded in full into every session.
When invoked 2,077 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 29d ago against content hash cf63713144b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 143 lines

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:

  1. 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.
  2. 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.
  3. Truth Maintenance DAG: Every observation tracks its premise dependencies via derived_from: ["<parent-id>"]. If a premise is revoked or superseded, descendants transition from active to stale.
  4. Pre-Insertion Contradiction Detection: Incoming facts are evaluated against existing active facts for polar negation and token overlap before graph insertion.
  5. 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).

Read the full file on GitHub · 143 lines

Changes

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.

  1. 29d ago Changed · +8 lines · +254 tokens per session cf63713144b6
  2. 1mo ago Changed · +8 lines · +237 tokens per session 6b112b3aaa3a
  3. 1mo ago Changed · +8 lines · +231 tokens per session 79a9de36fcbe
  4. 1mo ago First seen · 119 lines · 1,355 tokens per session scan A 9a1e17fdbdc7

Subscribe to this mod's changes

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.

Related

Amneshia AGENTS.md compared with instructions from other repositories

Amneshia AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Amneshia AGENTS.mdSabilMurti/AmneshiaInstructions file227d agoMITA2,077Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot