Arc Labs
BrainDocsPricing
GitHubSign inGet Started
Use casesKnowledge Work

Memory for Research Agents

Arc Labs·May 2, 2026·9 min read
TL;DR

Research is cumulative by nature. A research agent without memory restarts the investigation each session, losing hypothesis trails, source provenance, and the contradictions that drive new questions. With memory, the agent's knowledge compounds.

The problem

Research is path-dependent. The hypothesis you investigated on Tuesday shapes the sources you read Wednesday and the contradictions you noticed Thursday. A research agent without memory cannot follow that path — it loses the thread between sessions and re-investigates the same things from scratch.

The harder failure: contradictions go unsurfaced. Source A claimed X. Source B claimed not-X. Without persistent memory linking the two, the agent presents whichever was most recent without flagging the conflict.

What agent memory gives you

Research agents need three memory categories beyond the typical user-personalization stack:

  • Source provenance — every claim memory carries its source (URL, document ID, page). This is the ground truth for citation and re-verification.
  • Hypothesis tracking — open questions, partial answers, dead ends. Stored as events with status (active, resolved, abandoned). Searchable temporally — "what hypotheses are still open after 30 days?"
  • Claim relations — typed edges between memories: supports, contradicts, extends. The graph of these relations is the substrate for contradiction surfacing.

With provenance + relations, the agent can answer "what's the strongest evidence for X?" or "what contradicts what we currently believe?" — questions that flat-text memory cannot.

Source provenance as a first-class constraint

For research agents, every memory that reaches the store must carry source provenance. This is non-negotiable — a research claim without a citable source is worse than no claim, because it sounds authoritative without being verifiable.

Brain does not enforce this for you, and it has no field to enforce it with. encode takes { text, session?, occurredAtUnixNanos? } — there is no source, no document, no page and no span. A write is never rejected for lacking provenance, because provenance is not a parameter. So for research workloads the constraint has to live in your pipeline, before the call:

// Reject in YOUR extractor, not Brain's. Brain stores what you hand it.
if (!candidate.citation) throw new Error("claim without a citable source");

const claim = await brain.encode({
  // The citation is part of the memory text. This is the point: the lexical
  // retriever indexes it, so "Smith 2024" and the DOI are both searchable,
  // and a recall hit carries its own source in the text it returns.
  text:
    `Intervention group showed 23% reduction in latency (p < 0.001, n=150). ` +
    `Source: ${paperTitle}, p.42, ${doi}, read ${accessedAt}.`,
  session: projectId,
  // When the finding was published, as distinct from when you read it.
  occurredAtUnixNanos: publishedAtUnixNanos,
});

occurredAtUnixNanos is the one provenance-shaped field that is real, and it is about time, not about source: it separates when the thing was true from when Brain recorded it. Omit it and a year of back-filled literature all appears to have been published the day you imported it.

What Brain gives you afterwards is a write-time record of its own processing, not of yours. memoryInspect(memoryId) returns the artifact — the embedding, the extracted record, the HyPE questions, the keyword fields and the extractor's knowledge graph — plus every edge anchored at that memory. Statement-level provenance is on the statement: extractorId (which extractor produced it, 0 for a direct write), extractedAtUnixNanos (when, as distinct from when the content happened) and schemaVersion (which schema the predicate was written against). So "which model version extracted this?" is answerable; "what character span did it come from?" is not, unless you put the span in the text.

Span offsets still matter for the reason they always did — papers get updated, URLs move, PDFs get re-typeset — so if re-verification against original text is a hard requirement, carry the offsets and a content hash in the memory text yourself, or keep them in your own document store keyed by memoryId.

Source entities in the graph are first-class nodes: paper nodes carry author relations, publication year, DOI, venue. A "Smith (2024)" query resolves to the source entity node, and from there the graph surfaces all claims derived from that source. This is the research-specific complement to personal assistant entity resolution — instead of resolving people, you are resolving sources.

The claim relation graph

Research memory is a knowledge graph where nodes are claims and edges are semantic relations: supports, contradicts, extends, supersedes, replicates.

