{"slug": "show-hn-the-terse-state-language-and-protocol", "title": "Show HN: The TERSE state language and protocol", "summary": "A developer has released TERSE, a pre-release (alpha) unified state language and protocol designed for efficient state storage, querying, and mutation, with a focus on simplicity and token efficiency. The project includes a reference Python implementation, an MCP server, a memory module, and a Karpathy-brain compatible API that claims 1/6th token use and 1/8th the number of tool calls compared to alternatives.", "body_md": "# Hello World(valid terse; for Show HN)\n\nI'm terse(greetings)\n\n## Container\n\n\"A container may have one text block, single or multi-line\"\n\nObject(Semi-colon separated attributes; variables_like: 123; \"Traditional unicode strings allowed here too.\")\n\nAnother object with a name(multiple objects under a container)\n\n## Further description of TERSE\n\n\"\"\"\n\nTERSE is a unified way to store state, with a defined way to query and mutate it that has been relentlessly refined for overall simplicity and token efficiency not just at rest, but in operation.\n\nWe realized state access was a low-level, common pattern that keeps getting reinvented. It goes deeper than just AI memory. Consider that Anthropic memory and others are a bunch of markdown files and in some respects, they got it right... simpler is better.\n\nSo REALLY the problem is settling on a format that is flexible to cover 95% of a domain. We can do so MUCH better than Markdown; TERSE is opinionated on that but it has very good reasons.\n\nBy being a line-ordered and line-identifiable structure (with special treatment for free-form blocks like this), now the whole state can be idempotently re-declared. Literally, this text of this post is a TERSE state declaration that an AI or you could make. Or, duh, just copy this to a .terse file!\n\nSo let's say you did that. To query this state:\n\n> ? Hello World\n\nTo copy this whole state somewhere:\n\n> # My new container\n\n> ? Hello World //inline queries physically expand into the declaration\n\nDirectives are a [tail] with composable set of operations. For example, let's clean that up.. I declare thee removed!\n\n> # My new container [REMOVED] // all contents too!\n\nThere's more. TERSE makes it exceeding easy for the AI to do stuff with state.\n\nThe MCP has one main op where these two things are sent *together*\n\n1) state declarations\n\n2) state queries (post-application of declarations and results unioned)\n\nBTW, to query all state, wait for it...\n\n> ? // Not that you want do this often!\n\nTERSE has a full object model for (de)serialization. A reference Python implementation of the full specification is also included.\n\n\"\"\"\n\n## Example apps included(to help get you started; in the monorepo)\n\n### TERSE MCP(\"store anything you want locally for your AI\")\n\n### TERSE Memory(a generalist; modify your own)\n\n### TERSE Brain\n\n\"A Karpathy-brain compatible API but with TERSE as the backing store. 1/6th token use and 1/8th the number of tool calls!\"\n\n### Misc\n\nTERSE Browser(query-response UI; great for testing)\n\nVS Code syntax highlighter(vsix included)\n\n## Reminders\n\nTerse is pre-release(alpha)\n\nComments URL: [https://news.ycombinator.com/item?id=49045760](https://news.ycombinator.com/item?id=49045760)\n\nPoints: 1\n\n# Comments: 1", "url": "https://wpnews.pro/news/show-hn-the-terse-state-language-and-protocol", "canonical_source": "https://github.com/terse-lang/terse", "published_at": "2026-07-25 08:45:22+00:00", "updated_at": "2026-07-25 09:22:50.285294+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "ai-tools"], "entities": ["TERSE", "Anthropic", "Python", "MCP", "Karpathy-brain", "VS Code"], "alternates": {"html": "https://wpnews.pro/news/show-hn-the-terse-state-language-and-protocol", "markdown": "https://wpnews.pro/news/show-hn-the-terse-state-language-and-protocol.md", "text": "https://wpnews.pro/news/show-hn-the-terse-state-language-and-protocol.txt", "jsonld": "https://wpnews.pro/news/show-hn-the-terse-state-language-and-protocol.jsonld"}}