BaseLayer
llms.txt5 starsChanged 9 months agoApache-2.0View on GitHub
Base Layer is an open-source pipeline that turns your writing into a specification for AI agents. It derives plain-text claims about how you reason, communicate and decide from your chats, essays, notes and transcripts. An agent reads the specification before acting for you. This file describes the source repository at version 0.5.0 and matches its README. If another document disagrees with the README or the paper (https://arxiv.org/abs/2605.28969), the README and paper are the record. If you are an agent working…
- Reads credentials
- Installs packages
The file
We split this llms.txt into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 12
Every claim has an id and can state when it applies in an Active when line.
- Very specific: line 24
Every step is described in docs/PIPELINE.md.
- Distinctive: line 57
No check here establishes that a specification is faithful.
≈ “Common” is an estimate: at least 1 in 5 of the 4,067 llms.txt 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
# Base Layer > Base Layer is an open-source pipeline that turns your writing into a specification for AI agents. It derives plain-text claims about how you reason, communicate and decide from your chats, essays, notes and transcripts. An agent reads the specification before acting for you. This file describes the source repository at version 0.5.0 and matches its README. If another document disagrees with the README or the paper (https://arxiv.org/abs/2605.28969), the README and paper are the record. If you are an agent working in this repository, read AGENTS.md. People often look for this kind of tool to build a profile of how they think from a ChatGPT or Claude export. They may also want a personal context file for an agent. Base Layer writes that profile as a specification. It contains claims with ids, conditions and evidence that the person can check and correct. ## What a specification is - It has three layers. ANCHORS describes the certainties the person reasons from. CORE describes how they communicate and the context needed to read them. PREDICTIONS describes how they are likely to respond in a given kind of situation. - Every claim has an id and can state when it applies in an `Active when` line. - In the cited build, every claim cites the facts it rests on. Every fact quotes the person's own words. - Base Layer works alongside memory systems but is not a memory system. The same set of facts can be interpreted differently. A memory system stores the facts, and Base Layer guides how an agent interprets them for this person. - It describes how someone reasons. It is not a copy of the person, a biography or a summary. - It is unconfirmed. Models produce the reading. Only the person it describes can confirm that it represents them. - It is written for the agent working for the person. The person reads it to correct it. ## Two builds - The cited build is the method. It takes eight commands. Run `init`, `import`, `extract --turn-contract`, `distill` and `assemble` for each layer, then `author-from-package`, `verify-spec` and `consolidate`. Every claim must cite facts. By default, extraction runs on Claude Haiku 5.5. The leaf stage (`distill`) runs on Claude Sonnet 5, and authoring runs on Claude Opus 5. The build is experimental and does not yet serve its result to an agent automatically. `consolidate` writes `served.txt` and `index.json`, which you put in a system prompt by hand. - `baselayer run` is the older, quicker pipeline. It takes one command and makes far fewer checks. Claude Haiku 4.5 extracts facts. Claude Sonnet 4.6 writes the three layers in separate calls, each from a size-capped selection of facts. Citations are optional. Each claim is then linked to the facts nearest it in meaning. These links show related facts. They do not show which facts the writer used. The result is served to Claude Code over MCP. Every step is described in docs/PIPELINE.md. ## Models and providers Base Layer has been tested almost entirely on Anthropic's models. Every language-model call goes to the Anthropic API, except extraction, which can run on a local model through Ollama (`baselayer extract --backend ollama`). The local models tested fell well short of the pipeline's needs. The specification itself is plain text, so you can also paste the three layer files into a system prompt by hand. Fact search is unavailable that way. ## Install Version 0.5.0 is pre-1.0 and is not on PyPI. The `baselayer` name there belongs to another project. Base Layer requires Python 3.10 or later, git, and an Anthropic API key in `ANTHROPIC_API_KEY`. ```bash pip install git+https://github.com/agulaya24/BaseLayer.git baselayer run chatgpt-export.zip claude mcp add --scope user --transport stdio base-layer -- baselayer-mcp ``` Run it on your own writing, or on writing by someone who has agreed to it. On the first run, `baselayer run` asks for consent and for the writer's name and pronouns. It estimates the extraction cost and asks before spending. That estimate covers extraction only and has been too low, so treat it as a floor. Some clients shorten long MCP instructions. The full specification is always available as the `memory://specification` resource. ## Cost These are the API costs for one specification, from the README. The projections scale the per-fact costs from recorded cited builds. The `baselayer run` extractor has not been priced on a recorded run, so treat that column as an order-of-magnitude estimate. - About 50,000 words. The cited build costs $5 to $7, and `baselayer run` costs $1 to $2. Both are projected. - About 150,000 words. The cited build costs about $17, and `baselayer run` costs $3 to $4. Both are projected. - About 300,000 words. The cited build costs about $28 (derived), and `baselayer run` costs about $6 (projected). - A chat history of about 1.4 million words. The cited build costs about $92 (derived), and `baselayer run` costs about $47 (projected). ## Research - Beyond Recall (arXiv:2605.28969, v2) is a preprint testing specifications on 14 historical subjects with public-domain autobiographies. A panel of five model judges scored the results. Facts plus a specification scored higher than no context on 12 of 14 subjects (mean +0.55 on a 1 to 5 rubric). On the 9 subjects the model knew least, the mean gain was +0.89 and all 9 improved (§4.1). Gains were largest where the model knew the person least. On questions that require recall, the specification can interfere rather than help. The study has not been replicated with living users. - The study's evaluation design and pre-registered analysis plan, including later deviations, are documented in the [Beyond Recall repository](https://github.com/agulaya24/beyond-recall). - A later test, separate from the paper, used recorded responses to the same decisions under nine specifications. A simple classifier identified the right specification 51.6% of the time from the reasoning and 13.4% from the decision alone, against 11.1% chance. The test used no model judge. It did not rule out differences in tone and length. - Specifications changed how decisions were argued in every situation tested. They changed the decision itself in some situations. - No check here establishes that a specification is faithful. Another model's ability to tell specifications apart establishes distinguishability. Only the person can confirm it. ## Reproducibility The version used for the paper is tagged `v0.2.0`. Install it with `pip install git+https://github.com/agulaya24/BaseLayer.git@v0.2.0`. The study code, data and judge outputs are in https://github.com/agulaya24/beyond-recall, which also includes a copy of that source at `./baselayer/`. The dataset is at https://huggingface.co/datasets/agulaya24/beyond-recall. ## Privacy The database, facts and specification are stored only on your machine. There are no accounts and no sync. Extraction, distillation, writing, the tension check and all model-judged checks send text to the Anthropic API. Anthropic's retention policy applies. The embedding model is downloaded from Hugging Face on first use. Base Layer sends no usage data and turns off ChromaDB's telemetry on every client it creates. ## Links - Website: https://www.base-layer.ai (agent index: https://www.base-layer.ai/llms.txt, longer version: https://www.base-layer.ai/llms-full.txt) - Example specification API: `GET https://www.base-layer.ai/api/identity/franklin` returns JSON with no authentication. These examples predate citations. The cited example is in `examples/zitkala_sa/`. - MCP server card: https://www.base-layer.ai/.well-known/mcp/server-card.json - Terms used in a fixed sense: docs/DEFINITIONS.md Author: Aarik Gulaya. Contact: aarik@base-layer.ai.
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.