This is the structure that makes research retrieval qualitatively different from personal assistant retrieval. A flat list of facts cannot answer "what's the current state of the evidence on X?" — but a graph of claims with typed relations can. The relation type carries meaning that bare similarity scores cannot. Two claims that score 0.92 cosine similarity might support each other, or they might make contradictory assertions about the same measurement. Similarity alone cannot distinguish the two cases.

// Two calls, not one: encode the claim, then assert the edge. There is no
// `relations` array on a write — an edge is its own operation, which is also
// what lets you add one later when the contradiction is noticed afterwards.
const counter = await brain.encode({
  text:
    "Contrary to Smith (2024), no significant latency reduction found " +
    "(n=80, p=0.34). Source: Okafor 2025, p.18, doi:10.1234/efgh.",
  session: projectId,
  occurredAtUnixNanos: publishedAtUnixNanos,
});

await brain.link({
  source: counter.memoryId,
  target: smith2024ClaimId,
  kind: "contradicts",
  // The only edge metadata there is. There is no `note` and no `confidence`
  // on an edge — if the reason matters, it belongs in a memory of its own,
  // linked with `references`.
  weight: 0.85,
});

The edge vocabulary is fixed and it is the research vocabulary already: contradicts, supports, references, derived_from, caused, followed_by, similar_to, part_of. extends, supersedes and replicates are not in it — map extends onto supports or derived_from, and note that supersession is not an edge at all. It happens on the typed graph, where supersedeStatement builds a revision chain you read back with statementHistory. That distinction is load-bearing for research: an edge records that two claims disagree and leaves both standing, which is what you want, while a supersede asserts that one replaced the other.

Reading the graph back:

// Edges at one claim, both directions.
const { edges } = await brain.memoryInspect(claimId);
const disputed = edges.filter((e) => e.kind === "contradicts");

// Or the whole claim graph, paged.
const page = await brain.graphFetch({
  includeMemories: true,
  includeMemoryEdges: true,   // requires includeMemories, else 400
  includeStatements: true,
  limit: 200,
});

There is no status: "unresolved" filter and no resolution state on an edge — Brain stores that two claims contradict each other, not whether anyone has adjudicated it. Tracking which conflicts a human has reviewed is application state; keep it in your own store keyed by the pair of memory ids.

Hypothesis tracking as a state machine

Research hypotheses live through a state machine: open → active_investigation → supported → contradicted → abandoned → resolved.

Do not implement this with tags. There are no tags on a memory, there is no updateMemory, and a memory's text is immutable once written — Brain stores what you handed it. The real mechanism is better than tags anyway: put the hypothesis on the typed graph as a statement and move it through its states by superseding it. Each transition becomes a revision in a chain you can read back, so the history of what you believed and when is preserved rather than overwritten.

// The hypothesis as a claim on the typed graph. `evidence` is the real link
// back to the memories it rests on — the field the write path does have.
const { statementId } = await brain.createStatement({
  kind: "directive",   // fact | preference | event | attribute | relation | directive
  subject: hypothesisEntityId,
  predicate: "investigation_status",
  object: { value: "open" },
  confidence: 0.5,
  evidence: [seedClaim.memoryId],
  sessionId: projectId,
});

// A transition is a supersede, not an edit. The old revision stays readable.
const { statementId: nowSupported } = await brain.supersedeStatement(statementId, {
  kind: "directive",
  subject: hypothesisEntityId,
  predicate: "investigation_status",
  object: { value: "supported" },
  confidence: 0.9,
  // Three independent replications — each one a memory, cited here.
  evidence: [replication1.memoryId, replication2.memoryId, replication3.memoryId],
  sessionId: projectId,
});

Reading the lifecycle back is one call, and this is what the tag design could never have given you:

const history = await brain.statementHistory(statementId, { includeTombstoned: true });

