Skip to content

Release 1.8.0: MCP reads time back, one route plan per recall - #243

Merged
joslat merged 6 commits into
mainfrom
phase40/moves-3-4
Oct 2, 2026
Merged

joslat merged 6 commits into
mainfrom
phase40/moves-3-4

Conversation

@joslat

@joslat joslat commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Release 1.8.0. One branch, everything for this release; the version bump and the dated CHANGELOG section are included, so only the tag remains after merge.

What changes

MCP reads time back: memory_recall_as_of and memory_lineage. The server could supersede and invalidate but not read history.

  • memory_recall_as_of recalls what was true at a moment (asOf, valid time), optionally as known at another (systemAsOf, transaction time), with the same sections as memory_search and the host's configured recall options.
  • memory_lineage returns what a fact or preference replaced and what replaced it, oldest first, with when each was stated, held and closed, and the messages it came from.
  • Both are reads (kept on a --read-only server) and owner-scoped; memory_lineage fails closed under strict owner isolation. The server now has 27 tools, 11 of them reads.

One route plan per recall: MemoryContext.Route. The four routing decisions a recall made, side by side: items asked for per memory kind (the caps the recall actually used, including a host's configured MemoryOptions.Recall), how time was read (now, question, requested, with both clocks), whether the query was split and by which rules, and the budget it was fitted to. Traced as one memory.route.plan event on memory.recall.total for every caller; a direct RecallAsOfAsync call now opens that span too. It reports; it decides nothing.

Dependencies: Microsoft Agent Framework 1.23, Semantic Kernel 1.80.1, Neo4j.Driver 6.3, Testcontainers.Neo4j 4.15. Store provisioning (DatabasePerApplication) consumes each statement's result inside its transaction, as Neo4j.Driver 6.3 requires.

Repository: Dependabot monthly, one grouped PR, never rebased (Actions minutes). A measurement tool for the decision-recall kill test (tools/AgentMemory.Decisions, not packaged).

Evidence

Gate Result
Unit tests (Core · Extensibility · LongMemEval · SemanticKernel) 7,237 pass, 0 fail (6,085 · 42 · 1,055 · 55)
Integration tests, real Neo4j 5.26 601 pass, 0 fail (29 skipped: need cloud credentials)
Samples run live (Bitdeer GLM-5.3-Flash + a fresh Neo4j 5.26): AgentWithMemory, MinimalAgent, ConversationalAgent all pass @ e602b145, no errors in any log; ConversationalAgent answers from the current state (Copenhagen, full marathon in May) and shows Lyon and the half marathon as replaced
Review: three areas, each finding checked by a skeptic 15 reported, 11 confirmed (9 distinct; 2 medium: the route plan reported library-default caps when a host configured its own; a direct as-of recall put the route event on whatever span was ambient), all fixed with tests

Compatibility

  • Public API: additions only (MemoryRoutePlan, MemoryContext.Route, MemoryTelemetry route constants). No default changed.
  • Telemetry: a direct RecallAsOfAsync call now opens a memory.recall.total span (additive).
  • Stored data: no migration.
  • No numeric benchmark claim is made in this release.

🤖 Generated with Claude Code

joslat and others added 6 commits October 1, 2026 17:20
…o rebase

MAF 1.23, Semantic Kernel 1.80.1, Neo4j.Driver 6.3, Testcontainers.Neo4j 4.15,
codecov-action 7.1.1 (pinned SHA). Neo4j.Driver 6.3 made returning a cursor
from a transaction function obsolete: store provisioning now consumes each
statement inside its transaction. Unit 7,207 and integration 600 pass.

Dependabot re-ran full CI on every open PR each time main moved; it now opens
one grouped PR a month per ecosystem and never rebases on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server could supersede and invalidate but not ask what was in force at a
date, or what replaced what. Both reads already existed in the library
(IMemoryRecall.RecallAsOfAsync, IMemoryHistoryService); the tools expose them.
Reads (allowed read-only), owner-scoped; lineage fails closed under strict
isolation before any read. Unit tests pin the two-way walk; a real-Neo4j test
reads a change of mind back through the tool, and another owner gets nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ore facts (PLAN 40.15/40.16)

tools/AgentMemory.Decisions answers questions about ADRs and release notes
three ways and grades them from their citations, no judge model:
- S0 keyword (BM25) and S1 vector (bge-m3) retrieval over the same Markdown;
- S2 the kernel: each corpus replayed in date order into ordinary AgentMemory
  memory (one owner per corpus, the Conversational preset), so corrections and
  supersession close replaced decisions; dated questions are recalled as of
  their date, as the store knew it once everything decided by then was read.
The corpora are read at their pinned commits through git. A dry run places
every labelled decision on a chunk and measures retrieval alone, spending
nothing. Nine unit tests pin chunking, placement and grading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The four routing decisions a recall makes were made, and partly traced, in
four places: recall caps in the options, time in the temporal parser, the
split in the fan-out report, the fit in truncation. MemoryRoutePlan puts them
side by side on the context, and memory.route.plan carries them on the
memory.recall.total span for every caller, not only the agent adapter. It
reuses the existing route tag names where they overlap and is distinct from
the adapter's memory.route policy span. Reports only; decides nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1.8 fixes it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on its own span; docs match the 27 tools

- Route plan: Recall reports the host's configured MemoryOptions.Recall when the caller left the request at the
  default (one EffectiveRecall helper shared with the assembler); a direct RecallAsOfAsync opens
  memory.recall.total, so the memory.route.plan event never lands on an ambient span; KnownAsOf is left out
  when a question-routed recall read the transaction clock at now. Tests for each, and exactly one event per path.
- MCP as-of test proves the configured recall options reach the tool.
- Docs: McpHost says 27 tools, 11 reads (README, package description); threat model TT-02 names HistoryTools;
  getting-started and the production checklist count all 22 entry points that take a userId; architecture.md
  dependency versions current.
- Decisions tool single-targeted; Dependabot NuGet updates in one group.
- Version 1.8.0, CHANGELOG dated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 09:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Route reporting and evaluation cache reuse can produce inaccurate diagnostics and measurements.

Review effort: Balanced
Findings: 2 High severity · 4 Medium severity · 3 Low severity

Open (9)
What changed in this PR

Adds temporal MCP reads and recall-route diagnostics for release 1.8.0, alongside dependency upgrades and decision-recall evaluation tooling.

Changes:

  • Adds memory_recall_as_of, memory_lineage, and owner-isolation coverage.
  • Adds MemoryContext.Route and route-plan telemetry.
  • Adds decision-recall measurement tooling, dependency upgrades, and release automation updates.
File Description
tools/​AgentMemory.McpHost/​README.md Updates MCP tool counts.
tools/​AgentMemory.McpHost/​McpHostProgram.cs Updates host documentation.
tools/​AgentMemory.McpHost/​AgentMemory.McpHost.csproj Updates package metadata.
tools/​AgentMemory.LongMemEval/​AgentMemory.LongMemEval.csproj Upgrades Testcontainers.
tools/​AgentMemory.Decisions/​Program.cs Adds evaluation CLI orchestration.
tools/​AgentMemory.Decisions/​DecisionRetrieval.cs Adds keyword/vector retrieval.
tools/​AgentMemory.Decisions/​DecisionKernelHost.cs Adds kernel provisioning and caching.
tools/​AgentMemory.Decisions/​DecisionKernel.cs Adds AgentMemory-backed retrieval.
tools/​AgentMemory.Decisions/​DecisionFixture.cs Adds fixture labels and grading.
tools/​AgentMemory.Decisions/​DecisionCorpus.cs Adds ADR/changelog chunking.
tools/​AgentMemory.Decisions/​DecisionAnswerer.cs Adds model answering and parsing.
tools/​AgentMemory.Decisions/​AgentMemory.Decisions.csproj Defines the measurement tool.
tools/​AgentMemory.Cli/​AgentMemory.Cli.csproj Upgrades Testcontainers.
tests/​AgentMemory.Tests.Unit/​Services/​RoutePlanTests.cs Tests route plans and telemetry.
tests/​AgentMemory.Tests.Unit/​McpServer/​ReadOnlyModeTests.cs Covers new read-only tools.
tests/​AgentMemory.Tests.Unit/​McpServer/​HistoryToolsTests.cs Tests temporal MCP tools.
tests/​AgentMemory.Tests.Unit/​Infrastructure/​Neo4jMemoryStoreProvisionerTests.cs Updates transaction mocks.
tests/​AgentMemory.Tests.Unit/​Infrastructure/​AbstractionsContractGuardTests.cs Accounts for the new domain record.
tests/​AgentMemory.Tests.Unit/​Decisions/​DecisionRecallInstrumentTests.cs Tests evaluation instrumentation.
tests/​AgentMemory.Tests.Unit/​AgentMemory.Tests.Unit.csproj Adds tool tests and dependency bump.
tests/​AgentMemory.Tests.Performance/​AgentMemory.Tests.Performance.csproj Upgrades Neo4j dependencies.
tests/​AgentMemory.Tests.Integration/​Extraction/​ClosedFactTakesItsEdgeIntegrationTests.cs Tests lineage against Neo4j.
tests/​AgentMemory.Tests.Integration/​AgentMemory.Tests.Integration.csproj Upgrades integration dependencies.
src/​AgentMemory.SemanticKernel/​AgentMemory.SemanticKernel.csproj Upgrades Semantic Kernel.
src/​AgentMemory.Neo4j/​Infrastructure/​Neo4jMemoryStoreProvisioner.cs Consumes transaction results in-scope.
src/​AgentMemory.Neo4j/​AgentMemory.Neo4j.csproj Upgrades Neo4j.Driver.
src/​AgentMemory.McpServer/​Tools/​HistoryTools.cs Adds temporal recall and lineage tools.
src/​AgentMemory.McpServer/​ServiceCollectionExtensions.cs Registers history tools.
src/​AgentMemory.McpServer/​McpToolAccess.cs Allows history tools in read-only mode.
src/​AgentMemory.Core/​Services/​MemoryService.cs Produces route plans and events.
src/​AgentMemory.Core/​Services/​MemoryContextAssembler.cs Shares effective recall-option resolution.
src/​AgentMemory.AgentFramework/​AgentMemory.AgentFramework.csproj Upgrades Agent Framework.
src/​AgentMemory.AgentFramework.Nams/​AgentMemory.AgentFramework.Nams.csproj Upgrades Agent Framework abstractions.
src/​AgentMemory.Abstractions/​Domain/​Context/​MemoryRoutePlan.cs Defines the public route-plan model.
src/​AgentMemory.Abstractions/​Domain/​Context/​MemoryContext.cs Exposes the route plan.
src/​AgentMemory.Abstractions/​Diagnostics/​MemoryTelemetry.cs Defines route telemetry constants.
samples/​AgentMemory.Sample.ShoppingAssistant/​AgentMemory.Sample.ShoppingAssistant.csproj Upgrades Agent Framework.
samples/​AgentMemory.Sample.RealAgent/​AgentMemory.Sample.RealAgent.csproj Upgrades Agent Framework.
samples/​AgentMemory.Sample.NamsAgent/​AgentMemory.Sample.NamsAgent.csproj Upgrades Agent Framework.
samples/​AgentMemory.Sample.MemoryToolsAgent/​AgentMemory.Sample.MemoryToolsAgent.csproj Upgrades Agent Framework.
samples/​AgentMemory.Sample.ConversationalAgent/​AgentMemory.Sample.ConversationalAgent.csproj Upgrades Agent Framework.
samples/​AgentMemory.Sample.ChatHistoryProvider/​AgentMemory.Sample.ChatHistoryProvider.csproj Upgrades Agent Framework.
samples/​AgentMemory.Sample.AgentWithMemory/​AgentMemory.Sample.AgentWithMemory.csproj Upgrades Agent Framework.
docs/​security/​threat-model.md Documents history-tool isolation risks.
docs/​security/​production-checklist.md Updates strict-isolation coverage.
docs/​observability.md Documents route-plan telemetry.
docs/​getting-started.md Updates MCP isolation guidance.
docs/​architecture.md Updates APIs, counts, and dependencies.
Directory.Build.props Sets version 1.8.0 and tool targeting.
CHANGELOG.md Adds the 1.8.0 release notes.
benchmarks/​AgentMemory.Benchmarks/​AgentMemory.Benchmarks.csproj Upgrades benchmark dependencies.
AgentMemory.slnx Adds the Decisions tool.
.github/​workflows/​ci.yml Upgrades Codecov action.
.github/​dependabot.yml Groups monthly dependency updates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

return new NothingRetriever();
}

var owner = $"decision-space-{set.ToLowerInvariant()}-{DateTimeOffset.UtcNow.ToString("yyyyMMddHHmm", CultureInfo.InvariantCulture)}";
Comment on lines +87 to +89
var cache = File.Exists(cachePath)
? JsonSerializer.Deserialize<Dictionary<string, float[]>>(await File.ReadAllTextAsync(cachePath, cancellationToken).ConfigureAwait(false)) ?? []
: new Dictionary<string, float[]>();
Comment on lines +249 to +253
["relationships"] = recall.MaxRelationships,
["relevant_messages"] = recall.MaxRelevantMessages,
["recent_messages"] = recall.MaxRecentMessages,
["traces"] = recall.MaxTraces,
},
if (start < 0 || end <= start) return (true, [], text ?? string.Empty);
using var json = JsonDocument.Parse(text![start..(end + 1)]);
var root = json.RootElement;
var abstained = root.TryGetProperty("abstain", out var a) && a.ValueKind == JsonValueKind.True;
Comment on lines +57 to +61
if (!rebuild && File.Exists(manifestPath))
{
var manifest = JsonSerializer.Deserialize<Manifest>(await File.ReadAllTextAsync(manifestPath, cancellationToken).ConfigureAwait(false))!;
log($" kernel {set}: reusing {manifest.Owner} ({manifest.Sources} sources, built {manifest.BuiltAt:u})");
return DecisionKernel.Load(services, manifest.Owner, chunks, [.. manifest.Clock.Select(c => (c.Date, c.KnownAt))]);
string? Value(string name) => Array.IndexOf(args, name) is var i and >= 0 && i + 1 < args.Length ? args[i + 1] : null;
var fixturePath = Value("--fixture") ?? throw new ArgumentException("--fixture is required");
var outDir = Directory.CreateDirectory(Value("--out") ?? throw new ArgumentException("--out is required")).FullName;
var systems = (Value("--systems") ?? "keyword,vector").Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
concrete package (AsAIAgent, ChatClientAgent, sessions, OpenTelemetry middleware). Pinned to
1.9.0 to match the adapter's .Abstractions pin. -->
<PackageReference Include="Microsoft.Agents.AI" Version="1.22.0" />
<PackageReference Include="Microsoft.Agents.AI" Version="1.23.0" />
Comment on lines +1816 to +1820
/// <summary>
/// The recall options a request actually runs with: the host's configured <see cref="MemoryOptions.Recall"/> when the
/// caller left <see cref="RecallRequest.Options"/> at the <see cref="RecallOptions.Default"/> singleton (25.2), else the
/// caller's. One place, so the assembler and the route plan (40.20) cannot report different caps.
/// </summary>
Comment on lines +11 to +14
/// <summary>
/// PLAN 40.14 (F7): the read side of time. The server could supersede and invalidate (<see cref="MaintenanceTools"/>)
/// but not ask what was in force at a date, or what replaced what. Both reads already existed in the library
/// (<see cref="IMemoryRecall.RecallAsOfAsync"/> and <see cref="IMemoryHistoryService"/>); these tools expose them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants