Back to Articles
Technical Guide March 9, 2026 4 min read

SPINE as the Structural Layer

By Fredrik Brattén

SPINE PostgreSQL pgvector Vector store Graph memory OODA-R 5PP KVStore
Cover image for: SPINE as the Structural Layer

Resources

Tech Stack

SPINEPostgreSQLpgvectorVector storeGraph memoryOODA-R5PPKVStore

Key Takeaways

  • SPINE provides a structural framework that allows AI agents to maintain persistent reasoning, memory, and execution protocols across different tasks and sessions.
  • The framework utilizes a standardized OODA-R reasoning cycle to guide agents through observation, orientation, decision-making, action, and reflection for verified outcomes.
  • Consistent agent behavior is achieved through a six-layer context stack that organizes information from global operator profiles down to specific task inputs.
  • SPINE implements a sophisticated seven-tier memory architecture to manage the lifecycle of information from volatile session states to persistent deep knowledge and relational graphs.
  • The Five-Point Protocol (5PP) is integrated directly into SPINE’s data structures to transform abstract alignment principles into durable and traceable execution workflows.

Who this is for

AI developers building persistent and structured autonomous agent architectures

The Need for Persistence

5PP solves the alignment problem for a single task. The agent pipeline (Part 4) extends this to delegation. But neither solves a deeper problem: how to make structure persist across tasks, sessions, and systems.

Without persistence, every new task starts from zero. The agent pipeline works - but it has to be rebuilt each time. The humility audit catches errors - but it does not remember what it caught before.

This is where SPINE comes in.


What SPINE Provides

SPINE is a framework for structuring how AI agents reason, remember, and execute. It provides:

  • Context organization - structured layers that define what an agent knows and when

  • Memory layering - a tiered architecture from working memory to long-term knowledge

  • Execution tracing - every action is recorded with cost, timing, and outcome data

  • Structured reasoning flow - a defined cycle of observation, orientation, decision, action, and reflection

These are not abstract concepts. They are implemented as concrete data structures and tools.

SPINE's OODA-R reasoning cycle

SPINE's OODA-R reasoning cycle


5PP Inside SPINE

The Five-Point Protocol maps directly onto SPINE's architecture:

5PP Stage SPINE Function What Happens
Clarification Context framing The context stack is assembled - what the agent knows, what it needs, what constraints apply
Scope Validation Boundary definition Explicit boundaries are set on what the agent can and cannot do
Reasoning Plan Structured thinking The OODA loop (Observe-Orient-Decide-Act) processes the plan before execution begins
Execution Action layer Actions are wrapped in ToolEnvelopes - traced, timed, and recorded
Verification Reflection and trace The Reflect phase audits the output against the original context and scope

5PP is not a separate system running alongside SPINE. It is a pattern that SPINE makes durable.


The Context Stack

SPINE organizes context into six structured layers:

Layer 6 - global: Operator profile, brand identity

Layer 5 - character: Speaker persona, target audience

Layer 4 - command: Task specification, success criteria

Layer 3 - constraints: Tone, format, do/don't rules

Layer 2 - context: Background information and references

Layer 1 - input: User request

Each layer is assembled reproducibly. The same stack produces the same reasoning conditions - which is how you get consistent behavior across agents and sessions.

Try it yourself: Context Stack Builder demo


Memory Architecture

SPINE's memory system has seven tiers, from volatile working state to persistent knowledge:

  • T1 KVStore - key-value working state (fast access, session-scoped)

  • T2 Scratchpad - session working notes (append-only, ordered)

  • T3 Vector store - semantic retrieval over stored content

  • T4 Ephemeral memory - decay-based session working store

  • T5 Episodic memory - past sessions and episodes (persists)

  • T6 Deep memory - persistent knowledge in PostgreSQL with pgvector

  • T7 Graph memory - relationship traversal across entities

Beyond the seven tiers, SPINE's memory design includes three functional layers: a write-path admission layer (Warrant scoring + VerdictRouter, deciding whether task results earn persistence), a read-path surfacing layer (the Reflective Memory Pattern, deciding when accumulated snapshots rise into cognitive events), and a maintenance cycle (DreamCycle, with six phases: decay, forgive, consolidate, neglect, review, prune). These are shipped as tested modules; activity depends on configuration and may be scheduled, event-triggered, or dormant depending on how SPINE is wired for a given workload.

The humility audit from 5PP Step 5 benefits directly from this: the Auditor agent can recall what was flagged in previous newsletters and check whether the same patterns are recurring.

Explore the architecture: Memory Explorer demo


What This Enables

With SPINE as the structural layer, systems can:

  • Remember - agents retain what they learned across sessions

  • Reproduce - the same context stack produces consistent results

  • Trace - every action has a recorded cost, duration, and outcome

  • Improve - memory feeds back into future reasoning

5PP provides the reasoning discipline. SPINE provides the infrastructure that makes it persist.


This article is Part 5 of the From Meta-Prompt to Asset Factory series on Adaptivearts.ai.

Previously: From Workflow to Agents - turning stable processes into delegatable roles. Next: Beyond Content: Research Loops, Autoresearch, and Embodied Agents - the same machinery applied to research and physical systems.

Share this article

Tags

#spine framework#ai agents#context organization#agent persistence#structured reasoning#memory architecture