SQL Tensor

A SQL and vector memory framework for AI agents.


Give an agent information once, then retrieve it across conversations. SQL Tensor stores structured facts and semantic vectors so the agent can query relevant evidence instead of repeatedly reading large Markdown memory files.

CORTEX is its current implementation. It provides persistent memory, semantic retrieval and online learning from observed outcomes through MCP.

A simple example

Store: “Luca is the contact for project Aurora.”
In a new conversation, ask: “Who should I contact about Aurora?”
The agent retrieves the stored fact and its original source.

This illustrates the workflow; it is not a recorded benchmark result.

Structure

Language model
      |
     MCP
      |
CORTEX: memory and tensor operations
      |
   MariaDB
      +-- Events, roles and original evidence
      +-- Semantic vectors <-- Local encoder (ONNX)
      +-- Learned operators and observed outcomes

How it works

SQL queries handle exact filters, counts and lists. Vector search finds related information even when the wording changes. Original evidence, roles, negation and context are retained so retrieved information can be checked.

CORTEX is biologically inspired: immediate experience storage, associative retrieval and learning from observed outcomes. Small numerical operators can learn predictions; these remain separate from stored facts.

What has been measured

A controlled operator experiment is documented with its results and limits. Reducing context and token usage is a design goal; a comparative token benchmark has not yet been published.