graphsub.com / wiki / agent-memory-graph

Agent Memory Graph

An agent memory graph organizes working, episodic, and semantic memory so autonomous systems can recall, update, and audit context over time.

Definition

An agent memory graph connects short-lived working memory, episodic task history, semantic facts, tool outputs, and user corrections into one queryable structure.

Core model

GraphSub models memory as typed nodes and edges with importance, source, timestamp, scope, and replay metadata. That makes memory inspectable rather than hidden inside a prompt window.

Use cases

Agent memory graphs are useful for customer support agents, research assistants, compliance workflows, code agents, operations copilots, and any system that must remember why it acted.

Code example

Agent memory and replaypython
from graphsub import Client

client = Client(base_url="https://graphsub.com")

memory = client.memory.remember(
    tier="working",
    content="limit breach on EUR rates book",
    source="risk-run-2026-07-03",
    importance=0.92,
)

trace = client.capsules.execute(
    capsule="trading-control-graph",
    workload="risk-recompute",
    evidence="source-linked",
)

print(trace.replay_id, trace.affected_outputs)

Write agent memory, launch a capsule, and inspect affected outputs.

FAQ

Why use a graph for agent memory?
Graphs preserve relationships between tasks, tools, people, documents, decisions, and outputs.
Can memory be audited?
Yes. GraphSub memory can be traced through sources, tool calls, approvals, and replay events.