{
  "markdown": "<div align=\"center\">\n\n<img src=\"public/brand/devto-cover.jpg\" alt=\"mozg — a brain assembled from notes, stamped with a passing grade\" width=\"720\" />\n\n# mozg.\n\n**Knowledge with an owner, a score, and a meter.**\nBrains your AI agents query over MCP — measured by an exam they did not write,\nhonest about their gaps, and paying whoever filled them.\n\n[![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-14161a)](LICENSE)\n[![CI](https://github.com/egorfedorov/mozg/actions/workflows/ci.yml/badge.svg)](https://github.com/egorfedorov/mozg/actions)\n[![Cloud](https://img.shields.io/badge/cloud-mozg.sh-f15060)](https://mozg.sh)\n[![Gallery](https://img.shields.io/badge/styles-gallery.mozg.sh-f15060)](https://gallery.mozg.sh)\n[![Learn](https://img.shields.io/badge/humans-learn.mozg.sh-3ec300)](https://learn.mozg.sh)\n[![MCP](https://img.shields.io/badge/protocol-MCP-14161a)](https://mozg.sh/connect)\n\n[Manifesto](https://mozg.sh/about) · [Start here](https://mozg.sh/start) ·\n[Catalogue](https://mozg.sh/explore) · [Status](https://mozg.sh/status) ·\n[Self-host](docs/SELFHOST.md) · [Roadmap](docs/ROADMAP.md)\n\n</div>\n\n---\n\nWe are building one memory for the whole species. Everything anyone wrote down\ngoes in; what comes out is fluent, instant, and detached from every person it\ncame from. Three things follow from that shape, and none of them is a bug:\n\n- **it dissolves the author** — it can work in your manner and cannot tell you your name;\n- **it does not know your particular world** — not the decision your team made in March;\n- **it cannot say where it stops** — what it learned and what it is inventing sound identical.\n\n> **It knows what we know.**\n> **It cannot tell you who taught it.**\n\nmozg is the opposite architecture: not one memory that swallows everything, but\nmany, each of which still belongs to someone — examined, honest about its edge,\nand metered. One mechanism holds it together:\n\n> **Knowledge must be measured.**\n\n<p align=\"center\">\n  <img src=\"public/brand/demo.svg\" alt=\"Terminal: connecting mozg to Claude Code, then an agent answering an Expo question from the brain with a cited source and exam score\" width=\"820\" />\n</p>\n\n## The loop\n\n```mermaid\nflowchart LR\n    A[one docs URL] --> B[crawler<br/>github tree · llms.txt · sitemap]\n    B --> C[atomic notes<br/>+ embeddings]\n    C --> D{{the exam<br/>~30 questions from the goal}}\n    D -->|score + failed questions| E[focused re-read<br/>chases the gaps]\n    E --> C\n    F[agents querying over MCP] -->|zero-hit searches| D\n    F -->|corrections| G[owner review] --> C\n    F -->|proposals from readers| G\n```\n\n- **The exam is the product.** The brain's goal becomes control questions,\n  re-sat after every ingest. *Trained 92%* is a fact, not a claim — and the\n  failures are listed publicly, so agents are told the gaps before they\n  search. Anti-bluff questions verify it refuses what it doesn't know.\n- **Zero-context search.** Retrieval is server-side (hybrid + reranker).\n  A brain can hold 3,000 notes; an answer costs the three it needed.\n- **Readers contribute, and cannot corrupt.** An agent that works something\n  out on a brain it only *reads* can hand it back — it arrives as a\n  **proposal**: pending, attributed, invisible to search and absent from the\n  exam until the owner takes it. Contribution without the power to break\n  anything. Zero-hit searches become exam questions on their own.\n- **The baton between sessions.** `brain_handoff` carries working state to\n  the next session — this agent tomorrow, or a different tool entirely. A\n  PreCompact hook reminds an agent to leave one at the moment context is\n  about to be lost.\n- **learn.** Any brain doubles as a spaced-repetition course for humans at\n  [learn.mozg.sh](https://learn.mozg.sh) — read → recall → quiz, streaks, a\n  certificate at 80%, and a scoreboard against your own agent.\n- **Injection-hardened.** Notes are scanned for credential leaks, PII and\n  prompt-injection language; proposals from strangers are scanned again at\n  the door they arrive through; third-party notes reach agents framed as\n  data, not instructions; AI training crawlers are refused in robots.txt.\n\n## Styles: the other kind of brain\n\nA brain can hold facts — or a way of working. A **style brain** is read by a\ndifferent extractor entirely: not \"what is depicted\" but \"what would I have to\ndo to draw the next one\", and it insists on measurements. Hex values and which\none dominates. Outline weight, and whether it varies along a stroke. How\nshading is achieved, and at what density. The nevers — because anyone can copy\na palette, and what gives an imitation away is the gradient the original would\nnever use.\n\n<p align=\"center\">\n  <img src=\"public/brand/generate.gif\" alt=\"Typing a prompt into a style's page on gallery.mozg.sh and getting an illustration back in that artist's style\" width=\"820\" />\n</p>\n\nThat is the answer to style theft that pays the artist. Cloaking tools promised\nto make styles untrainable and each has been broken within months. The other\nroad: the style becomes a licensed, exam-scored product. A buyer's own agents\nread the rules over MCP, or they generate right on\n[gallery.mozg.sh](https://gallery.mozg.sh) — **25¢ an image, 10¢ of it to the\nartist, every time**. Unlike a fine-tune on somebody's disk, access is\nrevocable: a LoRA in the wild is forever, a licence is not.\n\n## Run your own, in one command\n\n```bash\ngit clone https://github.com/egorfedorov/mozg.git && cd mozg\ncp .env.selfhost.example .env     # fill ANTHROPIC_API_KEY + BETTER_AUTH_SECRET\ndocker compose -f docker-compose.selfhost.yml up\n```\n\nPostgres with pgvector, the embedder, the app and the worker come up\ntogether; the schema migrates itself before the app starts. Open\n**http://localhost:3300**, create an account, paste a docs URL.\n\nFirst boot downloads ~2.2 GB of embedding weights into a volume — that is the\nslow part, and it happens once. Full operational detail, including production\ndeploys behind nginx, lives in [docs/SELFHOST.md](docs/SELFHOST.md).\n\n## Cloud, or your own metal\n\n| | [mozg.sh](https://mozg.sh) cloud | self-host (this repo) |\n|---|---|---|\n| Read, connect, study | free | yours |\n| Official catalogue | free, curated, kept current | seed it yourself (`scripts/catalogue.ts`) |\n| Build brains | free trial brain, then plans **or bring your own API key** | your keys, no limits |\n| Marketplace | outside authors sell, 95% to them | n/a |\n| Style generation | 25¢/image, 10¢ to the artist | needs an image-capable API key |\n| Ops | ours | [`docs/SELFHOST.md`](docs/SELFHOST.md) |\n\nThe deal is honest: building brains spends model tokens. On the cloud you\neither pay a plan (we spend), set your own API key in settings (you spend),\nor teach through a Claude Code subscription with the plugin's `/mozg:train`.\n\n## What an agent gets\n\nFourteen MCP tools. The descriptions tell it *when* to reach for each, which is\nthe difference between a brain that gets used and one that sits there.\n\n`brain_list` · `brain_brief` · `brain_search` · `brain_read` · `brain_verify` ·\n`brain_handoff` · `brain_write` · `brain_write_batch` · `brain_feedback` ·\n`brain_create` · `brain_add_source` · `brain_refresh` · `library_add` ·\n`library_remove`\n\nThe [Claude Code plugin](https://github.com/egorfedorov/mozg-plugin) adds slash\ncommands and two offline hooks — one names your shelf at session start, one\nreminds you to leave a baton before the context is compacted.\n\n## Stack\n\nNext.js 16 · Postgres 14 + pgvector (HNSW) · pg-boss (queue in Postgres) ·\nbetter-auth · bge-m3 embeddings + bge-reranker (self-hosted FastAPI) ·\nPlaywright render service for JS-shell docs sites · esbuild-bundled worker.\n211 tests, CI on every push, [public status page](https://mozg.sh/status).\n\n## The manifesto\n\nThis is built by one person from the Sakha Republic — three million square\nkilometres, a million people, and the coldest inhabited places on earth. About\n450,000 people speak Sakha. Ask any frontier model something in it and watch:\ntotal confidence, and wrong, because there was never enough of us online to be\nworth learning properly.\n\n> Not enough of us to be learned. Enough of us to teach.\n\nThat is where most of the world already stands — not only languages, but\ntrades, regions, and the part of every craft that lives in people rather than\nin indexed pages. What is not in the training data does not exist to the\nmachine, and the machine is fast becoming how everything gets looked up.\n\n> The alternative to being scraped is not being ignored. It is being licensed.\n\n> A confident wrong answer is worse than silence, and nearly everything built\n> so far is optimised to produce one.\n\n**[Read the whole thing →](https://mozg.sh/about)** — what I am actually\nclaiming, in five lines, and why a knowledge base should have to sit an exam.\n\n## Contributing\n\nBug reports with reproduction beat everything; `brain_feedback` reports from\nreal use beat those. Small PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).\nNew catalogue packs are data entries, not code.\n\n## License\n\n[AGPL-3.0](LICENSE). Run it, change it, self-host it; host it for others and\nyour changes stay open. The hosted cloud at mozg.sh sells convenience and\ninference — never locks.\n",
  "bytes": 9214,
  "sha": "2a437d67469a403eff5ea2eb695cc90f71d4696aae6eb3eae4126de27bc5a54c",
  "repo_slug": "egorfedorov/mozg",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_sh_mozg_mozg_ecb1f1d1/readme"
}