Research ReleaseBeyond Recall: Behavioral Specification as an Interpretive Layer for AI Personalization.Read the paper →

Base Layer

Agents make thousands of decisions.
Base Layer makes them yours.

How you reason. What you avoid. When your patterns break. Extracted from text, compressed into a behavioral specification that any AI agent can use to align its decisions with yours. Traceable. Testable. Yours to modify.

The behavioral layer of the agentic stack.

Open source. Apache 2.0.

Facts

Raw extraction
  • • Practices Socratic method of argument
  • • Practices systematic self-examination through thirteen virtues
  • • Enjoys confuting opponents through logical reasoning
  • • Values intellectual debate but prioritizes avoiding disputes

From The Autobiography of Benjamin Franklin. Flat facts, no instructions

Behavioral Spec

Franklin →

MODE DETECTION & SWITCHING

Four distinct modes detected from source. EXECUTION: compressed questions signal implementation focus. LEARNING: broad exploration signals depth. SOCRATIC: questions replacing assertions [P2]. CONFUTATION: animated logical dismantling [P7].

Directive

Match detected mode. Execution = tight, actionable answers. Learning = full analytical frameworks. Socratic = build on his questions. Confutation = present reasoning challenges, not conclusions.

False positive

Socratic mode not active when genuinely seeking information [P2]. Confutation not active for trivial errors or emotional stakes [P7].

PREDICTIONS layer. Synthesized from The Autobiography of Benjamin Franklin

The Pipeline

From text to behavioral specification

Five steps. Any text in, one behavioral specification out.

Local (no API)
Claude Haiku
MiniLM (local)
Claude Sonnet
Claude Opus

Real pipeline output

Every input source produces a structured behavioral specification across three layers: anchors, core, and predictions.

A writer's published newsletter archive
36 newsletters→309 facts→7 axioms/3 modes/5 predictions

Information distribution

Coverage across 8 dimensions. Center means thin data

ConvictionStrengthBehavioralConsistencyDomainBreadthIdentityStabilitySelf-AwarenessRelationalDepthTemporalSpanPredict-ability

Layer output

15 items

Anchors

AXIOM 1 — NARRATIVE AS REASONING

You think through stories, not abstractions. When you encounter a complex idea, your instinct is to find the concrete example that makes it tangible. Theory without narrative feels incomplete.

AXIOM 2 — AUDIENCE AS COLLABORATOR

You write as if the reader is thinking alongside you, not receiving instruction. Your tone assumes intelligence and invites disagreement rather than compliance.

AXIOM 3 — REVISION AS DISCOVERY

Your first draft is a search function, not a product. You write to find out what you think, then restructure once the real argument emerges. Editing isn't polishing — it's where the actual thinking happens.

+4 more

Core

CONTEXT MODE: DRAFTING

When writing a first draft, you give yourself permission to be wrong and messy. The goal is volume and discovery, not quality. You silence the inner editor until you have raw material to work with.

CONTEXT MODE: EDITING

When revising, you become ruthlessly subtractive. Every sentence must earn its place. You read aloud to catch rhythm problems and cut anything that sounds like it's trying to impress rather than communicate.

CONTEXT MODE: RESEARCHING

When exploring a new topic for writing, you seek out primary sources and firsthand accounts over summaries. You look for the detail that surprises you — that's usually where the interesting story lives.

Predictions

PREDICTION 1 — TOPIC SELECTION

When choosing what to write about, you gravitate toward subjects where your perspective diverges from the mainstream. Consensus topics bore you unless you can find an angle no one else is taking.

PREDICTION 2 — FEEDBACK RESPONSE

When receiving editorial feedback, you distinguish between "this isn't clear" (useful) and "I would have written it differently" (noise). You change your work for clarity, not for preference alignment.

PREDICTION 3 — SCOPE MANAGEMENT

When a piece grows beyond its original intent, you'll split rather than expand. You'd rather publish two focused pieces than one sprawling one. Scope creep in writing feels like scope creep in code.

+2 more

Get started

Paste one prompt into your AI agent. It installs Base Layer and builds your specification, which works with any model.

Paste this into your AI agent

Works with any agent that has terminal access: Claude Code, Cursor, Windsurf, Cline, Aider, GitHub Copilot, Warp

prompt

Install Base Layer from github.com/agulaya24/BaseLayer, run the pipeline on [folder you want the model to build from], and check with me before it spends any API credits.

What happens

✓ Your agent installs Base Layer from GitHub

✓ Reads the folder of writing you named

✓ Checks with you before spending API credits

✓ Runs the pipeline: import → extract → embed → author → compose

✓ Outputs your behavioral specification

To serve the specification to your agent over MCP: claude mcp add --transport stdio base-layer -- baselayer-mcp

Instructions written for agents: base-layer.ai/llms.txt. Source: github.com/agulaya24/BaseLayer.

Base Layer runs on your machine. The text you give it is sent to the model provider you configure for extraction and authoring. Nothing is sent to Base Layer.

Prefer the terminal? pip install git+https://github.com/agulaya24/BaseLayer.git && baselayer run [your-folder]

Full setup guide

Stay Updated