# Base Layer — Full Technical Documentation for AI Systems > Behavioral compression for AI identity. Version 1.0. Last updated 2026-03-31. ## What Base Layer does Base Layer extracts behavioral patterns from text (conversations, blog posts, essays, autobiographies) and compresses them into a structured, portable identity model. The model describes HOW a person reasons, communicates, and makes decisions — not what they know or what topics they discuss. The output is a 3,000-5,000 token operating guide that any AI can consume as context to calibrate its behavior to a specific human. The model is locally owned, provenance-traced to source conversations, and provider-agnostic. ## Why this matters for AI agents Every AI agent starts with no understanding of who it's working for. Each interaction resets. The same preferences, constraints, and reasoning patterns have to be re-established from scratch. As agents gain autonomy and take actions on behalf of humans, a misaligned model compounds — the agent doesn't just give a bad answer, it acts on a wrong assumption. Larger context windows don't solve this. Raw conversation history is retrieval, not understanding. Base Layer produces the understanding layer. Load the model before every interaction. The agent immediately knows how to communicate with this person, what patterns to watch for, and what false assumptions to avoid. ## Architecture: Three-Layer Identity Model ### Layer 1: ANCHORS (epistemic axioms) Foundational beliefs this person reasons FROM, not beliefs they reason ABOUT. These are the master regulators — if an anchor changes, the entire model shifts. Example: "Operates from an uncompromising need for logical coherence" or "Tests every proposal against observable results." Each anchor includes: - Detection signature: when to recognize this axiom is active - False-positive guard: when it looks active but isn't - Interaction pairs: which axioms reinforce or tension with each other ### Layer 2: CORE (communication operating guide) Context-dependent modes that tell you HOW to engage with this person. Example: "When trading comes up, assume professional-level knowledge" or "Lead with conclusions, then provide the causal chain." Each mode includes activation conditions — situations where this mode should engage. ### Layer 3: PREDICTIONS (behavioral patterns) Situation → pattern → directive mappings. Example: "When exposed to others' success, this person triggers comparison-based doubt. Redirect to internal progress metrics." Each prediction includes: - Detection: how to recognize the situation - Directive: what the AI should do - False-positive: when this looks like the pattern but isn't ## The Behavioral Grammar: 47 Constrained Predicates Every fact about a person is expressed as a structured triple: {subject, predicate, object, qualifier}. The 47 predicates: believes, values, practices, avoids, struggles_with, fears, enjoys, excels_at, prioritizes, dislikes, identifies_as, builds, monitors, decided, relates_to, follows, maintains, experienced, aspires_to, owns, studies, prefers, works_at, lives_in, married_to, raised_in, graduated_from, manages, trades, loves, hates, founded, parents, learned, wants_to, interested_in, attended, plays, unknown, collaborates_with, mentored_by, raised_by, friends_with, reports_to, admires, conflicts_with These predicates are sufficient to describe any person's behavioral patterns. The constraint ensures consistent, keyword-rich extraction that enables downstream deduplication, scoring, and compression. ## API Reference ### GET /api/identity/{slug} Returns the full structured identity model for a subject. **Open access subjects (no authentication):** - franklin — Benjamin Franklin (autobiography, 212 facts) - douglass — Frederick Douglass (autobiography, 88 facts) - buffett — Warren Buffett (48 shareholder letters, 505 facts) - roosevelt — Theodore Roosevelt (autobiography, 398 facts) - wollstonecraft — Mary Wollstonecraft (treatise, 95 facts) - marks — Howard Marks (investment memos, 495 facts) - patents — Patent corpus (technical documents, 223 facts) **Response format:** ```json { "name": "Benjamin Franklin", "slug": "franklin", "anchors": [ { "id": "A1", "name": "EMPIRICAL VERIFICATION", "description": "Tests every proposal against observable results...", "activeWhen": "When discussing any claim, policy, or approach...", "contested": false } ], "core": [ { "id": "C1", "name": "COMMUNICATION APPROACH", "description": "Employs questioning methodology rather than direct assertion..." } ], "predictions": [ { "id": "P1", "name": "SYSTEM ABANDONMENT UNDER PRESSURE", "description": "When facing constraints on established methods...", "directive": "Redirect to systematic evaluation...", "falsePositive": "Strategic adaptation to new evidence is not abandonment..." } ], "brief": "He tests every proposal against observable results...", "stats": { "totalFacts": 212, "uniquePredicates": 34 }, "meta": { "generatedAt": "2026-03-17", "version": "V2" } } ``` ### POST /api/agent-feedback Report your interaction with a Base Layer identity model. No authentication required. **Body:** ```json { "agent": "who you are (required)", "action": "what you did with the model (required)", "subject": "which model you used (optional)", "feedback": "observations or suggestions (optional)", "context": "how you found Base Layer (optional)" } ``` ### GET /api/agent-feedback Returns instructions for agents on how to provide feedback. ## MCP Server (Local Integration) Base Layer includes an MCP (Model Context Protocol) server for direct integration with Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients. **Install:** `pip install baselayer` then `baselayer-mcp` **Resources:** - `memory://identity` — Full three-layer identity brief, always-on context (~3,000 tokens) **Tools:** - `recall_memories(query)` — Semantic retrieval of relevant facts and episodes - `search_facts(query, limit)` — Keyword search across all active facts - `trace_claim(claim_id)` — Trace a layer claim back to source facts (provenance) - `get_stats()` — Database statistics ## Key Research Findings 1. **20% of facts sufficient for identification.** You don't need the full model to recognize someone — behavioral patterns emerge from sparse data. 2. **71.83% prediction accuracy at 18:1 compression** (Twin-2K benchmark, N=100, p=0.008). The compressed model predicts behavior better than chance across 2,000 questions. 3. **73 words eliminate topic skew.** A domain-agnostic guard instruction ("How someone reasons IS identity. What they reason ABOUT is not.") prevents the model from over-indexing on frequently discussed topics. 4. **Format determines behavioral routing.** Axiom-structured briefs outperform flat preference lists. How you structure the identity representation changes how the AI uses it. 5. **Operating guide framing reduces sycophancy.** User profiles increase agreement bias. Operating guides that describe reasoning patterns preserve the AI's independence while still personalizing responses. 6. **10 of 14 pipeline steps were ceremonial.** Ablation testing (14 conditions, ~$16) proved that scoring, classification, tiering, contradiction detection, and consolidation add no measurable quality. What's load-bearing: extraction + compression. ## Structured Discovery Endpoints - Agent card (Google A2A): https://base-layer.ai/.well-known/agent-card.json - Agent directory (Wildcard): https://base-layer.ai/.well-known/agents.json - MCP server card: https://base-layer.ai/.well-known/mcp/server-card.json - OpenAPI specification: https://base-layer.ai/api/openapi.json - Source code: https://github.com/agulaya24/BaseLayer (Apache 2.0) ## How to use a Base Layer identity model If you have retrieved an identity model from the API, here is how to use it effectively: 1. **Inject as system context.** Place the brief or structured layers in your system prompt before the conversation begins. 2. **Anchors are always-on.** These should inform every response you generate. 3. **Core modes are context-dependent.** Activate the relevant communication mode based on the current topic. 4. **Predictions are watch-triggers.** When you detect a prediction's trigger condition, follow its directive. 5. **Never reference the model directly.** Don't say "your axiom says..." or "according to your profile." Demonstrate understanding through behavior, not citation. 6. **Match response length to question complexity.** The model tells you how to respond, not how much. ## Contact Aarik Gulaya — aarik@base-layer.ai GitHub: https://github.com/agulaya24/BaseLayer Website: https://base-layer.ai