·7 min

Getting Started with Sovereign AI

Your on-ramp to sovereign AI. Learn what sovereign AI is, how recipe compilation works, how signal routing and autonomous evaluation function, and how to get started with the Sovereign Intelligence Stack.

DK

Daniel Kliewer

Author, Sovereign AI

sovereign-aigetting-startedlocal-firstrecipe-compilationsignal-routingautonomous-evaluationbeginner-guide
Sovereign AI book cover

From the Book

This is from Sovereign AI: An Architectural Investigation into Local-First Intelligence.

Get the Book — $88
Getting Started with Sovereign AI

Getting Started with Sovereign AI

Intelligence is not the model. Intelligence is the accumulated decisions that shaped the model.

By Daniel Kliewer
Published: July 5, 2026
Reading Time: 15 minutes
Prerequisites: None (beginner to advanced)
Related Posts: Sovereign AI Architecture, The Sovereign Intelligence Stack, The Model Is Not the Product


Executive Summary

This post is your on-ramp to sovereign AI. It defines key terms, shows a simple example of recipe compilation, and points you to more advanced resources.

What you'll learn:

  • What sovereign AI is (and isn't)
  • What recipe compilation means
  • What signal routing means
  • What autonomous evaluation means
  • How to get started with the Sovereign Intelligence Stack
  • Where to find more advanced resources

What is Sovereign AI?

Sovereign AI is the idea that intelligence is not the model. Intelligence is the accumulated decisions that shaped the model.

This means:

  • The model is just a snapshot of past decisions
  • The loop is what keeps accumulating
  • Systems that don't capture decisions are building castles on sand
  • Compounding intelligence requires capture, evaluation, and storage

What Sovereign AI Is NOT

  • Not just local LLMs — Local LLMs are a component, not the whole system
  • Not just agent frameworks — Agent frameworks are tools, not architecture
  • Not just RAG — RAG is retrieval, not intelligence
  • Not just prompts — Prompts are inputs, not decisions

What Sovereign AI IS

  • A compounding system — Gets smarter over time
  • A recipe-based system — Captures decisions as immutable records
  • A sovereign system — No cloud APIs required, data stays local
  • An observable system — Every decision produces a timeline event

Key Concepts

Recipe Compilation

Definition: Capturing AI decisions as immutable records.

Why it matters: Without recipes, you have no history. You have no way to know why a model made a decision, what memory it used, what the outcome was.

What a recipe captures:

  • Objective — What was the task?
  • Model — Which model was used?
  • Memory — What memory was injected?
  • Prompt — What was the prompt (with versioning)?
  • Reasoning Patterns — What reasoning patterns were used?
  • Evaluation — How was it evaluated?
  • Result — What was the result?
  • Timestamp — When was it captured?

Example:

python
1@dataclass
2class Recipe:
3 objective: str
4 model: str
5 memory_snapshot: Optional[str] = None
6 prompt: Optional[str] = None
7 reasoning_patterns: List[str] = field(default_factory=list)
8 evaluation_score: Optional[float] = None
9 outcome: str = "unknown"
10 timestamp: datetime = field(default_factory=datetime.now)
11 tags: List[str] = field(default_factory=list)

Signal Routing

Definition: Classifying incoming tasks and routing them through optimal evaluation paths.

Why it matters: Not all tasks are created equal. Simple tasks should be routed to fast, lightweight models. Complex tasks should be routed to capable models with full context.

Signal Types:

  • Cheap — Simple tasks routed to fast, lightweight models
  • Expert — Complex tasks routed to capable models with full context
  • Hybrid — Tasks that benefit from multi-stage evaluation

Autonomous Evaluation

Definition: Self-improving loops that generate tests, evaluate performance, and detect drift.

Why it matters: Without evaluation, you have no way to know if your system is improving or degrading. Drift detection catches performance regressions before they compound.

Components:

  • Signal Registry — Define what to evaluate
  • Test Generator — Generate synthetic test cases
  • Drift Detector — Detect performance drift (KS and PSI statistics)
  • Loop Controller — Autonomous evaluation scheduling

How to Get Started

Step 1: Install the Sovereign Intelligence Stack

bash
1# Clone the repository
2git clone https://github.com/kliewerdaniel/sovereign-intelligence-stack.git
3cd sovereign-intelligence-stack
4
5# Create virtual environment
6python -m venv .venv
7source .venv/bin/activate
8
9# Install dependencies
10pip install -e .

Step 2: Capture Your First Recipe

python
1from src.recipe_compiler.models import Recipe
2from src.recipe_compiler.storage import RecipeStorage
3
4storage = RecipeStorage("my_stack.db")
5
6recipe = Recipe(
7 objective="Generate error handler for API calls",
8 model="gpt-4",
9 outcome="accepted",
10 evaluation_score=0.92,
11 tags=["error_handling", "api", "reliability"]
12)
13
14storage.create_recipe(recipe)
15print(f"Recipe captured: {recipe.id}")

Step 3: Run the Full Pipeline

python
1from src.integration.pipe import SovereignPipeline, PipelineConfig
2
3config = PipelineConfig(db_path="intelligence.db")
4pipeline = SovereignPipeline(config)
5pipeline.initialize()
6
7# Capture a recipe
8recipe = Recipe(
9 objective="Optimize database query",
10 model="claude-2",
11 outcome="accepted",
12 evaluation_score=0.87,
13 tags=["optimization", "database"]
14)
15result = pipeline.capture_recipe(recipe)
16
17# Get intelligence summary
18summary = pipeline.get_intelligence_summary()
19print(summary)

Step 4: Run Autonomous Evaluation

python
1from src.evaluation.loop import EvaluationLoop, LoopConfig
2
3config = LoopConfig(
4 signal_names=["code_correctness", "performance", "reliability"],
5 test_count=50,
6 interval_seconds=60
7)
8loop = EvaluationLoop(recipe_storage, config)
9loop.start()

Step 5: Explore the Intelligence Observatory

python
1from src.observatory.timeline import IntelligenceTimeline
2
3timeline = IntelligenceTimeline(recipe_storage)
4timeline.record_event(IntelligenceEvent(
5 type="recipe_captured",
6 recipe_id=recipe.id,
7 timestamp=datetime.now()
8))
9
10# Get timeline
11events = timeline.get_timeline(days=30)
12for event in events:
13 print(f"{event.timestamp}: {event.type} - {event.recipe_id}")

What's Next?

For Beginners

  1. Read the Sovereign AI Architecture post — Comprehensive synthesis of the entire system
  2. Read the Sovereign Intelligence Stack post — Deep dive into the 5-layer architecture
  3. Read the Model Is Not the Product post — Research validation and convergence

For Intermediate Readers

  1. Read the Sovereign Memory Bank post — 7-layer memory system
  2. Read the Dynamic Persona MoE RAG post — Persona-driven retrieval
  3. Read the SovereignSpec post — Spec-driven development

For Advanced Readers

  1. Read the Loop Is the Product post — Intelligence Observatory deep dive
  2. Read the Autonomous Sovereign AI post — Autoresearch loops and expert fine-tuning
  3. Contribute to the sovereign-intelligence-stack repository

FAQ

Is this just local LLMs?

No. Local LLMs are a component. Sovereign AI is the entire architecture: capture, route, evaluate, store, observe.

Do I need to use Ollama?

No. The stack works with any model provider (OpenAI, Anthropic, local LLMs, etc.). Ollama is just one option.

Is this production-ready?

Yes. The stack has 70 Python files, 7,757 lines of code, and 26 modules verified. It's used in production for autonomous research and expert fine-tuning.

Can I use this for my own projects?

Yes. The stack is open-source (MIT license). You can use it for any project, commercial or non-commercial.

What's the difference between this and CrewAI?

CrewAI is a multi-agent framework. The Sovereign Intelligence Stack is a compounding intelligence system that captures decisions, routes tasks, evaluates autonomously, stores knowledge, and observes patterns. It's the operating system that makes all of these pieces work together.


References

Related Posts

Related Repositories

Research Papers

Related Repositories


Published July 5, 2026 by Daniel Kliewer
License: MIT

Sovereign AI: An Architectural Investigation into Local-First Intelligence by Daniel Kliewer

Sovereign AI: An Architectural Investigation into Local-First Intelligence

by Daniel Kliewer · Paperback · 72 pages

An examination of the architecture of intelligence that you own — from first principles through production deployment.