// history.totalVersions — how many states it passed through
// history.chainRoot     — the hypothesis's stable identity across every revision
// history.items[]       — each revision, with version, supersedes, supersededBy,
//                         confidence, extractedAtUnixNanos and its own evidence
for (const rev of history.items) {
  console.log(rev.version, rev.object, rev.confidence, rev.extractedAtUnixNanos);
}

statementId changes on every supersede; chainRoot does not, which is why it is the key to group revisions by. A statement read defaults to following supersession, so asking for an old id hands you the current head unless you say otherwise — worth knowing before you store a statement id anywhere durable.

abandoned is the one state that is not a supersede: tombstoneStatement retires a claim so reads stop returning it while the row stays, and retractStatement is the stronger form for a claim that should never have been asserted. Neither erases the chain, so an abandoned hypothesis remains auditable.

Querying open hypotheses at session start:

// Hypotheses live on the typed graph, so this is a listing, not a cue — an
// exact filter over the predicate rather than a similarity search that might
// miss one.
const { statements } = await brain.listStatements({
  predicate: "investigation_status",
  onlyCurrent: true,   // just the head of each chain
  limit: 100,
});

const open = statements.filter((st) => st.object.value === "open");

At session start, the agent surfaces open hypotheses — the researcher immediately sees what threads are live and can pick up where they left off. This is the core continuity benefit that distinguishes a memory-equipped research agent from a stateless one. Without hypothesis tracking, every session starts with "where were we?" — with it, the agent leads with the current state of investigation.

Status transitions require evidence. Moving from open to supported requires at least one supports relation edge from a claim to the hypothesis node. Moving from open to contradicted requires at least one contradicts edge. The abandoned status is manually set — the researcher decides a line of inquiry is no longer worth pursuing. Abandoned hypotheses are retained (not deleted) because they document negative space: "we looked at this and decided not to pursue it for the following reason."

Hypothesis nodes can also carry relations to other hypotheses. A sub-hypothesis is a refinement: if the parent hypothesis is "intervention effect is moderated by baseline severity", a sub-hypothesis might be "the moderation is stronger in adults over 40". There is no parent_of / child_of in the edge vocabulary — the eight kinds are fixed — so model decomposition with part_of from the sub-hypothesis to its parent, which is the one that carries that meaning. Walking part_of edges off the parent surfaces the sub-hypotheses, and each one's status is the head of its own supersession chain.

Write pipeline behavior for research agents

Research agents need different write-pipeline tuning than other domains.

pre_filter: The relevance threshold should be lower than the default (0.35 vs 0.40). Research conversations contain dense technical content — the filter should be permissive because missing a real finding is worse than storing a few extra methodological notes. The cost of a false negative (missing a claim) is higher than a false positive (storing an unimportant procedural detail). Pre-filter should pass anything that mentions: a quantitative result, a named entity (author, paper, institution), a methodological term, or a hypothesis-relevant keyword. Filter out: researcher's meta-commentary on the interface, acknowledgments, formatting instructions.

extract: Should create claims at atomic granularity. "Smith et al. (2024) found that X reduces Y by 23% in cohort Z" is one claim. The summary "the intervention worked" is not a claim — it is a lossy compression that breaks citation. Extract atomically; reconstruct summaries on demand. The graph holds the truth; rendering is done at query time by composing retrieved claims into a summary, not by storing the summary.

Each extracted claim should be assigned a claim type: quantitative (carries a numeric result), qualitative (descriptive finding), methodological (a finding about research design), or null-result (a non-finding). Claim type affects how the claim is weighted in retrieval: quantitative claims with effect sizes rank higher for "strongest evidence" queries; null-results rank higher for "what failed to replicate" queries.

conflict: Research agent conflict detection must not auto-supersede. When a new claim contradicts an existing one, the default behavior (auto-superseding the older fact) is wrong for research — the older fact might be the better one, or both might be correct under different conditions. Configure conflict handling to flag and hold for researcher review:

// In pipeline configuration
const pipelineConfig = {
  conflict: {
    strategy: "flag_for_review",  // not "auto_supersede"
    reviewer: "researcher",
    notification: true,  // surface the conflict at next session start
  },
};

