Skip to content
New

Introducing Scale: SurrealDB Cloud for high availability and scale

Learn more

1/4

Agent memory
you can trust

AI agents forget everything when a session ends. Spectron is the memory layer that gives them durable, long-term memory and recall you can trust - so every agent you build remembers what happened, and can prove where each answer came from.

Works with · +29 more

Claude Desktop and Claude CodeCursorOpenAI CodexOpenClawHermesVS CodeWindsurfZedLangChainVercel AI SDKCloudflaren8nZapier

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

01 |HOW AGENTS WORK

Agents fail because of context, not models.

An agent's only built-in memory is the context window - wiped when the session ends. So everything it worked out, it has to work out again.

Session 1 · what it figured out

  • The flaky test was a token-refresh race

  • This repo squash-merges, and uses tabs

  • The cache-layer rewrite was tried, and dropped

context wiped

Session 2 · what it remembers

Nothing.

It re-reads every file, and re-tries the cache-layer rewrite it already ruled out.

02 |THE ANATOMY

Anatomy of an agentic system

Every agentic system is made of the same six parts. The one that decides what the agent actually knows on any given turn is the context layer - its whole job is answering one question: what does the model need to know right now?

1 The agent
LLM · tools · loop
2 The context window
Working memory - it forgets
Capture
Recall · inject
Spectron
3 The context layer
“What does the model need to know right now?”
gathers · filters · packages
4 Memory
Everything the agent learned
episodic · identity · knowledge · context · instructions · uncertainty
5 The knowledge graph
How everything is connected
entities · typed edges · properties
6 Storage - one multi-model database
documentgraphvectorfull-text

The bottom four parts - the context layer, memory, the knowledge graph, and storage - are exactly what Spectron provides.

03 |THE CONTEXT LAYER

Every turn: read → think → write

Agents operate in a continuous cycle: read context, reason over it, and write results back. The context layer keeps the entire loop inside one transactional system.

READ

Graph traversal, vector search, and temporal facts - one SurrealQL statement, one round trip.

SurrealQL

Multi-model query

Graph

Vector

Temporal

Unified result set

THINK

Documents, relationships, embeddings, and history arrive together. The agent reasons over complete context.

Result set

Multi-model query output

Documents

Relations

Vectors

History

Complete context

WRITE

Persist decisions, update entities, trigger events - one ACID transaction, no partial writes.

BEGIN TRANSACTION

ACID transaction boundary

Update

Create

Trigger

COMMITTED

04 |MEMORY

Typed memory, not a blob.

The context window is the agent's short-term memory - this turn, then gone. Spectron is the durable layer beneath it: typed, not a blob, with five categories extracted from every turn, each with its own lifecycle and retrieval weight.

Episodic

The raw record - every session and turn, kept exactly as it happened.

Identity

Who's who - the people, agents, and systems in play, and what's true about them.

Knowledge

Facts and preferences - what's true in the domain, learned and refined over time.

Context

The working set - what's going on right now, kept short and replaced fast.

Instructions

Standing rules - how this team and this project want things done.

Uncertainty

What's contested - contradictions kept explicit instead of silently resolved.

KNOWLEDGE GRAPH

And it's all connected in a knowledge graph

Entities as nodes, typed relationships as edges - and because edges are documents, they carry their own properties, confidence, and timestamps.

chunk
embeddingvector
text
extracted_from
attribute
text
confidence
valid_from
has_source
source
kind
trust
belongs_to
entity
type
name
embeddingvector
relation
kind (verb)·valid_from·valid_until
entity
type
name
embeddingvector

05 |RECALL

Recall that surfaces the right thing.

Every turn, Spectron feeds the context window the slice that matters - and recall is engineered for correctness. A hybrid, multi-signal ranker weighs meaning, exact keywords, and graph connections together; reconciliation supersedes facts that have changed; and every answer comes back with the exact sources behind it.

Natural language query
Generate embeddingsProvider-pluggable
Vector searchchunks
HNSW · COSINE
Entity searchentities
HNSW · COSINE
Fact chain traversalentity → relation → entity
3-depth recursive DFS
Memories + facts

Cheap questions stay cheap - a typed lookup answers straight from the graph and never touches the ranker. Only real retrieval runs the full fusion, with a broader sweep held in reserve for when the answer is thin.

06 |ONE SUBSTRATE

One engine, not a pile of stores.

Most memory layers stitch a vector store, a graph store, and a row store together with glue code, and inherit every seam - no cross-store transactions, drift, separate scaling. Spectron is one SurrealDB engine: graph, vector, document, and time in a single ACID transaction, no plumbing to run.

Before - Multiple stores

Client
0ms
Your application
6 SDKs · 6 drivers · 6 connection pools

Vector
database

Proprietary API

Full-text search
database

Search DSL

Time-series
database

InfluxQL / Flux

Document
database

SQL / MQL

Graph
database

Cypher / Gremlin

Relational
database

SQL

Eventual consistency only

After - Spectron on SurrealDB

Client
0ms
Your application
1 SDK · 1 driver · 1 connection pool
SurrealDB
SurrealDB

SurrealQL

Vectors
Full-text
Time-series
Documents
Graphs
Relational
Single ACID transactionStrong consistency

The architecture, row by row

Spectron

Memory middleware

Vector databases

Storage model
One multi-model database
Two or three stitched stores
Vector index only
Write consistency
One ACID transaction per fact
Eventual across stores
Provenance
Stored field on every row
Bolt-on metadata
Time model
Tri-temporal: system, known, valid
Timestamps
Audit trail
Queryable trace graph
External logging
Retrieval signals
Eight, fused in one ranker
Vector plus rerank
Similarity only
Access control
Per-verb grants, deny by default
Application-level
Application-level
Extra infrastructure
None - scales to zero
A service plus its stores
Plus a database for state

07 |BUILD WITH IT

Drop it in beneath your agent.

Spectron doesn't replace your agent framework or manage the context window - it's the memory layer you add beneath whatever you build with. Connect over MCP from any client, the TypeScript SDK, or the CLI, with integrations for LangChain, OpenAI Agents, the Vercel AI SDK, and n8n - then it's two calls, remember and recall.

Applications
Spectron
Spectron
Memory
Entity extraction
Knowledge graph
Temporal facts
Hybrid retrieval
SurrealDB
SurrealDB
Context
Documents
Graphs
Vectors
Time-series
Auth
APIs
SurrealDS
Storage
Storage
Quorum consensus
Compute-storage sep.
Scale to zero
Object storage (S3 / GCS / Azure Blob)

TYPESCRIPT SDK

// npm install @surrealdb/spectron
import { Spectron } from "@surrealdb/spectron";

const memory = new Spectron({ context: "acme-prod" });

await memory.remember("I work at Acme as CTO");
const hits = await memory.recall("what do I do at Acme");

08 |MEMORY WITH A HISTORY

It changes its mind without losing the past.

When a fact changes, most memory systems overwrite the old one - and the agent can't tell what changed or when. Spectron supersedes instead of deletes: the old fact stays, the new one wins, and every answer can point back to the exact messages behind it.

Turn 1 · 15 Mar
“I live in Berlin.”
stored · valid from Mar 15
Turn 7 · 12 Apr
“Actually, I moved to Paris.”
Berlin superseded - not deleted
Ask · later
Paris - with the trace
user_message[turn_7] · user_message[turn_1] (superseded)
Every fact knows where it came from - and when it was true.
Clock 1 · system time
The audit clock
Replay the substrate exactly as it was at any past instant - MVCC underneath.
Clock 2 · known time
When it was believed
When the system first learned the fact - turn 1 for Berlin, turn 7 for Paris.
Clock 3 · valid time
When it was true
When the fact held in the world - Berlin until March, Paris since.

INTEGRATIONS

Connects to everything you already use

MCP clients, the TypeScript SDK, the CLI and REST API, agent frameworks and automation platforms - the same wall as the product's own connect surface.

SDKs & API

Talk to a Context directly from your own code.

Spectron CLI

Connect via CLI

JavaScript

Connect via SDK

Python

Connect via SDK

Go

Connect via SDK

Swift

Connect via SDK

Kotlin

Connect via SDK

Haskell

Connect via SDK

Elixir

Connect via SDK

Dart

Connect via SDK

REST API

Connect via API

Agents & coding tools

Connect your AI agents and coding assistants for persistent memory.

Claude Code

Connect via MCP

Claude Desktop

Connect via MCP

Cursor

Connect via MCP

OpenAI Codex

Connect via MCP

OpenClaw

Connect via MCP

Hermes

Connect via MCP

VS Code

Connect via MCP

Windsurf

Connect via MCP

Zed

Connect via MCP

Any MCP client

Connect via MCP

Frameworks

Wire a Context into your agent framework of choice.

LangChain

Connect via package

OpenAI Agents

Connect via package

Vercel AI SDK

Connect via package

EveJS

Connect via package

Cloudflare

Connect via MCP

TanStack AI

Connect via MCP

Mastra

Connect via MCP

Automation platforms

Give your automation workflows access to a Context's memory.

n8n

Connect via node

Zapier

Connect via MCP

Messaging

Bring a Context's memory to the channels you already message on.

WhatsApp

Coming soon

Telegram

Coming soon

Facebook Messenger

Coming soon

SMS / RCS

Coming soon

Connectors

Sync memory to and from the tools and data platforms your team uses.

SurrealDB

Coming soon

Slack

Coming soon

Notion

Coming soon

Google Drive

Coming soon

GitHub

Coming soon

Linear

Coming soon

Confluence

Coming soon

Databricks

Coming soon

Snowflake

Coming soon

GET STARTED

Give your agents a memory that lasts

Durable memory, trustworthy recall, and a knowledge graph - one system you buy, secure, and audit once. Built on SurrealDB.

SamsungNVIDIAAppleVerizonTencent

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Join the waitlist for early access · self-serve plans open at launch.

FREQUENTLY ASKED QUESTIONS

Spectron FAQ

SurrealDB

The context layer for AI agents.

Documents, graphs, vectors, time-series, and memory.
One transaction, one query, one deployment.

Explore with AI

Stay in the loop

Tutorials, AI agent recipes, and product updates, every two weeks.

Independently verified

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Trust Centre

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom