> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Changelog

> Release notes and version history for Memanto.

# Memanto Changelog

<Update label="Version 0.2.20" description="Released September 4, 2026">
  <Warning>
    Upgrading the `memanto` package does not rewrite instruction files that are already installed — a connected agent keeps running the old text until you refresh it. Run [`memanto connect update`](/cli/connect/update) once after upgrading to bring every local and global integration to the new instructions, skill, and hooks.
  </Warning>

  ### New Features

  #### Version-stamped agent instructions

  * **Every instruction file and `SKILL.md` now carries a `memanto-template-version` stamp**, starting at `1.0.0`. Memanto scans each registered agent in both scopes and reports the *lowest* version it finds, so one stale integration is enough to flag the workspace. A file carrying the older `MEMANTO-MANAGED-SECTION` marker with no version tag counts as `0.0.0`.
  * **[`memanto status`](/cli/core/status) and [`memanto memory sync`](/cli/data/sync) print a notice** when anything is behind the shipped version. Both notices are non-fatal — neither changes the command's normal output or its exit status.

  #### `memanto connect update`

  * **One command refreshes every active integration** — [`memanto connect update`](/cli/connect/update) reinstalls the latest instructions, skill, hooks, and permissions for each connected agent, local and global, in a single run. It takes `--project-dir/-p` and nothing else: there is no target argument and no `--global` flag, because both scopes are always covered.
  * **Per-agent output is deduplicated**, and a run where any agent fails ends with an explicit error summary rather than a success line.

  #### Auto-sync hooks for Claude Code, Codex CLI, and Cursor

  * **Hooks ship as JSON assets** — `hooks.json`, `codex-hooks.json`, and `cursor-hooks.json`, plus two Python scripts copied into the agent's own `hooks/` directory at connect time. `${CLAUDE_PLUGIN_ROOT}`, `${PLUGIN_ROOT}`, and `${CLAUDE_PROJECT_DIR}` are replaced with real paths on install, so the installed config has no unresolved placeholders.
  * **`session_start.py` refreshes `MEMORY.md` on session start and resume** and prints a one-line notice pointing the agent at the file before it acts.
  * **`notify.py` runs as a Claude Code `PostToolUse` hook** gated on `Bash(memanto *)`, replacing the raw shell line in the transcript with a readable summary such as `👾 Memanto · stored a decision (confidence 0.95)`. It stays silent on anything it cannot confidently describe.
  * **[Codex CLI](/integrations/codex) and [Cursor](/integrations/cursor) are now hook-based integrations**, each getting session-start and pre-compact sync entries in their own `hooks.json`. Claude Code additionally gets a `PreCompact` sync, so context about to be summarized away is written to memory first.
  * **Duplicate registration is safe** — each script is registered under both `python` and `python3`, because neither spelling exists on every platform, and a temp-file claim lock ensures only the first process to run produces output.

  #### Instruction update banner in the Web UI

  * **The dashboard shows a dismissible banner** when instructions are outdated, with an **Update Now** button that runs the same local-and-global update as the CLI. New local endpoints back it: `GET /api/ui/template-status`, `GET /api/ui/template-status/dismissed`, `POST /api/ui/template-status/dismiss`, and `POST /api/ui/template-status/update`.
  * **Dismissal is per version**, stored as `cli.dismissed_template_version`, so the banner stays hidden for the version you dismissed and returns when a newer one ships.

  ### Improvements

  #### Rewritten instructions and `memanto-memory` skill

  * **Instructions are now five numbered directives** — environment-aware execution protocol, the abstraction rule, the durability test, the recall trigger matrix, and an execution reference — replacing the previous flat rule list.
  * **An explicit anti-pattern rule** tells the agent to store the generalized principle ("Exclusively use functional components for React UI") rather than the chat log ("User told me to use functional components").
  * **The evaluation step adapts to the host** — native CLI and integrated-IDE agents are told to run it inside a `<thinking>` block; VS Code Copilot and other extension-mode agents, which have no thinking block, get a three-step sequence that writes the evaluation into the `explanation` parameter of a no-op `echo "memory check"` terminal call.
  * **`SKILL.md` gained a full command reference** — including `edit`, `forget`, and the temporal `recall` variants — plus per-type default provenance and worked workflow examples. The agent's own name is now substituted into every `--source <agent_name>` example instead of a placeholder.
  * **GitHub Copilot instructions are written with frontmatter** (`applyTo: "**/*"`) so VS Code ingests them automatically.

  #### Local and global instruction paths are declared per agent

  * **Global targets are no longer derived from the local path** — each of the 14 supported agents now declares its own global instruction file (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, `~/.pi/agent/AGENTS.md`, `~/.config/opencode/AGENTS.md`, `~/.codeium/windsurf/.windsurfrules`, and so on).
  * **GitHub Copilot's global target follows VS Code** — the user prompts directory under `%APPDATA%\Code\User\prompts\` on Windows, `~/Library/Application Support/Code/User/prompts/` on macOS, and `~/.config/Code/User/prompts/` on Linux.

  ### Bug Fixes

  #### Template rewrites corrupted content containing backslashes

  * **Windows paths were mangled, or the write failed outright** — instruction content was passed straight into `re.sub()` as the replacement string, where a backslash is an escape character, so a literal backslash was either swallowed or raised a bad-escape error. Replacement text is now escaped before substitution.

  #### Reinstalling instructions wiped synced memories

  * **Re-connecting or updating an agent erased the memories `memory sync` had written into the instruction file.** Those memories now live in their own `MEMANTO-DYNAMIC-MEMORIES` block outside the managed static section, and the incoming content has that block stripped before the rewrite — so an update replaces only the static instructions. Disconnecting removes both blocks.

  #### Hook removal missed most of what connect installed

  * **`connect remove` left hooks behind** — removal compared against a hardcoded payload and only looked at `SessionStart`, so hooks installed from the JSON assets, and anything under `PreCompact` or `PostToolUse`, survived a disconnect. Removal now sweeps every hook event, drops any group containing a Memanto command (`memanto`, `notify.py`, or `session_start.py`), prunes events left empty, and deletes the copied hook scripts and their directory. Note that a group is removed as a unit: an unrelated hook sharing a group with a Memanto hook goes with it.

  #### Other fixes

  * **Global installs targeted the wrong file for several agents** — global paths were built by stripping the local config directory from the local filename, which broke for any agent whose global layout differs from its local one. The declared global path is now used directly, handling absolute, `~/`-prefixed, and bare-relative forms.
  * **The Disconnect button did nothing for Windows project paths** — the path was HTML-escaped but not JavaScript-escaped before being interpolated into an inline `onclick` string, so any path containing a backslash produced a broken handler. Backslashes and single quotes are now escaped for the JavaScript string context.

  ### Tests

  * **Expanded** `tests/test_connect_engine.py` — hook-removal assertions updated for the new sweep, including dropping the case that asserted a non-Memanto hook sharing a group with a Memanto hook survives disconnect.
  * **Expanded** `tests/test_connect_detection.py` — updated for the local/global instruction-path split.
</Update>

<Update label="Version 0.2.19" description="Released September 1, 2026">
  ### New Features

  #### Sessions recreate themselves after expiry

  * **An expired token no longer means a hard `401`** — once a session's window had fully lapsed, every entry point (CLI, SDK and REST) failed and forced a manual re-activation. Memanto now issues a brand-new session on the next request instead. See [Automatic Recreation After Expiry](/guides/session-management#automatic-recreation-after-expiry).
  * **Recreation is gated on management access** — the caller must present a valid management credential (`Authorization: Bearer` / `X-Api-Key`) or come from the loopback interface, the same check as an explicit activation. A remote caller holding nothing but a stale token still gets `401`, so a leaked expired token is worthless on its own. See [Management Endpoint Authentication](/api-reference/authentication#management-endpoint-authentication-agent-lifecycle).
  * **The replacement token arrives the same way as a renewal** — in the `X-Session-Token` response header for header-authenticated clients, or a re-set `memanto_session_token` cookie for browser clients. The token you sent is no longer valid; read the header and use the new value. See [Token Expiration](/api-reference/authentication#token-expiration).
  * **Two cases are never recreated** — a session deliberately ended with `POST /api/v2/agents/{agent_id}/deactivate` (logout stays authoritative; activate explicitly afterwards), and a stale token whose agent has since started a newer session, which is never superseded. Malformed or foreign tokens still fall through to normal validation and their usual error.

  #### `SESSION_AUTO_RECREATE_ENABLED` toggle

  * **New setting, defaulting to `True`** — available as the `SESSION_AUTO_RECREATE_ENABLED` environment variable, the `session.auto_recreate_enabled` key in `config.yaml`, a `memanto config` boolean, and an "Auto-create a fresh session after expiry (next request)" switch in the [Web UI](/cli/core/ui) settings panel. Set it to `false` to keep the old hard-`401` behavior.

  ### Improvements

  #### Session settings actually take effect

  * **`config.yaml` session toggles were inert for the server** — the Web UI and `memanto config` write `auto_renew_enabled` and `auto_recreate_enabled` to `config.yaml`, but the server reads them from its settings, so they were only half-honoured by the CLI and ignored by the API. Both keys are now applied at startup. An explicitly exported `SESSION_AUTO_*` environment variable still wins, so containerised deployments are unaffected.
  * **Flipping a session toggle in the UI no longer needs a restart** — `config.yaml` is read once at process start, so a change made in the settings panel previously did nothing until Memanto was restarted. It now applies to the running server immediately.
  * **One toggle governs every path** — turning auto-recreate off also disables the CLI's silent re-activation of a token that no longer verifies (typically after rotating `MEMANTO_SECRET_KEY`), which used to be gated on the unrelated auto-renew setting.

  ### Bug Fixes

  #### Idle CLI sessions were stranded rather than recreated

  * **`No active session. Call activate_agent()` after an idle gap** — the active-session marker that every CLI entry point resolves through was cleared as soon as the session it named lapsed, so commands failed regardless of the auto-recreate setting. A lapsed session is now recreated first, and the marker is only dropped when recreation genuinely does not apply.

  ### Tests

  * **New** `tests/test_session_config_overlay.py` — YAML session toggles reach the running settings, environment variables override YAML, and missing or malformed config falls back to the defaults.
  * **Expanded** `tests/test_api.py` — a new `TestSessionAutoRecreate` covering the header path issuing a fresh token, a remote caller without a credential getting nothing, terminated sessions staying terminated, and the toggle turned off.
  * **Expanded** `tests/test_unit.py` — `check_and_auto_recreate` reviving an expired session and invalidating the old token, refusing terminated and still-active sessions, honouring the disabled config, and ignoring foreign or malformed tokens; plus the active-marker paths for each case.
</Update>

<Update label="Version 0.2.18" description="Released August 28, 2026">
  <Warning>
    Loopback callers no longer get management access on client address alone — the `Host` header must also name loopback, and cross-site browser requests are rejected. A reverse proxy that forwards a public `Host` (e.g. `Host: memanto.example.com`) to a loopback-bound Memanto now gets `401`. Attach the management credential on those calls, or make the proxy forward a loopback `Host`. See [Management Endpoint Authentication](/api-reference/authentication#management-endpoint-authentication-agent-lifecycle).
  </Warning>

  ### New Features

  #### Pi (coding agent) integration

  * **New `memanto connect pi`** — connects the [Pi coding agent](/integrations/pi) with the same `--project-dir/-p` and `--global/-g` flags as every other target. Installs Memanto instructions into `AGENTS.md` and the skill into `.pi/skills/memanto/` (or `~/.pi/agent/skills/memanto/` with `--global`).
  * **Code extensions are a new connect artifact** — alongside instruction files, skills and hooks, `connect` can now deploy a code extension. Pi gets a self-contained `memanto-sync.ts` in `.pi/extensions/` or `~/.pi/agent/extensions/`, removed again by [`memanto connect remove pi`](/cli/connect/remove).
  * **Auto-sync on fresh session start** — the extension runs `memanto memory sync --project-dir <cwd>` fire-and-forget, only when the session reason is `startup`, so `/resume`, `/fork` and `/reload` don't re-sync. Errors are swallowed so a missing `memanto` on `PATH` can never block Pi from starting, and the `Memanto: memory synced` notification fires only on exit code `0`.
  * **Pi appears in the Connections UI** with its official mark.

  ### Improvements

  #### OKF export conforms to the v0.2 spec

  * **Bundles now declare `okf_version: "0.2"`** in the root `index.md`, and per-section `index.md` files drop their non-conforming `type`/`title`/`timestamp` frontmatter. See the [OKF integration](/integrations/okf).
  * **`timestamp` is replaced by a structured `generated: {by, at}` block** on each memory. `by` is normalized into a qualified source — a bare `source` such as `user` is written as `process:user`, while values already carrying a `human:`/`process:` prefix or a namespaced `a/b` form pass through unchanged. The raw value is still available as `x_memanto.source`.
  * **Context documents and metrics get proper frontmatter** — a copied context file that has none is given a YAML-serialized `type: Context Document` / `title` header instead of being copied verbatim, and the metrics overview gains `type: Metrics Overview`.
  * **v0.1 bundles still import** — [`memanto migrate okf`](/cli/migrate/migrate) reads `generated.at` first and falls back to the legacy top-level `timestamp`, so `created_at` survives on older bundles.

  ### Bug Fixes

  #### CLI crashed with `UnicodeEncodeError` when output was redirected on Windows

  * **Any captured stdout killed the command mid-run** — Rich emits box-drawing characters, bullets and braille spinner frames, which Windows encoded with the locale code page (cp1252): `UnicodeEncodeError: 'charmap' codec can't encode character '⠹'`. This hit shell pipelines, `> file`, CI logs and agent harnesses that always pipe stdout, affecting `recall`, `status`, `forget` and the other 23 `console.status()` sites.
  * **Redirected streams are now switched to UTF-8 once** at CLI package import, before any Rich `Console` is built, so every call site is covered. `isatty()` is deliberately not the signal: on Windows `NUL` reports itself as a character device, so `command > NUL` looks like a tty while still encoding as cp1252. Streams already reporting UTF-8 are left untouched, and a failed `reconfigure()` can never stop the CLI from starting.

  #### Hermes plugin returned 403 on profile startup

  * **A restarted profile started unauthenticated** — session tokens are now persisted per profile in `<hermes_home>/profiles/<identity>/.memanto_session_token` (mode `0o600`) and reloaded on startup.
  * **Expired sessions recover on their own** — `remember`, `recall` and `answer` detect refreshable auth failures, re-activate the agent and retry once, throttled to one refresh every 5 seconds.

  ### Security

  #### Cross-site requests can no longer inherit loopback trust

  * **Any website could drive the local management API** — `require_management_access` granted the server key to any request from a loopback client address, so a page in the user's browser could activate an agent and read back its `session_token`.
  * **Loopback trust now needs three things** — a loopback client address, a loopback `Host` header, and a non-cross-site browser request: a present `Origin` must resolve to `localhost` or a loopback address (any port), and absent an `Origin`, `Sec-Fetch-Site: cross-site`/`same-site` is rejected. Non-browser callers such as `curl`, the CLI and server-side SDKs send neither header and are unaffected.
  * **The `Host` check closes DNS rebinding**, where an attacker-controlled hostname resolving to `127.0.0.1` made a remote-origin request look local.
  * **UI management endpoints apply the same guard** in `_require_local`, returning `403` rather than serving the request.

  ### Tests

  * **New** `tests/test_cli_stream_encoding.py` — the cp1252→UTF-8 switch, the `NUL`-as-tty case, UTF-8 alias spellings left alone, streams lacking `reconfigure`, `reconfigure` failures never breaking startup, and Rich glyphs surviving a cp1252 stream.
  * **Expanded** `tests/test_api.py` and `tests/test_ui_auth.py` — cross-site loopback cannot create or activate an agent and no `session_token` leaks, loopback and cross-port loopback origins keep access, and DNS-rebinding `Host` headers are rejected.
  * **Expanded** `tests/test_connect_engine.py` and `tests/test_connect_detection.py` — Pi install deploys instructions, skill and extension; install is idempotent; remove deletes the extension; global paths match the `~/.pi/agent/` layout; agents without an extension deploy none; and Pi detection keys off its own skill dir since it shares `AGENTS.md` with codex/opencode.
  * **Expanded** `integrations/hermes-agents/tests/test_provider.py` and `tests/test_unit.py` — token persistence across restarts, auto-refresh on session expiration, and Pi instruction-file path resolution.
</Update>

<Update label="Version 0.2.17" description="Released August 24, 2026">
  <Warning>
    The HTTP error payload for a failed memory operation now reports `"error": "MemoryOperationError"` instead of `"error": "MemoryError"` — the internal exception was shadowing Python's builtin. Update any client that matches on that string.
  </Warning>

  A data-integrity release: recall stops silently dropping imported memories, OKF exports swap in atomically, migrations keep source data they previously discarded, and `memanto memory sync` always exports fresh.

  ### Improvements

  * **OKF exports are atomic** — a bundle renders to a staging directory and swaps into place under a cross-process lock, so leftover files can no longer resurrect deleted memories, an import can't read a half-written bundle, and a failed export leaves the last good one intact. `x_memanto` now also carries `updated_at`, and import restores it rather than stamping migration time. See [OKF](/integrations/okf).
  * **[`memanto memory sync`](/cli/data/sync) always exports fresh** before writing `MEMORY.md` — the old cache fast-path omitted memories written earlier in the same session. A previous export is reused only when the backend is unreachable, reported as `stale cache (backend unreachable)`.
  * **Daily summaries and conflict scans sample the whole day** — long session text becomes an evenly-sampled digest instead of being truncated to its first tokens, keeping busy days inside both the embedding and LLM context windows without losing late-day activity.
  * **Conflict reports follow the active backend's data directory** instead of a hardcoded `~/.memanto/conflicts/`, so on-prem writers and readers agree on one location. See [`memanto detect-conflicts`](/cli/ai/detect-conflicts).
  * **More phrasings classified as preferences** — `can not stand`, `detest`, `loathe`, `despise` — and a negative preference now outranks a relationship match in the same sentence.

  ### Bug Fixes

  #### Recall

  * **`last week` / `last month` / `last year` returned everything.** These fell through to the no-filter sentinel, so temporal queries silently returned all memories instead of recent ones. They now resolve (7/30/365 days), alongside `past N days/hours` as a synonym for `last N ...` and spelled-out numbers (`last seven days`). See [`memanto recall`](/cli/search/recall#relative-time-strings).
  * **Memories with no confidence were dropped** whenever `--min-confidence` was set — mostly memories brought in by [`memanto migrate`](/cli/migrate/migrate), which often carry none. Unknown confidence now fails open.
  * **Extra metadata survives an edit** — `original_id` and other keys outside the memory schema were stripped on read, so editing a memory silently discarded them. Conversely, clearing an optional field (`tags`, `source_ref`) now actually clears it instead of being restored from the previous version.
  * **Filter-only queries carried a leading space** (`" #memory_type:fact"`), which could confuse query parsing.

  #### Migration

  * **Supermemory imports lost data.** The v4 list endpoint takes `containerTag`, not `containerTags`, so pages were under-fetched; a memory's additional container tags were discarded during dedupe; and document chunks were harvested only when *no* extracted memories existed, dropping unprocessed documents in mixed accounts. The pre-migration count now matches what is actually imported.
  * **Mem0 category strings split into character tags** — a single category string was iterated per character.
  * **OKF batches failed on long titles.** A title over 100 characters invalidated the whole batch; it's now truncated with the original kept in the `[Supporting data]` footer. YAML `true` in a temporal field no longer parses as `1970-01-01`.
  * **Unreadable or non-JSON export files** produce a clear error instead of a raw traceback (HTTP 400 in the Web UI).

  #### Other fixes

  * **Renewed session tokens are readable cross-origin** — `X-Session-Token` was missing from the CORS `expose_headers` allowlist, so browser clients couldn't pick up an auto-renewed token. See [Authentication](/api-reference/authentication).
  * **Batch writes reported the wrong `total_submitted`** when items were rejected before submission; a malformed batch response now raises instead of pairing memories with `null` results.
  * **Session summaries logged `session_id: "unknown"`** despite a resolved session being available.
  * **`memanto session info` compared a naive local time against UTC**, mislabelling session expiry.
  * **Namespace tier and quota rejections** during agent creation surface the real cause instead of a generic failure.
  * **LangGraph** no longer crashes on an unexpected `list_agents` payload, and caps remembered message content at 10,000 characters instead of silently dropping long conversations.
  * **TypeScript SDK** file upload rebuilt on standard `FormData`, replacing the hand-rolled multipart stream. See [TypeScript SDK](/sdk/typescript).

  ### Security

  * **Agent deletion revokes the session token first.** Metadata was removed before revocation, so a failed cleanup could leave an apparently deleted agent whose old token still authorized requests. Deletion now aborts if revocation fails.
  * **Conflict report paths are validated** against `agent_id` and date patterns before being joined, replacing unvalidated f-string path construction.
</Update>

<Update label="Version 0.2.16" description="Released August 20, 2026">
  <Warning>
    **Breaking:** memory TTL is replaced by a two-state lifecycle. `expires_at` and `ttl_seconds` are gone from the memory schema and API responses, replaced by `expired_at` and `expired_by`. Nothing ever populated the TTL fields — there was no write path for them — so stored data is unaffected, but API clients reading those field names must be updated.
  </Warning>

  Replaces the old TTL-only expiry with a full **memory lifecycle policy system**: active/expired status, per-type retention tables, named match rules, presets, a sweep-and-purge pipeline, expire actions in conflict resolution, and a dedicated policy page in the Web UI — plus a cluster of session-token, pagination, and TypeScript SDK reliability fixes.

  ### Memory Lifecycle

  Every memory is now either **`active`** or **`expired`** — no other states. Nothing expires implicitly: a policy only takes effect when a **sweep** runs, which stamps `status`, `expired_at` and `expired_by` onto each matching record, so a recalled memory can say *when* it expired and *which rule* did it. See [Memory Lifecycle](/reference/memory-lifecycle).

  * **Expiring is reversible.** Content, tags, confidence and timestamps are untouched; the memory stays recallable, clearly labelled `[EXPIRED]`. [Deleting](/api-reference/data/delete-memory) remains separate and permanent.
  * **`superseded`, `provisional` and `deleted` statuses removed.** They were schema-only — nothing ever wrote them. A record carrying a retired status is treated as `active` on edit rather than failing.
  * **Recall returns both states by default**, each labelled, with a new `status` filter (`all` / `active` / `expired`) on [Recall](/api-reference/search/recall), [Recall Recent](/api-reference/search/recall-recent) and [Recall Changed Since](/api-reference/search/recall-changed-since) — `--active` / `--expired` on [`memanto recall`](/cli/search/recall).
  * **Point-in-time recall is preserved:** [`--as-of`](/api-reference/search/recall-as-of) still reconstructs what was true at a past date, returning memories that were live then even if they have expired since.
  * **New commands** [`memanto memory expire`](/cli/data/expire) and [`memanto memory restore`](/cli/data/restore) retire and revive a single memory by hand.

  ### Expiry Policies

  A policy has two halves: a per-type **retention** table (`context: 7d`, `preference: never`) for broad strokes, and named **rules** — sharper match blocks on type, tags, source, provenance or a confidence threshold — evaluated in order. The first match wins and overrides the table, so a rule set to `expire_after: never` *pins* a memory active.

  * **Durations** parse `30m` / `12h` / `7d` / `2w` / `3mo` / `1y` / `never`, with a new `mo` unit (30 days).
  * **Three built-in presets** — `conservative`, `balanced`, `aggressive` — each a complete policy adoptable in one command and editable afterwards. All three treat `preference` / `instruction` / `relationship` as durable and exempt anything tagged `pinned`.
  * **[`memanto policy apply`](/cli/policy/apply)** shows the policy in force and every matching memory *before* asking to proceed; `--dry-run` stops at the preview, `--yes` skips the prompt.
  * **Purge is a separate, opt-in step** ([`memanto policy purge`](/cli/policy/purge)) that permanently deletes memories which have *already been expired* longer than `purge_expired_after`. Kept deliberately distinct from expiry, and never part of the nightly job.
  * **New CLI group** `memanto policy {show, list-preset, apply-preset, apply, purge}`.
  * **New REST endpoints:** [`GET`](/api-reference/policy/get-policy) / [`PUT /{agent_id}/policy`](/api-reference/policy/set-policy), [`GET /{agent_id}/policy/presets`](/api-reference/policy/list-policy-presets), [`GET /{agent_id}/policy/presets/{name}`](/api-reference/policy/get-policy-preset), [`POST /{agent_id}/policy/preset`](/api-reference/policy/apply-policy-preset), [`POST /{agent_id}/policy/apply`](/api-reference/policy/apply-policy), [`POST /{agent_id}/policy/purge`](/api-reference/policy/purge-expired), [`POST /{agent_id}/memories/{memory_id}/expire`](/api-reference/data/expire-memory) and [`POST /{agent_id}/memories/{memory_id}/restore`](/api-reference/data/restore-memory).
  * **The nightly [schedule](/cli/schedule/enable) job runs the sweep** after the daily summary and conflict detection. An agent with no policy is a no-op.
  * **TypeScript SDK:** the generated OpenAPI client picks up all nine new operations automatically. The ergonomic `Memanto` wrapper does not expose them yet — call the generated client, or the REST endpoints directly, until it does.

  ### Conflict Resolution

  * **Three new actions** — `expire_old`, `expire_new`, `expire_both` — resolve a conflict by expiring one side instead of only keep/delete/manual, stamped `expired_by: conflict-resolution`. Existing delete actions are unchanged. See [Resolve Conflict](/api-reference/data/resolve-conflicts) and [`memanto conflicts`](/cli/ai/conflicts).

  ### Web UI

  * **New Expiry Policy page** for viewing and editing the retention table, rules and purge window, with preset loading and preview / apply / purge actions.
  * **Per-row lifecycle actions** in the Memory Explorer — a Mark expired / Restore button beside Edit and Forget — and expired rows show the rule and date inline.
  * **Active & Expired / Active only / Expired only filter** in the Explorer.
  * **Purge window is a number plus a unit selector** (Days 1–365, Months 1–12, Years 1–10, or Never), replacing the raw duration text input. A window set by CLI or by hand that the pair can't express is shown as-is rather than silently rewritten.

  ### Bug Fixes

  #### Session token handling

  * **Renewed session tokens are returned on the response header** instead of only updating server-side state, so a client whose session auto-renews mid-flight keeps a usable token.
  * **`delete_agent` clears local session state consistently.**
  * **TypeScript SDK** retries automatically on an expired session instead of failing the call, and serializes concurrent server startup so two near-simultaneous bootstrapping calls don't race.

  #### Pagination guard against repeated tokens

  * **Document pagination now tracks seen `next_token` values** and stops instead of looping forever if the backend ever returns the same token twice.

  #### Provenance preserved on memory update

  * **`update_memory` keeps the original `provenance`** instead of resetting it, so an edited memory doesn't lose its "how was this obtained" history.

  #### Daily-summary confidence pairing

  * **Confidence values are matched to the correct memory block**, bounded to that block's heading range, instead of potentially attaching to an adjacent block.

  ### Housekeeping

  * **`memanto/app/legacy/` deleted** (\~3,460 lines across 17 files) along with 16 unused Pydantic models and several dead constants. None were reachable from any live route, CLI command or client.
</Update>

<Update label="Version 0.2.15" description="Released August 18, 2026">
  <Warning>
    Fixes a bug where resolving a conflict after the first resolution could delete a memory you never selected. Upgrading is strongly recommended if you use conflict resolution via the REST API or Web UI.
  </Warning>

  ### Bug Fixes

  #### `resolve_conflict` deleted the wrong memory after the first resolution

  * **`list_conflicts` returns only *unresolved* conflicts, while `resolve_conflict` indexed into the *full* report** — the two index spaces agreed only until the first resolution, then desynced. A caller resolving by filtered-list position could delete a memory it never selected, while the conflict the user actually chose stayed unresolved.
  * **`list_conflicts` now tags each conflict with its stable `index`** into the full report; the Web UI resolves by that stable index instead of on-screen position; `resolve_conflict` rejects an already-resolved index as defense in depth. See [Resolve Conflict](/api-reference/data/resolve-conflicts).

  #### OKF export corrupted multi-tag memories

  * **Moorcheh stores `tags` as a comma-separated string**, but the OKF renderer wrapped it in `list(tags)`, splitting the string character-by-character and emitting garbage one-character tags in the frontmatter — every multi-tag memory lost its real tags on export. Now splits-and-strips a string value and passes a list through unchanged.
  * **Colliding OKF context filenames are preserved** instead of silently overwritten, and markdown-link parsing is now linear-time (was worst-case quadratic).

  #### Daily analysis dates misaligned with UTC storage

  * **API, CLI, and Web UI daily-analysis date defaults** are now aligned to the same UTC boundary memories are stored under, fixing off-by-one-day results near midnight depending on local timezone. Reflected in [`memanto daily-summary`](/cli/ai/daily-summary) and the conflict endpoints.

  #### Conversation extraction dropped oversized messages

  * **A single message exceeding the extraction character budget was dropped entirely**, sending an empty query and producing an API error or garbage results. The first message is now always included (truncated if necessary), separators count toward the budget, and the budget was raised to 120,000 characters — the old cap came from an embedding-search bottleneck that no longer applies now that extraction runs in raw-LLM mode.

  #### CLI: `--min-confidence` recall filter restored

  * **`memanto recall --min-confidence` had regressed to a no-op**; filtering is restored and positional recall arguments are preserved. It filters on the memory's own stored confidence, distinct from `--min-similarity`, which filters on query match score. See [`memanto recall`](/cli/search/recall).

  #### Other fixes

  * **FastAPI header metadata leaking into backend API keys** — an unresolved `Header(...)` default object could be forwarded to the Moorcheh SDK as if it were a real API key when the dependency was called directly rather than injected; only a genuine string is accepted now.
  * **LangGraph** — fixed a key-collision case in `MemantoStore` and stale per-agent locks left behind after certain operations; legacy key tags are preserved for backward compatibility.
  * **Mem0 export** now targets Mem0's v3 API, and pagination validates the `next` field instead of terminating early on a malformed page.
  * **Incomplete memory exports are rejected** rather than silently accepted as complete, while still falling back to the last good export when a refresh genuinely fails.
  * **Deleting an agent** now cleans up its per-agent lock instead of leaving a stale lock object behind.

  ### Tests

  * **New** `tests/test_conflict_index_desync.py`, plus expanded `tests/test_okf.py`, `tests/test_backend.py`, `tests/test_cli.py`, `tests/test_conversation_memory_extraction.py`, and `tests/test_export_resilience.py` covering every fix above.
</Update>

<Update label="Version 0.2.14" description="Released August 11, 2026">
  ### New Features

  #### Langfuse integration

  * **New `langfuse-memanto` package** — `attach(agent_id=...)` wires into an existing Langfuse setup and turns failing or notable spans into durable Memanto memories live, so lessons from observability data don't have to be re-learned on every run. Rule-based (no LLM calls), runs off the hot path, and never breaks the traced application if a memory write fails. See [Langfuse Integration](/integrations/langfuse).
  * **`memanto migrate langfuse`** adds Langfuse as a fourth migration source (alongside Mem0, Letta, Supermemory), with its own discovery step, configurable capture rules, and a sync ledger for incremental runs. See [`memanto migrate`](/cli/migrate/migrate#langfuse-sync).
  * **New Langfuse tile in the Web UI's Migrate surface**, for discovering and syncing a Langfuse project without touching the CLI.
  * **Live capture and batch migration share the same ledger**, so they write identical memories and never duplicate each other.

  ### Bug Fixes

  #### `memanto-mcp` broken on MCP SDK 2.0

  * **The published `memanto-mcp` 0.1.1 declared an unbounded `mcp[cli]>=1.2.0` dependency.** MCP SDK 2.0 removed `mcp.server.fastmcp`, so a fresh install silently resolved to a version the server couldn't import and failed to start. The `mcp` dependency is now pinned below 2.0, released as `memanto-mcp` 0.1.2.

  #### Per-client write attribution in MCP

  * **MCP-written memories now default `source` to the connected client's identity** (e.g. `cursor`, `codex`, `claude-ai`) instead of a single generic value, falling back to `mcp-agent` when the transport carries no client identity — reusing core's own source validation so the advertised tool schema matches what the write path accepts. Builds on the open `source` label introduced in `v0.2.13`.

  #### Other fixes

  * **Loopback client misused as a real API key** — internal/loopback UI operations were forwarding an unresolved FastAPI `Header(...)` default to the SDK as if it were a real API key, raising a `TypeError` inside httpx. Only a genuine string is treated as a supplied key now.
  * **Version resolution for source-archive installs** — added a `hatch-vcs` fallback version so editable installs and installs from a source archive (e.g. a GitHub ZIP with no `.git` metadata) no longer fail version resolution at install time.

  ### Tests

  * **New** `tests/test_langfuse_{config,discover,export,rules,state,sync}.py` and `integrations/langfuse/tests/{test_handler,test_span_mapper}.py` covering the new integration end-to-end.
  * **New** `integrations/mcp/tests/test_packaging.py` guarding the SDK version pin; expanded `integrations/mcp/tests/{test_server,test_tools}.py`.
</Update>

<Update label="Version 0.2.13" description="Released August 4, 2026">
  <Warning>
    Fixes a major bug where recalling more than one memory type at once (`type: ["fact", "preference"]`) silently returned zero results. Upgrading is strongly recommended if you use multi-type filters.
  </Warning>

  ### New Features

  #### Open `source` label for per-writer attribution

  * **`source` is no longer restricted to a fixed enum** — any writer (CLI, MCP, LangGraph, Hermes, CrewAI, conversation-extraction, migration) can now stamp its own identifying label, enabling proper per-writer attribution in recall output instead of everything collapsing into a few generic values. See [Remember](/api-reference/data/remember).

  ### Bug Fixes

  #### Multi-type recall returned nothing

  * **Requesting more than one memory type built a query** like `"#memory_type:fact #memory_type:preference"`, which Moorcheh's keyword syntax treats as an AND filter that no single document can satisfy — so multi-type recall silently returned zero results. Fixed to issue one query per type and union the results (now parallelized for latency).

  #### Session storage hardening

  * **Session/secret files** (which hold live bearer tokens) are now created with `0o700`/`0o600` permissions, symlinks are skipped rather than followed, and writes go through an atomic `O_EXCL` temp-file + `os.replace` pattern instead of writing in place.
  * **Session lifecycle locks are now scoped per-agent** (was a single global lock), renewal is serialized against termination, concurrent auto-renewal races are fixed, and external session-marker races are tolerated instead of raising.
  * **Windows-specific**: non-blocking lock retry via `msvcrt`, plus handling for additional `OSError` cases during session loading with improved error logging.
  * **Sessions are now preserved across interrupted writes** instead of being left corrupted mid-write.

  #### Temporal recall correctness

  * **`search_as_of` (point-in-time recall)** now correctly recalls memories that were valid at the queried time but have since expired — it previously delegated to a helper that always filtered by *current* wall-clock time.
  * **As-of deduplication is now version-aware**: a delete-and-recreate update that briefly exposes both the old and new document with the same id no longer causes the wrong version to win against `created_before`.
  * **Date-only `as_of` cutoffs** (e.g. `"2026-06-01"`) are now detected by parsing instead of string shape, fixing rejection of valid ISO-8601 basic format dates; date-only end-of-day bounds now correctly keep the final sub-second of the day instead of dropping it.
  * **"Yesterday" temporal recall** is now bounded to that calendar day instead of a rolling 24h window.
  * **`expires_at` values stored as `datetime`** (not just ISO strings) are now handled correctly in the as-of expiry path.

  #### Multi-line memory title corruption

  * **A title containing a newline broke** the `"[TYPE] title\n\ncontent"` document round-trip — the reader's prefix regex couldn't cross the embedded newline, corrupting the parsed title/content split, and each subsequent update compounded another `"[TYPE] "` prefix onto the title until it exceeded the 100-character limit and update started failing permanently. Fixed with a partition-based parser that handles embedded newlines correctly, plus newline normalization at write time.

  #### `source_ref` dropped from recall responses

  * **`source_ref` is now preserved end-to-end** in recall API responses instead of being silently dropped.

  #### MCP integration repairs

  * **Fixed `remember`, `list_agents`, `answer`, and `recall` MCP tools** that had regressed; automatic agent creation is now restricted to avoid unexpected agent proliferation; each agent now gets an isolated session client initialized independently (was a shared/serial init path).

  #### LangGraph store fixes

  * **Repeated `put()` calls to the same key** now correctly upsert (including under concurrent writers) instead of duplicating; removed a local lock-striping scheme and rate-limit fallback that masked real errors.

  #### Config / metadata persistence made crash-safe

  * **Config writes and local agent-metadata writes are now atomic**; a corrupt local agent metadata file is treated as absent instead of breaking agent listing, and surfaces as a warning in the list payload; `connect` no longer duplicates global instruction paths; export caches are now isolated per backend (cloud vs on-prem) instead of bleeding into each other.
  * **`memanto memory sync`** now refreshes the export before syncing to a project (and reports the refreshed count) instead of syncing a stale cache.

  #### Claude Code integration: turn anchoring and negation

  * **The `Stop` hook now distills only the current conversation turn** instead of re-processing prior turns; turn anchoring and embedding-query bounds hardened, including bounding daily-summary embedding queries.
  * **Negated preferences** (e.g. "I don't like Python") are now classified as preferences instead of misfiled as instructions.

  #### Other fixes

  * **The Web UI's answer panel** now calls the `answer` function directly through the client rather than an intermediate path that had drifted out of sync.
  * **VoltAgent `defaultLimit`** is now validated at tool-construction time instead of failing later at call time.
  * **On-prem**: adapted to the reorganized package layout shipped in `moorcheh-client` 0.1.5.

  ### Tests

  * **New** `tests/test_as_of_date_only_parsing.py`, `tests/test_as_of_expired_recall.py`, `tests/test_memory_read_multi_type.py`, `tests/test_session_summary_concurrency.py`, `tests/test_postcommit_summary_resilience.py`, `tests/test_title_newline_roundtrip.py`, `tests/test_moorcheh_user_config_compat.py`, `tests/test_daily_summary_query_length.py`, `tests/test_review_followups.py`.
  * **Large expansion** of `tests/test_unit.py`, `tests/test_api.py`, and MCP/LangGraph integration test suites covering every fix above.
</Update>

<Update label="Version 0.2.12" description="Released July 29, 2026">
  <Note>
    A large batch of validation and correctness fixes across config management, `memanto connect`/skill install, MCP session isolation, and the LangGraph/Hermes/CrewAI integrations. (`v0.2.11` was superseded by this release and is skipped.)
  </Note>

  ### Improvements

  #### Config validation hardening

  * **Server URLs are normalized and ports validated** before being written to config; session/answer config edits are validated against their schema; config setters now guard against malformed config sections instead of crashing.
  * **Schedule times are validated** (format + range) before a scheduled job is enabled, both via the CLI and the UI — invalid times now return `400` instead of silently accepting garbage.

  #### Moorcheh client cache invalidation

  * **`MoorchehClientSingleton` now tracks the config it was built from** (backend, URL, timeout / API key) and rebuilds the cached client when that config changes, instead of serving a stale client after a backend or API-key switch.

  #### Avoid storage writes during service initialization

  * **`SessionService`/`AgentService`** no longer eagerly create directories or generate a secret key at construction time; both are now lazy (created/generated on first actual use).

  #### `memanto connect` / skill install correctness

  * **Fixed false-positive shared-skill detection** that could report a skill as installed for one agent when it was actually another agent's install.
  * **`connect --disconnect` now preserves unmanaged rule files** (including non-UTF-8 ones) instead of deleting content Memanto didn't add, and cleans up the `SessionStart` hook entry and any permissions Memanto added — not just the instruction file and skill. See [`memanto connect remove`](/cli/connect/remove).
  * **Hook-cleanup matching** (used when disconnecting) tightened to avoid removing unrelated hook entries.

  #### Agent list namespace counts hardened

  * **`list agents` now guards against malformed/missing** `item_count` or `namespace_name` fields in the Moorcheh namespaces response instead of raising.

  #### MCP integration: per-agent session isolation

  * **Concurrent MCP tool calls for different agent IDs** no longer share one `SdkClient` session — each agent gets its own isolated, cached client, with batch payload validation happening before any readiness side effects and newly created scoped clients only cached once activation actually succeeds.
  * **MCP `batch_remember`** now guards against and normalizes malformed item results instead of propagating a bad shape.

  #### LangGraph integration fixes

  * **Non-string content values are stringified** before being written to the store (previously could raise). `min_confidence` search filtering fixed. Setup now retries after an activation failure instead of getting stuck. Input limits enforced on `remember`.

  #### Hermes / CrewAI integration fixes

  * **Fixed agent-id truncation collisions in Hermes** (two different agent IDs could truncate to the same internal id). Hermes memory-mirror writes on exit are now non-blocking. CrewAI `remember` now enforces the same input length limits as the core API.

  #### Memory validation / parsing hardening

  * **Fixed the ambiguity guard being systemically bypassed** by common auxiliary verbs (`is`/`are`/`was`/`were`) matching `STRONG_FACT_PATTERNS`.
  * **Memory type is now schema-validated on write** instead of accepted as any string; `SourceType` validation is strict and rate-limiting now fails closed on error instead of open.
  * **Tags and source labels are now length-bounded** before storage (applies to both `remember` and memory edits).
  * **Fail-fast on malformed storage responses** in the core write path, `memanto migrate`, and MCP `batch_remember`.

  #### Timestamp formatting fix

  * **Epoch-integer timestamps are now coerced to ISO strings** during memory-read formatting instead of being returned as raw ints, which broke downstream date parsing.

  ### Tests

  * **New** `tests/test_connect_engine.py`, `tests/test_connect_detection.py`, `tests/test_config_manager_setters.py`, `tests/test_schedule_time_validation.py`, `integrations/mcp/tests/test_lifecycle.py`.
  * **Large expansion** of `tests/test_api.py`, `tests/test_backend.py`, `tests/test_unit.py`, and per-integration test suites covering every fix above.
</Update>

<Update label="Version 0.2.10" description="Released July 23, 2026">
  ### Bug Fixes

  #### Agent list crash on mixed timestamps

  * **Older agent JSON files stored `created_at`/`last_session` without a timezone** (e.g. `2026-04-29T03:43:11.497100`), while newer records use UTC-aware values (e.g. `2026-07-23T12:47:43.431783Z`). Sorting agents by `created_at` then raised `can't compare offset-naive and offset-aware datetimes`, so `memanto agent list` — and [List Agents](/api-reference/agents/list-agents) — failed entirely once both kinds of record existed on disk.
  * **`AgentInfo` now normalizes `created_at` and `last_session`** to UTC-aware via a Pydantic validator on load, and agent listing sorts using the normalized value, so legacy and new metadata coexist safely.
</Update>

<Update label="Version 0.2.9" description="Released July 22, 2026">
  ### New Features

  #### OKF in the Web UI

  * **The Migrate tab now supports importing an OKF bundle** directly from the dashboard, alongside Mem0/Letta/Supermemory. See [OKF Integration](/integrations/okf).

  ### Bug Fixes

  #### Content silently wiped by a false-positive "Tags:" match

  * **The wire-format parser split stored memory text on every blank-line-separated chunk** and dropped any chunk starting with `"Tags: "` — so content that legitimately began a paragraph with the literal text `"Tags: "` was silently deleted on read. Parsing now partitions strictly into title/content, and only strips a trailing tags block when the record actually has tags and the last blank-line-delimited segment starts with `"Tags: "`.

  #### Temporal filter fail-open

  * **A silent-fail path in temporal filtering** could fall through to returning unfiltered results instead of the intended filtered set; fixed to fail closed.

  #### Phantom session summaries from failed writes

  * **`remember`/`batch-remember` logged a memory to the local session Markdown summary** regardless of whether the underlying Moorcheh write actually succeeded. A new shared `is_successful_write_result()` helper gates summary logging (and batch per-item reporting) on a real success status (`queued`/`success`/`ok`), so a failed write no longer produces a phantom entry in the session log.
  * **Batch upload status now fails closed on unrecognized values** — previously any non-empty status from Moorcheh was treated as ambiguous; now only `queued`/`success`/`ok` count as successful and anything else is explicitly marked `"failed"` with the returned status recorded as the error.

  #### Timestamp / TTL invariant violations

  * **`created_at`/`updated_at` are now normalized to UTC-aware**, clamped to "now" if a caller-supplied value is in the future, and `created_at` is forced to never exceed `updated_at` — closing cases where a bad/aware timestamp from an import or manual edit could produce a memory that looks "created after it was updated" or timestamped in the future.
  * **`expires_at` is now always serialized as an ISO string** on the outgoing document instead of relying on the object's default `str()`.
  * **Pagination offset and aware-datetime comparison bugs** in session listing fixed as part of the same batch.

  #### Tags, metadata, and provenance preservation

  * **Consolidates four related fixes**: Hermes agents no longer strip tags on read; the `memanto recall` CLI display now shows tags/provenance correctly; [LangGraph](/integrations/langgraph)'s `MemantoStore` normalizes tags consistently (including a fix for comma-containing tag keys and preserving wildcard tag filters); and a trailing-`"Tags:"` suffix leak in read formatting is fixed.
  * **MCP `batch_remember` tool** now normalizes tags before sending.

  #### Streaming uploads

  * **TypeScript SDK file uploads** are now streamed via a multipart `Readable` generator instead of buffering the whole file in memory.
  * **The Claude Code integration's transcript reader** now streams the JSONL transcript line-by-line (bounded deque tail) instead of requiring `readlines()` to materialize the entire file — matters for long-running Claude Code sessions with large transcripts. Read failures during transcript parsing are now logged instead of silently swallowed.

  #### Export limit validation

  * **`limit_per_type` for `memanto memory export`** is now validated (integer, `1`–`100`) before querying every memory type, instead of failing deep inside the export loop on a bad value.

  #### UI date formatting

  * **Fixed a date-format bug** in the Memory Explorer.

  ### Tests

  * **New** `tests/test_memory_format.py` covering the tags/content parsing fixes.
  * **New** `tests/test_memory_read_confidence.py` additions, plus expanded `tests/test_api.py`, `tests/test_cli.py`, `tests/test_unit.py` for timestamp/TTL invariants, export-limit validation, and write-status gating.
  * **New/expanded** test coverage in `integrations/{langgraph,mcp,hermes-agents,claudecode}/tests/`.
</Update>

<Update label="Version 0.2.8" description="Released July 17, 2026">
  ### New Features

  #### OKF (Open Knowledge Format) export / migrate / sync

  * **New `--okf` flag** on `memanto memory export` / `memanto memory sync` writes an [Open Knowledge Format](/integrations/okf) v0.1 bundle instead of the default Markdown output — one file per memory (or a stacked file per type once a type exceeds a size threshold), YAML frontmatter, grouped by memory type.
  * **Memanto-only fields** (id, confidence, provenance, source, status) are preserved under a namespaced `x_memanto` frontmatter block so Memanto → OKF → Memanto round-trips are lossless; other OKF consumers ignore the unknown keys.
  * **`memanto migrate` gains an OKF source**: `memanto migrate <agent> --okf <path>` imports an OKF bundle back into an agent, alongside the existing Mem0/Letta/Supermemory sources.

  #### VoltAgent TypeScript SDK integration

  * **New [`@moorcheh-ai/memanto/voltagent`](/integrations/voltagent) integration**, mirroring the existing Vercel AI SDK / Mastra / OpenAI integrations, with its own test suite and dependency wiring.

  ### Improvements

  #### Temporal recall correctness

  * **Tag filters are now actually applied** on `recall`, `recall/as-of`, `recall/changed-since`, and `recall/recent` — `tags` was accepted in the request body but silently dropped on the temporal endpoints.
  * **Date-only `as-of` queries** (e.g. `2026-06-01`) now include the full day instead of being treated as midnight.
  * **Malformed/unparseable timestamps** are now skipped instead of raising during temporal filtering.
  * **`changed-since` sorting** no longer breaks on memories with a null `updated_at`.
  * **Delete-and-recreate updates** that briefly expose both the old and new document under the same id now resolve to the newest version by timestamp (previously could return the stale duplicate).
  * **The candidate pool fetched from Moorcheh is widened** when post-retrieval filters (tags, type, temporal bounds) are active, so filtering no longer starves the result set below the requested limit.
  * **Temporal recall limits are validated before hitting the backend** and capped to sane defaults; boolean and non-positive limits are rejected; duplicate recall-limit validation logic was consolidated into one shared helper.
  * **Session expiry** now handles timezone-aware expiry timestamps consistently, fixing spurious "session expired" states.

  #### LangGraph integration

  * **Refined `recall`/`remember` node behavior** with expanded test coverage.

  ### Tests

  * **New** `tests/test_okf.py`, `tests/test_memory_read_as_of.py`, `tests/test_memory_read_temporal_recall.py`, plus expanded coverage across `tests/test_temporal_helpers.py`, `tests/test_api.py`, `tests/test_cli.py`, and `tests/test_unit.py` for every temporal-recall fix above and OKF round-tripping.
</Update>

<Update label="Version 0.2.7" description="Released July 14, 2026">
  <Warning>
    This release requires authorization on agent-lifecycle endpoints (create/list/get/delete/activate/deactivate an agent, and `/status`) for the first time. If you call these from outside `localhost`, attach `Authorization: Bearer <key>` or `X-Api-Key`. See [Management Endpoint Authentication](/api-reference/authentication#management-endpoint-authentication-agent-lifecycle).
  </Warning>

  ### New Features

  #### TypeScript SDK framework integrations

  * **Three new framework integrations** ship as part of `@moorcheh-ai/memanto`, each behind its own subpath import: [`@moorcheh-ai/memanto/ai-sdk`](/integrations/vercel-ai-sdk) (Vercel AI SDK), [`@moorcheh-ai/memanto/mastra`](/integrations/mastra) (Mastra), and [`@moorcheh-ai/memanto/openai`](/integrations/openai) (OpenAI Node SDK).
  * **Each exposes `recallMemory` / `rememberMemory` / `answerMemory` tools** backed by the same `Memanto` client, with a shared `MEMORY_TYPES` export so the model can only emit valid memory types.
  * **Framework packages are optional peer dependencies** (`ai`, `@mastra/core`, `openai`, plus `zod`) — install only the ones you use. Node engine requirement bumped to `>=20`.

  ### Security

  #### Management auth required for agent-lifecycle endpoints

  * **`POST /agents`, `GET /agents`, `GET /agents/{agent_id}`, `DELETE /agents/{agent_id}`, `POST /agents/{agent_id}/activate`, `POST /agents/{agent_id}/deactivate`, and `GET /status`** previously only checked that the *server* had a configured `MOORCHEH_API_KEY`, not that the *caller* was authorized — with the default `HOST=0.0.0.0` bind, any network peer could create agents, activate sessions, and obtain session tokens.
  * **These endpoints now require** either a matching management credential (`Authorization: Bearer <key>` or `X-Api-Key`) or a loopback client origin.

  #### Recall filter-token injection guard

  * **`memory_type`, `tag`, `status`, and metadata key/value filters** passed to Moorcheh's keyword query syntax are now validated against a strict token pattern before being interpolated, preventing query-syntax injection via crafted filter values.

  #### Unique on-prem upload staging paths

  * **Uploaded files on the on-prem backend** are now staged under a UUID-suffixed filename instead of the original name, preventing same-named concurrent uploads from colliding with each other's staged file.

  ### Improvements

  #### On-prem restart and session-end no longer block the event loop

  * **`restart_onprem_backend`** previously ran blocking subprocess and HTTP calls directly inside an `async def`, freezing the entire API for the whole restart window (up to several minutes). It's now fully async, and the restart itself runs as a cancellation-safe background task so a client timeout can no longer interleave concurrent restarts against the same on-prem stack.

  #### Batch upload status normalization

  * **Batch memory writes** now count `"ok"` (in addition to `"queued"`/`"success"`) as a successful per-item status, and count `"failed"` case-insensitively — on-prem batch uploads were previously miscounted as failed despite succeeding.

  #### On-prem answer model omission

  * **Conversation extraction** now omits `ai_model` when no on-prem LLM is configured, letting the server pick its own default instead of erroring — matching the existing `answer` endpoint behavior.

  #### `memanto export` / `memanto memory sync` no longer overwrite a good cache on backend outage

  * **`memanto memory export`** previously swallowed every per-type recall failure into an empty list and wrote it unconditionally — during a full backend outage this silently wiped the cached export (and, via `memanto memory sync`, the project's `MEMORY.md`) even though nothing was actually forgotten. It now fails loudly instead when *every* memory type fails to recall (a genuine "no memories of this type" still exports fine).
  * **`memanto memory sync`** falls back to the previous export when a refresh fails and a prior export exists, instead of wiping `MEMORY.md`.

  #### Memory-update metadata handling

  * **`memanto edit`** now preserves extra metadata fields from the existing record (e.g. on-prem `original_id`) that aren't part of the standard memory schema — but explicitly excludes the trust fields removed on 2026-06-29 (`superseded_by`, `supersedes`, `validated_at`, `validation_count`, `contradiction_detected`) so old on-prem records don't resurrect dead schema on update.

  ### Tests

  * **New** `tests/test_memory_read_filter_sanitization.py` and `tests/test_export_resilience.py`, plus expanded `tests/test_backend.py`, `tests/test_unit.py`, and `tests/test_api.py` covering the filter-injection guard, stale-cache export fallback, batch upload status normalization, and trust-field exclusion on update.
  * **New** `sdks/typescript/test/integrations/*.test.ts` for the three new SDK integrations.
</Update>

<Update label="Version 0.2.6" description="Released July 9, 2026">
  <Warning>
    This release is also about **security hardening pass** on top of `v0.2.5`. Upgrading is strongly recommended.
  </Warning>

  ### Security

  #### Session cookie hardening

  * **Browser UI sessions** now use an `HttpOnly`, `SameSite=Strict` cookie (`memanto_session_token`) instead of JS-readable token storage, via new `set_session_cookie()` / `clear_session_cookie()` helpers.
  * **The cookie's `Secure` flag is now set dynamically** from the actual request scheme (`Secure` only over HTTPS) rather than hardcoded — Memanto defaults to plain HTTP (`0.0.0.0`, no built-in TLS), so a hardcoded `Secure=True` would have silently stopped browsers from ever sending the cookie back in that default deployment. See [Cookie-Based Authentication](/api-reference/authentication#cookie-based-authentication-browser-web-ui-clients).
  * **Session renewal now correctly updates the cookie** with the new token on the response — previously a renewed session invalidated the old token without refreshing the cookie, breaking the very next request.

  #### Streaming file uploads

  * **`upload_file` previously buffered the entire file in memory** before writing to disk; for the documented 5 GB max, concurrent large uploads could trivially exhaust server RAM. Uploads are now streamed to disk in 1 MB chunks with the 5 GB cap enforced **during** the stream (`413` if exceeded), not after full buffering.
  * **The chunk write itself is now dispatched via `asyncio.to_thread`** so large uploads no longer block the event loop on synchronous disk I/O.

  #### Blank/invalid input rejected across API and CLI

  * **`answer`/`recall` queries, conversation-extraction messages, and CLI batch memory content** now reject blank/whitespace-only strings via Pydantic validators instead of silently accepting empty input.
  * **`remember` provenance values and `recall` memory-type filters** are now validated against the allowed enum values instead of passed through unchecked.

  #### Session cleared when deleting the active agent

  * **Deleting an agent now also deletes its persisted session state**, so a saved session token for a deleted agent can no longer be replayed via `X-Session-Token`.

  #### TypeScript SDK: URL-encode agent/memory IDs

  * **All REST paths built from `agentId`/`memoryId`** now run through `encodeURIComponent()`, preventing malformed requests or path injection when an ID contains special characters.

  ### Improvements

  #### Timestamp normalization for imports

  * **Imported memory timestamps** (e.g. from `memanto migrate`) are now preserved as source chronology while being normalized to UTC-naive values for downstream confidence calculations, via a shared `as_utc_naive()` helper (deduplicated out of `memory_write_service` into `temporal_helpers`).
  * **Session-listing sort and session comparisons** now normalize datetimes consistently before comparing, avoiding naive/aware `datetime` comparison errors.

  #### Error handling

  * **`map_error_to_http_exception`** now passes an existing `HTTPException` through unchanged instead of re-wrapping it (e.g. avoids turning a `413` upload-too-large into a generic `500`).

  #### TypeScript SDK fixes

  * **Fixed `status()` session bootstrap** so a session established outside the constructor is recognized correctly.
  * **Fixed a file-size fallback bug** in the upload path.

  ### Tests

  * **Large expansion** of `tests/test_api.py`, `tests/test_cli.py`, and `tests/test_unit.py` covering session-cookie renewal (including the HTTP-vs-HTTPS `Secure` flag behavior), streaming upload limits, blank-input validators, provenance/type validation, session deletion on agent removal, and timestamp normalization.
  * **Expanded `sdks/typescript/test/memanto.test.ts`** for agent-ID encoding and session bootstrap behavior.
</Update>

<Update label="Version 0.2.5" description="Released July 6, 2026">
  <Warning>
    This release is a **major security hardening pass** across the API, CLI, and Web UI. Upgrading is strongly recommended.
  </Warning>

  ### Security

  #### Path traversal via `agent_id` / `session_id` / dates

  * **Unsanitized `agent_id` / `session_id` values** were concatenated directly into `pathlib.Path` expressions (e.g. `sessions_dir / f"{agent_id}.json"`), letting a caller escape the storage directory with input like `"../../etc/passwd"`. All filesystem call-sites now run through `validate_safe_id()`.
  * **Extended the same guard** to `memory_export_service`, `daily_analysis_service` (including the date parameter used in glob patterns and JSON output paths), and the `--output-path` CLI flag (anchored to a base dir via `relative_to()` containment checks).

  #### CORS reflected-origin credential exposure

  * **Default `ALLOWED_ORIGINS=["*"]`** combined with `allow_credentials=True` caused Starlette to mirror any request `Origin` back in `Access-Control-Allow-Origin` while also sending `Access-Control-Allow-Credentials: true` — letting any website make credentialed cross-origin requests to the Memanto API.
  * **Fixed** to stop mirroring arbitrary origins when credentials are allowed.

  #### Sensitive Web UI endpoints gated to localhost-only

  * **`POST /api/ui/shutdown`, `GET /api/ui/browse`, `PATCH /api/ui/config`, `PUT /api/ui/api-key`, `POST /api/ui/onprem/restart`**, plus the connections and migrate endpoints, were reachable from any network host with no authentication (remote DoS, arbitrary file listing, config/API-key overwrite).
  * **Added a `_require_local()` dependency** that returns 403 for any caller that isn't `127.0.0.1` / `::1` (including IPv4-mapped IPv6 loopback), and blocked glob-pattern injection in the browse endpoint.

  #### Unpredictable session secret

  * **Removed the hardcoded default JWT signing secret** (`"memanto-default-secret-change-in-production"`).
  * When `MEMANTO_SECRET_KEY` isn't set, a per-instance random secret is now generated (`secrets.token_hex(32)`) and persisted locally instead of falling back to a publicly-known constant.

  #### Session token lifecycle hardening

  * **Deactivated/terminated session tokens** are now rejected outright (401) instead of continuing to authorize writes.
  * **Cross-agent session/agent mismatches** now consistently raise `AuthorizationError` → HTTP 403 (was a generic 500) across all session-scoped endpoints.
  * **CLI clients** now validate cached sessions before reuse instead of trusting a stale cached token.
  * **TypeScript SDK** resets its local session state after `deleteAgent()`.

  ### Improvements

  #### Legacy scope model collapsed to `agent_id`

  * **Removed the `scope_type` / `scope_id` pair** (and the underlying `MemoryScope` / namespace-parsing machinery) in favor of a single `agent_id` field; namespaces are now built by one free function (`agent_namespace(agent_id)`).
  * **Dead code** from this and prior cleanups moved to `memanto/app/legacy/` (excluded from CI lint/type-check).
  * **Removed orphaned "trust" fields** that were never populated by any live write/read path (`superseded_by`, `validation_count`, `contradiction_detected`, etc.) and the unused `ValidationPolicy` class.

  #### Confidence filtering bug fix

  * **Numeric `min_confidence` filtering** in memory search previously relied on Moorcheh keyword syntax that never matched; it's now applied as a post-filter on the numeric `confidence` field, fixing a zero-threshold edge case that silently returned nothing.

  #### Manual conflict resolution validation

  * **`ConflictResolveRequest`** now requires non-empty `manual_content` when `action == "manual"`, both on the API and in the UI (blank submissions show a warning toast and refocus the textarea).

  #### Timestamp normalization

  * **Parsed ISO timestamps** are now consistently normalized to UTC, whether the input has an explicit offset or is naive.

  #### CLI: honor custom title for short memories

  * **`memanto remember`** no longer overrides an explicit `--title` with an auto-truncated content snippet when the memory content is short.

  #### Memory deletion response handling

  * **Tightened success/failure detection** for memory deletion and update-then-delete flows so partial or malformed backend responses aren't reported as success.

  #### TypeScript SDK & CI

  * **Updated dependencies**, CI workflow permissions, regenerated `openapi.json`, and added an npm publishing workflow (`.github/workflows/publish.yml`).

  ### Tests

  * **New** `tests/test_cors_fix.py`, `tests/test_output_path_traversal.py`, `tests/test_ui_auth.py`, `tests/test_remaining_ui_auth.py` covering the CORS, path-traversal, and localhost-gating fixes.
  * **New** `tests/test_memory_read_confidence.py` and `tests/test_temporal_helpers.py`.
  * **Expanded** `tests/test_api.py`, `tests/test_cli.py`, `tests/test_unit.py` for session-secret generation, inactive-token rejection, and deletion handling.
</Update>

<Update label="Version 0.2.4" description="Released June 26, 2026">
  ### New Features

  #### TypeScript SDK (`sdks/typescript/`)

  * **New `@moorcheh-ai/memanto` npm package** — a fully-typed client generated from the API's OpenAPI spec (`openapi-ts`), covering agents, sessions, remember, recall, answer, upload, and the extract/edit endpoints.
  * **Lifecycle helpers** (`src/lifecycle.ts`) for session start/stop memory flows, plus a `doctor` command (`src/doctor.ts`) for config/connectivity checks.
  * **All recently-added API features** exposed as first-class SDK methods.
  * **CI workflow** `.github/workflows/sdk-typescript.yml` builds, tests (Vitest), and publishes the package; full test suite (`memanto.test.ts`, `lifecycle.test.ts`, `doctor.test.ts`).
  * See the [TypeScript SDK reference](/sdk/typescript) for the full method list.

  #### `memanto edit` command and PATCH endpoint

  * **New `PATCH /{agent_id}/memories/{memory_id}` endpoint** with `MemoryEditRequest` for partial in-place updates.
  * **CLI `memanto edit <memory_id>`** with `--title`, `--content`, `--type`, `--confidence`, `--tags`, `--source` options (at least one required).
  * **Field validation** on both the API and direct-client paths: non-empty content with length limits, confidence range 0.0–1.0, and valid memory-type membership — matching the create-endpoint contract.
  * See [`memanto edit`](/cli/data/edit) and [Edit Memory](/api-reference/data/edit-memory).

  #### v2 memory route response models

  * **Explicit Pydantic `response_model` schemas** added to the v2 memory routes, giving typed/validated responses and accurate OpenAPI documentation (which in turn feeds the TypeScript SDK codegen).

  ### Improvements

  #### Local metadata logging

  * **Session service** now logs memory metadata locally alongside the memory write, keeping the local session summary in sync with stored memories.

  ### Security

  #### Cross-agent authorization returns 403

  * **All 12 agent-scoped endpoints** now return HTTP 403 (not 500) when a session's `agent_id` doesn't match the URL's `agent_id`, correctly signaling an authorization failure instead of a server error.

  #### Upload path-traversal fixed (CWE-22)

  * **Uploaded filenames** are stripped to their basename (`Path.name`) with a defense-in-depth realpath check, preventing a crafted filename (e.g. `../../../etc/cron.d/backdoor.txt`) from escaping the temp directory.

  #### Secrets removed from UI config endpoint

  * **`GET /api/ui/config`** no longer returns the plaintext Moorcheh API key or session JWT; only safe metadata (`api_key_configured`, `api_key_preview`) remains, closing an unauthenticated secret-disclosure path.

  ### Tests

  * **Expanded `tests/test_api.py` and `tests/test_cli.py`** for the edit endpoint, v2 response models, the 403 scope guard, and filename sanitization.
  * **New TypeScript test suites** under `sdks/typescript/test/`.
</Update>

<Update label="Version 0.2.3" description="Released June 22, 2026">
  ### New Features

  #### Conversation memory extraction

  * **New `POST /{agent_id}/remember/extract` endpoint** that distills chat-style conversation turns into typed memory candidates, using the same Moorcheh answer-generation path as the RAG `answer` endpoint.
  * **Candidates are auto-classified** into valid memory types, de-duplicated, confidence-scored, and tagged `conversation-extract`; secrets, API keys, and tokens are explicitly excluded by the extraction prompt.
  * **`dry_run`** returns candidates without persisting; otherwise they're written through the standard `batch_remember` path and logged to the session summary.
  * **New `ExtractMemoriesRequest` / `ConversationMessage` models** with bounded limits (≤200 messages, ≤100 memories, 12k-char cap).
  * **CLI `memanto remember --from-conversation <path|->`** reads a JSON message array from a file or stdin, with `--dry-run`, `--max-memories`, and `--ai-model` flags, and renders each extracted candidate as a panel.
  * **SDK and direct clients** gain `extract_memories_from_conversation()`.

  ### Improvements

  #### Provenance metadata in recall

  * **`recall` output now displays `Source`, `Ref`, and `Provenance`** for each memory (in addition to tags), unifying file-upload source names and origin (user / agent / tool) into one consistent block.
  * **MCP `MemoryHit` model extended** with `status`, `source`, `source_ref`, and `provenance` fields so MCP clients receive full memory metadata.
  * **Web UI memory cards** surface the same source / provenance metadata.

  ### Tests

  * **New `tests/test_conversation_memory_extraction.py`** covering extraction, JSON parsing / normalization, validation limits, and dry-run behavior.
  * **Expanded `tests/test_api.py` and `tests/test_cli.py`** for the extract endpoint and `--from-conversation` CLI flow.
</Update>

<Update label="Version 0.2.1" description="Released June 16, 2026">
  ### New Features

  #### `memanto migrate` command suite

  * **Replaces the old `analyze` command** with a full migration workflow: export a provider's data (Mem0, Letta, Supermemory), map each source row onto Memanto memory types (auto-classified via the rule-based parser), bulk-write via `batch_remember` (100 items/request), and optionally generate a storage/token/latency savings report — all in one command.
  * **Provider metadata** (scope IDs, confidence scores, hashes) is preserved in a bounded `[Supporting data]` footer so nothing is lost; original `created_at` / `source` / `source_ref` map naturally onto the schema.
  * **`--dry-run`** previews the mapping (types, confidence, tags) without writing. **`--report`** generates the Markdown comparison on real runs. Outputs live in `~/.memanto/migrate/<provider>/<timestamp>/` (separate from legacy `analyze/` artifacts).
  * **Works on both cloud and on-prem backends**; on-prem `batch_remember` respects the same chunking.

  #### `memanto forget` command and REST endpoint

  * **New `DELETE /{agent_id}/memories/{memory_id}` endpoint** for single-memory deletion. Checks session scope (the session must own the agent) and removes the memory from Moorcheh.
  * **CLI `memanto forget <memory_id>`** for quick terminal deletion.
  * **UI Delete button** on each memory card in the Memory Explorer.

  ### Improvements

  #### On-prem backend enhancements

  * **Session namespace creation** now reuses an existing namespace on-prem instead of erroring when the namespace already exists (idempotent namespace setup).
  * **On-prem `forget` error messages** are now clear and actionable (differentiate "memory not found" from "namespace issue").
  * **On-prem threshold boundary checks** fixed (no off-by-one on min-similarity validation).

  #### Mapper robustness

  * **Mappers now extract all available info** from source exports, including less-common fields like interaction hashes, scope IDs, and custom metadata, preserving them in the `[Supporting data]` footer for compliance and audit trails.

  #### Migrate + on-prem API key handling

  * **The migrate command** correctly propagates the API key dependency for the on-prem backend (no double-init of the backend client).

  ### Tests

  * **New `tests/test_cli.py`** coverage for the `migrate` and `forget` commands (dry-run, report generation, single-memory delete flow).
  * **New `tests/test_unit.py`** coverage for mappers (all three providers) and session namespace idempotency.
  * **Integration tests** expanded across CrewAI and LangGraph tooling.
</Update>

<Update label="Version 0.2.0" description="Released June 10, 2026">
  ### New Features

  #### On-prem Moorcheh backend

  * **New `MEMANTO_BACKEND` setting** (`cloud` | `on-prem`) routes every call through a backend-aware dispatcher that exposes the same `namespaces` / `documents` / `similarity_search` / `answer` / `files` / `vectors` shape regardless of target — service code never branches.
  * **First-run wizard** now asks **Cloud vs On-Prem**; on-prem path installs `moorcheh-client>=0.1.3`, prompts for embedding + LLM provider (`ollama` / `openai` / `cohere`), persists choices to `~/.memanto/on-prem/state.json`, writes the full LLM block to `~/.moorcheh/config.json` before `moorcheh up`, then pulls Ollama models into the container.
  * **On-prem data lives under `~/.memanto/on-prem/`** (sessions, agents, summaries) so cloud and on-prem never share local state; switching backends clears the active session.
  * **New `memanto config backend [cloud|on-prem]` CLI command** for runtime switching, plus `Backend`, `MOORCHEH_ONPREM_URL` (default `http://localhost:8080`) and `MOORCHEH_ONPREM_TIMEOUT` (default `300`) rows in `memanto config show`.
  * **Health check, startup validation, and the agent delete flow** are all backend-aware.

  #### `memanto detect-conflicts` + scheduled job split

  * **Conflict detection split out of daily-summary** into its own command, `POST /{agent_id}/conflicts/generate` REST endpoint, and `DirectClient.generate_conflict_report()` method.
  * **New hidden `memanto schedule _run` entrypoint** executes daily-summary + detect-conflicts back-to-back; OS scheduler now points at it. On-prem backend short-circuits with a clear error (scheduled job depends on cloud-only LLM Answer).
  * **`daily_summary_service.py` renamed** → `daily_analysis_service.py`.

  #### UI: Connect tab, memory timeline, daily summary, file pagination

  * **Connect tab** installs/removes Memanto skills into any registered agent (Claude Code, Cursor, etc.) via the underlying `install_agent` / `remove_agent` engine, with a `connections.json` registry tracking project-local vs global installs.
  * **Memory History page** with a vertical timeline of every change (created, updated, conflict resolved) per memory.
  * **Daily summary + Unreviewed conflicts widget** surfaced on the dashboard (Daily Summary tab renders the generated MD and shows days with pending conflict review).
  * **Answer panel is backend-aware** — on-prem shows provider/model/api-key only (no cloud-only knobs) and writes to `~/.moorcheh/config.json` without polluting the shared cloud yaml.
  * **Memory Explorer** now use cursor pagination through `documents.fetch_text_data` (`next_token` / `has_more`) instead of being capped at 100 items per namespace.

  ### Improvements

  #### Backend-aware `recall_*` REST endpoints

  * **`recall_as_of`, `recall_changed_since`, `recall_recent`** and the underlying `MemoryReadService` methods now treat `limit=None` as "fetch all" — the `CostGuard.validate_k_limit` cap is only applied when a limit is explicitly set.
  * **`answer.generate`** calls route through `get_active_llm_model()` so the LLM identifier comes from cloud settings on cloud, `on-prem state.json` on on-prem, with the field omitted entirely when on-prem has no LLM configured (server picks its own default).

  #### Stale active-session handling

  * **`get_active_session()`** now clears the stale active marker and returns `None` when the session has expired, instead of returning an expired `Session`.
  * **All datetimes** flow through a single `utc_now()` helper; Pydantic v1 `Config.json_encoders` blocks removed from session models.

  #### Connect engine ↔ registry sync

  * **`install_agent` / `remove_agent`** now sync their results into `~/.memanto/connections.json` so the UI's Connections page reflects what the CLI did and vice versa.

  ### Tests

  * **New `tests/test_backend.py`** covering cloud/on-prem dispatcher behavior and `get_active_llm_model` fallbacks.
  * **New `tests/test_analyze.py`** covering the Mem0/Letta/Supermemory export + compare + report flow end-to-end with mocked provider responses.
  * **`tests/test_cli.py` and `tests/test_unit.py`** expanded to cover the new `detect-conflicts` / `schedule _run` paths.
</Update>

<Update label="Version 0.1.3" description="Released June 1, 2026">
  ### New Features

  #### Recall similarity threshold

  * **New `recall.min_similarity` setting** (0.0–1.0) in CLI config with validation; default `0.0`.
  * **REST `POST /memories/recall`** and SDK/Direct `recall()` resolve `min_similarity` from the request, then fall back to the config value, then to unset.
  * **CLI flag renamed** `--min-confidence` → `--min-similarity` on `memanto recall`.
  * **`memanto config show`** surfaces the new `Min Similarity` row.

  #### Agents page in the Web UI

  * **New sidebar entry** listing every registered agent with status, pattern, memory and session counts; activate/deactivate from the table.
  * **`GET /api/v2/agents`** and **`GET /api/v2/agents/{agent_id}`** now populate `memory_count` from the **live Moorcheh namespace document count** instead of the stale local metadata value.

  #### File upload in the Playground

  * **New `Upload File` tab** accepts `.pdf`, `.docx`, `.xlsx`, `.json`, `.txt`, `.csv`, `.md` (max 5 GB) and ingests into the active agent's namespace, with client-side size/extension validation.

  #### Fuzzy fallback for auto memory-type parsing

  * **When deterministic rules abstain**, a `rapidfuzz`-backed pass scans tokens against a curated list of long, distinctive keywords per type and picks the best match above `FUZZY_SCORE_CUTOFF = 88.0` — recovering obvious misspellings like *"decded"* → `decision`, *"crahsed"* / *"tracebck"* → `error`.
  * **New runtime dependency:** `rapidfuzz>=3.0.0`.

  #### Smart-parse config switch

  * **New `memanto.cli.smart_parse` setting** in `config.yaml` propagates to the `AUTO_PARSE_ENABLED` env var on startup, letting users toggle auto-parsing without editing code.

  ### Improvements

  #### CrewAI tool schema

  * **`MemantoRecallTool`** now exposes `min_similarity` (0.0–1.0) to the LLM, raises the default `limit` from `5` to `10`, and enforces `ge=1, le=100` via Pydantic instead of a hardcoded `min(limit, 20)` clamp.

  #### UI timestamps & filters

  * **`fmtDate`** appends `Z` to naive UTC timestamps so the browser converts them to the user's locale instead of treating them as local time.
  * **Memory Explorer** gains an `All Sources` filter dropdown; navigation helper `goToPage()` added; favicon shipped.

  #### `memanto connect` agent templates rewritten

  * **Reframed as an "active memory companion"** with five non-negotiable rules (read `MEMORY.md`, search before guessing, store proactively, always pass `--type/--confidence/--provenance/--source`, never keep mental scratchpads).
  * **Adds an operations table** (`recall` vs `answer` vs `remember`), worked `memanto remember` examples per type, full memory-type/provenance/confidence references, and the new temporal flags (`--recent`, `--as-of`, `--changed-since`).
  * **Cursor MDC rules file** mirrors the same content under `alwaysApply: true`.

  ### Tests

  * **New fuzzy-fallback cases** in `tests/test_memory_parsing.py` (typo'd `decision`/`error` detection; confirms no false-fire on unrelated text).
  * **`tests/conftest.py`** resets `settings.AUTO_PARSE_ENABLED = True` before every test so local `smart_parse` config can't leak into the suite.
</Update>

<Update label="Version 0.1.2" description="Released May 25, 2026">
  ### New Features

  #### Configurable rule-based memory parsing

  * **`MemoryParsingService`** (`memory_parsing_service.py`) auto-detects a memory's type at ingestion using score-based classification with priority tie-breaking across all 13 supported types — no more blind default to `fact`.
  * **`MemoryRecord.type` is now optional** (`None`); the parser assigns the type when the caller omits it.
  * **New `AUTO_PARSE_ENABLED` setting** (default `True`).
  * **`remember` and `batch-remember`** run the parser when `type` is omitted and return the resolved `type` in the response.
  * **CLI** — `memanto remember` no longer forces `--type fact`; it displays the parsed type instead.

  #### MCP server integration

  * **The MCP server integration is now available** — it exposes Memanto memory operations to any MCP client. Install it with:
    ```bash theme={null}
    pip install memanto-mcp
    ```
  * See the [Integrations](/integrations/overview) section for setup details.

  #### Hermes Agents integration

  * **The Hermes Agents integration is now available** — a `hermes_memanto` provider for Hermes Agents. Install it with:
    ```bash theme={null}
    pip install hermes-memanto
    ```
  * See the [Integrations](/integrations/overview) section for setup details.

  ### Improvements

  #### Unified content-length cap across layers

  * **SDK/Direct clients** now use `InputLimits.MAX_TEXT_LENGTH` instead of a hardcoded `500`, aligning the cap with the REST/Pydantic models (10,000 chars).
  * **Removed** the unused `MAX_MEMORY_SIZE` / `MAX_TITLE_SIZE` settings.

  #### Chronological `recall --recent`

  * **New `recall_recent()`** on `SdkClient` and `DirectClient` returns the most recently stored memories (newest first).
  * **New `memanto recall --recent` flag** — lists recent memories directly, no search query required (mutually exclusive with `--as-of` / `--changed-since`).

  #### Unified `kiosk_mode` and `threshold` defaults

  * **`kiosk_mode` and `threshold` defaults** now resolve from `config.yaml`.
  * **`threshold`** is only applied when `kiosk_mode` is on; the kiosk-mode fallback threshold is unified to `0.15` across REST and config defaults.

  #### CrewAI integration

  * **Install the CrewAI integration** with:
    ```bash theme={null}
    pip install crewai-memanto
    ```
  * **LLM tool schemas** now enumerate all 13 memory types with definitions to guide classification.
  * See the [Integrations](/integrations/crewai) section for setup details.

  #### Docker

  * **The Docker image can now be pulled directly:**
    ```bash theme={null}
    docker pull moorcheh/memanto:latest
    ```
</Update>

<Update label="Version 0.1.1" description="Released May 12, 2026">
  <Warning>
    This release contains breaking changes to the temporal recall endpoints (`recall_as_of` and `recall_changed_since`). Remove the `query` argument from any existing callers before upgrading.
  </Warning>

  ### Breaking Changes

  #### Temporal endpoints no longer accept a query

  Temporal endpoints now list every memory that falls inside the requested time window instead of running a similarity-matched subset.

  * **API** — `POST /{agent_id}/recall/as-of` and `POST /{agent_id}/recall/changed-since` request bodies dropped the `query` field; response bodies dropped the echoed `query` field.
  * **CLI** — `memanto recall --as-of …` / `--changed-since …` now errors if a `QUERY` argument is also supplied. Remove the query to list all memories for that window.
  * **Python clients** — `recall_as_of()` on `DirectClient` and `SdkClient` no longer take a `query` argument.

  ### Improvements

  #### Temporal retrieval switched to `documents.fetch_text_data`

  * **New `_fetch_all_memories()` helper** (`memory_read_service.py`) paginates through Moorcheh's `fetch_text_data` endpoint across all matched namespaces, applies optional `type`/`tags` filters in-process, deduplicates by ID, and strips summary chunks.
  * **Fewer round trips** — `search_as_of` and `recall_changed_since` use the fetch path instead of iterating `similarity_search.query()` per memory type, returning complete result sets within Moorcheh's 100-item-per-namespace fetch limit.

  #### CrewAI integration as a publishable package

  * **New `memanto-crewai` package (v0.1.0)** in `integrations/crewai/` with `pyproject.toml`, `hatchling` build backend, MIT license, Python `>=3.10`.
  * **Public exports** — `MemantoSetup`, `MemantoRememberTool`, `MemantoRecallTool`, `MemantoAnswerTool`, `create_memanto_tools` from `memanto_crewai`.
</Update>

<Update label="Version 0.1.0" description="Released May 11, 2026">
  <Warning>
    This release contains breaking changes to memory endpoints, session routes, and authentication. Review all breaking changes below before upgrading.
  </Warning>

  ### Breaking Changes

  #### Memory endpoints migrated to POST

  * **`recall`, `answer`, `recall/as-of`, `recall/changed-since`** — now accept JSON request bodies instead of query parameters.
  * **`memory_types` renamed to `type`** — accepts a list of strings across all recall endpoints and CLI recall commands.

  #### Session and auth changes

  * **`/session/current` renamed to `/status`** — requires no session token; reads active session from local state.
  * **`/session/extend` removed** — session extension is no longer supported.
  * **`/sessions` list endpoint removed.**
  * **`Authorization` header dropped for API key** — `MOORCHEH_API_KEY` is read from server config only; `Bearer` header auth is removed.
  * **`X-Session-Token` is the only auth mechanism** for per-request memory operations.

  #### Legacy routes removed

  * **`/api/v1/namespaces`, `/api/v1/memory`, `/api/v2/context`** — moved to `memanto/app/legacy/`.

  ### New Features

  #### Recall and conflict endpoints

  * **`POST /{agent_id}/recall/recent`** — retrieves most recent memories without a query string; replaces `/recall/current`.
  * **`GET /{agent_id}/conflicts`** — lists detected memory contradictions.
  * **`POST /{agent_id}/conflicts/resolve`** — resolves a flagged contradiction.
  * **`DELETE /agents/{agent_id}?delete-backup-too=true`** — optionally wipes the agent's remote Moorcheh namespace on deletion.

  #### Startup validation

  * **Fail-fast API key check** — server validates `MOORCHEH_API_KEY` on startup and refuses to start if missing or authentication fails.

  ### Improvements

  #### Structured request body models

  * **Pydantic models** (`RecallRequest`, `RecallAsOfRequest`, `RecallChangedSinceRequest`, `RecallRecentRequest`) with full field validation and bounds checking.
  * **Smart date defaults** — date-only `as_of` defaults to end-of-day; `since` defaults to start-of-day, so full ISO datetimes are not required for daily windows.

  #### Auth and session service

  * **`get_moorcheh_api_key()`** reads from server config only — no per-request header parsing.
  * **`verify_moorcheh_api_key()`** validates once at startup instead of on every request.
  * **`extend_session()` removed**; `moorcheh_api_key` parameter removed from `create_session()`, `validate_session()`, and `renew_session()`.

  #### Health check

  * **`/health`** no longer requires client dependency injection.
  * **Status reports `"unhealthy"`** (was `"degraded"`) when Moorcheh is unreachable.

  #### CLI

  * **`memanto session extend` removed.**
  * **"Activation" terminology** replaces "session" across `agent create`, `agent activate`, `agent deactivate`, and `memanto status`.
  * **`memanto status` panel renamed** to **Active Agent** (was "Active Session").

  ### UI Fixes

  #### UI shutdown fix

  * **Server stability** — fixed an issue where the API server would unexpectedly shut down when refreshing or closing the browser tab. The server now stays alive unless explicitly stopped or running in specific UI-only modes.

  ### Tests

  * Added `tests/test_e2e.py` with end-to-end API coverage.
</Update>

<Update label="Version 0.0.8" description="Released May 5, 2026">
  ### Improvements

  #### API input validation

  * **Content fields** — `remember`, `recall`, `answer`, `recall/as-of`, `recall/current`, and `recall/changed-since` enforce `min_length=1` on query/content fields and `max_length=500` on `title`.
  * **Numeric bounds** — `confidence`, `min_similarity`, `threshold`, and `temperature` bounded `[0.0, 1.0]`; `limit` enforced `ge=1`.
  * **CostGuard** validators (`validate_text_length`, `validate_query_length`, `validate_k_limit`) applied across all memory read/write endpoints.

  #### Session extension guard

  * **API** — extending a session with `additional_hours <= 0` now returns HTTP 422.
  * **CLI** — `memanto session extend` rejects non-positive `--hours` values before sending the request.

  #### Daily summary custom output path

  * **`output_path` parameter** added to `generate_summary()` and `generate_daily_summary()`.
  * When provided, the summary Markdown file is written to the specified path; parent directories are created automatically.

  #### Agent pattern options

  * **`memanto agent create --pattern`** help text updated to list only available patterns: `project`, `support`, `tool` (removes unavailable `chat`, `research`, `custom`).

  ### Dependencies

  * **`moorcheh-sdk`** minimum version bumped from `>=0.1.0` to `>=1.3.5`.
</Update>

<Update label="Version 0.0.7" description="Released April 30, 2026">
  ### Bug Fixes

  #### UI dashboard authentication

  * **Root cause** — the masked API key was being used for backend authentication, causing all dashboard data to fail loading after login.
  * **Fix** — restored transmission of the full API key in the configuration response so the dashboard can authenticate backend requests properly.
  * **Display** — `api_key_preview` remains masked (`........XXXXXX`) in the settings tab; only the backend communication is affected.

  <Info>
    **Result:** The Web UI dashboard now correctly initializes session state upon login, resolving the "no data" issue introduced in v0.0.6.
  </Info>

  ### Tests

  * Full test suite: **54 passed**. UI connectivity verified.
</Update>

<Update label="Version 0.0.6" description="Released April 30, 2026">
  ### Improvements

  #### API key verification

  * **First-run setup** — `memanto` now actively verifies the key against Moorcheh before saving; invalid keys are rejected immediately; transient network issues surface as a warning rather than blocking setup.
  * **Lighter auth ping** — verification switched from `client.namespaces.list()` to `client.documents.get(...)` against a sentinel namespace. `NamespaceNotFound` is treated as success (key authenticated; namespace simply doesn't exist).
  * **Clearer error codes** — auth dependency returns **401** on `AuthenticationError` and **500** on unexpected errors.

  #### Server health check

  * **`/health`** uses the same documents-based ping, so health reflects real authentication state.

  #### Configurable summary model

  * **`SUMMARY_MODEL` setting** (default `anthropic.claude-sonnet-4-6`) used for daily summary and conflict reports.
  * **`~/.memanto/config.yaml`** now supports `memanto.summary.model`, `memanto.answer.model`, `temperature`, and `answer_limit` — loaded at startup so models can be swapped without code changes.

  #### UI security

  * **`/api/ui/config`** and the API-key update endpoint now return a masked preview (`••••••••<last6>`) instead of the raw key — plaintext key is no longer sent to the browser.

  ### Tests

  * Full test suite: **54 passed**.
</Update>

<Update label="Version 0.0.5" description="Released April 28, 2026">
  ### Bug Fixes

  #### Web UI authentication after CLI activation

  * **Dashboard, Memory Explorer, recall, and analytics views** now load correctly after `memanto agent activate`.
  * **"Session may be expired"** and **"Activate an agent via CLI to explore memories"** error states are resolved.

  <Info>
    Existing `api_key_preview` and `has_active_session` fields are retained for backward compatibility with older UI surfaces.
  </Info>

  ### Improvements

  #### Simplified first-run setup

  * **Single-step onboarding** — `memanto` setup now prompts only for the Moorcheh API key.
  * **Removed** the schedule time (`HH:MM`) prompt, related validation, and automatic `ScheduleManager().enable(...)` call from onboarding.
</Update>

<Update label="Version 0.0.4" description="Released April 27, 2026">
  ### Improvements

  #### Onboarding and documentation

  * **README quick start** de-emphasizes `memanto serve` as a prerequisite — users can run `memanto`, create an agent, and try memories without keeping a local API process running.
  * **`memanto serve`** documented as optional, for HTTP/REST use only.
  * **Agent integration guide** shortens quick start to create → remember → recall, and updates Python examples.
  * **Session architecture doc** notes that `memanto agent create` auto-activates in the CLI.

  #### CLI output polish

  * **`memanto status` / `memanto serve`** use **Local REST API** wording; healthy API shows **online**.
  * **Success messages** drop the `OK` prefix across agent create, remember, upload, and daily summary flows.
  * **Welcome Quick Start** lists `memanto ui`, reorders commands, and describes `memanto serve` as starting the local REST API.

  #### `memanto connect list`

  * **Column renamed** to **Agent Name**; rows show agent `name` instead of `display_name`.

  ### Behavioral Changes

  * `memanto agent create` already auto-started a session; docs and Quick Start now consistently reflect this so separate `memanto agent activate` is not shown as a required step.
  * Default session/extension examples reference **6 hours** where updated.

  ### Tests

  * Full test suite: **54 passed**.
</Update>

<Update label="Version 0.0.3" description="Released April 24, 2026">
  ### Improvements

  #### CLI onboarding flow

  * **Quick start** now shows `memanto serve` first and guides users to open a new terminal for agent commands.
  * **`memanto serve`** prints a clear "next step" hint after startup.
  * **`memanto agent create <agent-id>`** now starts a session automatically.

  #### Documentation

  * Updated `README.md`, `docs/CLI_USER_GUIDE.md`, `docs/CLI_INSTALLATION.md`, `docs/AGENT_INTEGRATION_GUIDE.md`.

  ### Behavioral Changes

  * `memanto agent create` auto-activates a session — separate `memanto agent activate` is usually not required in the quick start flow.

  ### Tests

  * Updated CLI tests for auto-session behavior. Full test suite: **54 passed**.
</Update>

<Update label="Version 0.0.2" description="Released April 22, 2026">
  ### Improvements

  #### README branding

  * **Title updated** to **Memanto - Memory that AI agents love!** to better capture what Memanto delivers to AI agents.

  <Note>
    No functional changes in this release. All CLI commands, API endpoints, integrations, and MemantoClaw features remain unchanged from v0.0.1.
  </Note>
</Update>

<Update label="Version 0.0.1" description="Released April 22, 2026">
  ### New Features

  #### Semantic memory engine

  * **Agents** — persistent identity with isolated memory namespaces (e.g. `customer-support-bot`, `dev-assistant`).
  * **Sessions** — 6-hour active windows; memories persist forever and remain accessible across all future sessions.
  * **13 memory types** — `fact`, `preference`, `decision`, `goal`, `instruction`, `event`, and more, each stored with a confidence score.
  * **Zero-indexing semantic search** — memories are available for retrieval the exact millisecond they are written; no indexing delay.
  * **State-of-the-art accuracy** — 89.8% on LongMemEval, 87.1% on LoCoMo.

  #### Memanto CLI

  * **`pip install memanto`** — full `memanto` command-line interface with organized command groups: `agent`, `memory`, `session`, `schedule`, `config`, `connect`, and core utilities.
  * **Quickstart workflow:**
    ```bash theme={null}
    memanto                              # initial API key configuration
    memanto agent create my-agent
    memanto remember "Project kickoff is Monday" --type event
    memanto recall "When is project kickoff?"
    ```

  #### REST API

  * **Full v2 HTTP API** for agent lifecycle, session management, memory read/write, recall, and generative answers.
  * **Dual authentication** — `Authorization: Bearer <moorcheh-api-key>` for all requests; `X-Session-Token: <jwt>` for memory operations.

  #### Developer integrations

  * **13+ AI coding assistants and IDEs** — Claude Code, Cursor, Cline, Windsurf, Continue, GitHub Copilot, OpenCode, Goose, Roo, Antigravity, Augment, Gemini CLI, Codex.
  * Connect via `memanto connect <tool>` with project-local or `--global` scope.

  #### MemantoClaw

  * **Open-source reference stack** combining OpenClaw, NVIDIA OpenShell, and Memanto memory.
  * **One-command provisioning** — `memantoclaw onboard` configures inference routing, credentials, and memory bridge automatically.
  * **Enhanced security** — stricter seccomp/Landlock policies, credential filtering, immutable gateway config, host-bridge memory architecture.
</Update>