dedupe: Semantic deduplication threshold should be higher than default (0.92 vs 0.85). Research claims that look similar might make subtly different quantitative assertions — dedupe should be conservative. "23% reduction in latency" and "24% reduction in latency" will score above 0.85 similarity but represent different findings and should be stored separately. Only deduplicate when the claims are genuinely identical: same assertion, same source, same quantitative result.

infer: Research agents should run minimal inference. The infer stage for personal assistants extracts implicit preferences from behavior; for research agents, inference risks inventing claims. Limit the infer stage to: tagging claims with their research domain (based on terminology), identifying relation candidates for researcher confirmation, and flagging hypothesis-claim connections (this claim might support hypothesis H). Do not infer new claims; only infer metadata and relations.

Retriever strategy for research

For a "what do we know about X?" query in a research project, the retrieval stack weights differently than for personal assistant queries:

  • Semantic retriever (weight 0.40): finds conceptually similar claims even if they use different terminology — critical for surfacing evidence that uses synonyms or domain-specific vocabulary
  • BM25/lexical (weight 0.35): exact-match is critical for author names, paper titles, technical terms, p-values, and effect sizes — "Smith 2024" and "0.001" must match exactly
  • Entity-graph (weight 0.20): traverses the claim-relation graph to surface supporting and contradicting evidence from the structural relationships, not just similarity
  • Temporal (weight 0.05): "what have we found in the last 30 days?" — less critical for research than recency-sensitive domains like news analysis

The entity-graph retriever is different in research: entities are claims, authors, and papers — not people and organizations. A query for "Smith 2024" should graph-walk from that source entity to all claims derived from it, then optionally to all claims that contradict those claims. This is claim-centered graph traversal rather than person-centered.

BM25 weight is intentionally high (0.35) for research — higher than the typical 0.20 for general-purpose agents. Research retrieval must be precise on technical terminology. A semantic-only retriever might surface "latency improvement" when the query is specifically about "response time reduction" — similar concepts, but a different measurement. BM25 anchors precision; semantic retrieval supplies recall.

For contradiction surfacing specifically ("what contradicts what we believe about X?"), the retrieval strategy inverts: the entity-graph retriever dominates (weight 0.60) because it can directly traverse contradicts edges from known claims about X. Semantic and lexical retrieval serve as fallbacks for claims that haven't been explicitly connected via graph edges yet.

Measuring research memory quality

Three metrics determine whether the research memory store is functioning correctly.

Claim precision: of memories tagged as claims, what fraction have a citable source reference? Should be 100%. Any claim memory without provenance is a data quality failure — it should never have passed the extract stage. If claim precision drops below 100%, investigate whether the source struct is being correctly populated at write time. A common failure: the source document is set at the session level but not propagated to individual candidates during extraction.

Contradiction resolution rate: what fraction of flagged contradictions have been resolved by the researcher? If this is below 50% after 30 days, the contradiction-surfacing mechanism is not actionable. Possible causes: the contradictions are being flagged but not surfaced to the researcher at session start; the contradictions are too numerous to review (extract is over-generating contradicts relations); or the researcher does not have a clear workflow for resolving them. Check whether the researcher is seeing the flags, then check whether the flags are accurate.

Graph density: average number of relations per claim node. Fewer than 0.5 relations per claim means the graph is sparse — claims are not being connected to each other. Either the extraction stage is not creating relations, the deduplication threshold is too aggressive (merging claims that should have been separate nodes with edges between them), or the researcher is not resolving contradictions into resolved edges. Target greater than 1.5 relations per claim for a mature research project (typically 3+ months of active use).

A secondary metric worth tracking: source entity coverage — what fraction of cited papers have a corresponding source entity node in the graph with at least 2 claims attached? Low source entity coverage means claims are being stored without proper graph integration, and "find all claims from Smith 2024" queries will fail or return incomplete results. Source entity coverage should track toward 100% for all papers the agent has actively processed.

Example flow

  1. 1
    Researcher asks about a topic
    Agent retrieves prior research memories, hypotheses, and source provenance for this topic.
  2. 2
    Agent presents what's known
    'You have 3 supporting sources for X (Smith 2024, Lee 2025, ...) and 1 contradicting (Kim 2025). Two hypotheses are still open: A and B.'
  3. 3
    Researcher asks for a new investigation
    Agent runs the search/tool. New findings extracted as candidate memories with source IDs.
  4. 4
    Conflict detection on new claim
    Pipeline checks if the new claim contradicts existing memories. If yes, doesn't auto-supersede — flags for researcher review.
  5. 5
    Researcher resolves the conflict
    Either accepts the new claim (older becomes superseded with explanation) or marks both as 'open question' with relation links.
  6. 6
    Memory graph updates
    New supports/contradicts edges added. The graph becomes more useful with each session.

Patterns that work

  • + Source-aware extraction
    Every extracted claim must carry source provenance. No source = no memory. This is non-negotiable for research workloads.
  • + Typed claim relations
    Build a knowledge graph where edges are typed (supports, contradicts, extends). Queries can ask graph questions, not just similarity questions.
  • + Hypothesis as a superseded statement
    Memory kinds are fixed (Episodic, Semantic, Consolidated) — you cannot add one. Put the hypothesis on the typed graph and move it open → supported → contradicted → resolved by superseding it, so statementHistory holds the lifecycle.
  • + Manual conflict resolution
    Don't auto-supersede in research. Flag conflicts and let the human decide. Auto-resolution is the quickest path to a wrong knowledge graph.

Pitfalls to avoid

  • − Claims without provenance
    A research memory without a citable source is worse than no memory — it sounds authoritative without being verifiable. Reject candidates that lack provenance.
  • − Treating recency as truth
    The newer source isn't always right. Don't auto-supersede based on date alone; let edge type (contradicts vs extends) and source quality drive resolution.
  • − Storing summaries, not claims
    Summaries are lossy. Extract atomic claims with their sources; reconstruct summaries on demand. The graph holds the truth, not the rendering.
  • − Mixing reasoning with memory
    The agent's reasoning chain is workflow state, not memory. Don't pollute the research memory with intermediate hypotheses the agent considered and rejected.

Code sketch

// The citation goes in the TEXT. Brain has no source/page/span field —
// what it stores is what you wrote, and extraction derives the graph.
const claim = await brain.encode({
  text: "X causes Y in an N=200 cohort (Smith 2024, p.42, doi:10.1234/abcd)",
  session: projectId,
});

// The relation is an edge, asserted explicitly.
await brain.link({
  source: claim.memoryId,
  target: priorClaimId,
  kind: "contradicts",
});

// Surface contradictions by walking the edges off a claim.
const { edges } = await brain.memoryInspect(claim.memoryId);
const conflicts = edges.filter((e) => e.kind === "contradicts");

Go deeper

  • Entity graphs for multi-hop reasoningClaim → source → author compositions for citation traversal.
  • Three layers of hallucination defenseEspecially critical when the agent's outputs become research artifacts.
  • Typed memory vs flat textWhy claim and hypothesis types beat free-form notes.

Build this with Brain

Brain is open source and ships with the architecture above out of the box.

Docs

Updates from the lab.

Engineering notes, research drops, occasional product updates. Roughly monthly.

Arc Labs

Cognitive infrastructure for AI agents. Open core in Rust. Composable primitives you own.

GitHubX / TwitterDiscussions

Brain

  • Memory Layer
  • Documentation
  • Pricing
  • Changelog
  • Status

Developers

  • Start here
  • TypeScript SDK
  • Python SDK
  • Rust SDK
  • MCP Server

Company

  • About
  • Careers
  • Blog
  • Security
  • Contact
Encode"Priya lives in Berlin."mem_7f3a · storedRecall"where does Priya live?"→ BerlinSupersede"Priya moved to Lisbon."mem_9c21 ⊃ mem_7f3aBerlin→ LisbonARC LABSARC LABSARC LABS
© 2026 ARC LABS · BANGALOREPrivacyTermsDPAApache 2.0