Skip to content

docs(retain): deprecate bank name as narrator; steer speaker via context (#3138) - #3155

Merged
nicoloboschi merged 1 commit into
mainfrom
fix/deprecate-bank-name-narrator-3138
Aug 3, 2026
Merged

docs(retain): deprecate bank name as narrator; steer speaker via context (#3138)#3155
nicoloboschi merged 1 commit into
mainfrom
fix/deprecate-bank-name-narrator-3138

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

What

Closes #3138.

The bank profile name field is documented as "Deprecated: display label only, not advertised", but at retain time _resolve_narrator(profile["name"], bank_id) silently uses it as the narrator (memory owner) whenever name != bank_id — priming a Narrator: <name> line in fact extraction and stamping it into the who-dimension of every first-person fact. That undocumented coupling is what #3138 reports: a "deprecated, display-only" field quietly steering (or, when name == bank_id, suppressing) speaker attribution.

Approach — deprecate for real, keep 100% backward compatible

We stop advertising the name-as-narrator path and point users at the context field instead, without changing any runtime behavior:

  • retain.md now steers speaker attribution solely through each item's context (which already takes precedence), and drops the advice to set a bank name as the agent's name.
  • Dry-run extract agent_name override (DryRunExtractRequest) is marked deprecated in the OpenAPI schema and repointed to context. It is still accepted and still primes the narrator when supplied.

_resolve_narrator and the extraction prompt injection are untouched, so every existing bank behaves exactly as before — this is purely documentation + schema-metadata.

Not done (deliberately)

Fully removing the name→narrator coupling in the engine would be a breaking behavior change; left for a future major. This PR only removes the docs that lead people into it and flags the explicit knob.

Changes

  • hindsight-api-slim/hindsight_api/api/http.pyagent_name field deprecated=True + description
  • hindsight-api-slim/hindsight_api/engine/memory_engine.py — dry-run docstring note
  • hindsight-docs/docs/developer/retain.mdcontext-only speaker guidance
  • hindsight-docs/static/openapi.json, hindsight-clients/typescript/generated/types.gen.ts — regenerated

Testing

No behavior change to test (deprecation is schema metadata + prose). Lint passes; OpenAPI and client SDKs regenerated.

…ext (#3138)

The bank profile `name` field is documented as a display label only, but at
retain time `_resolve_narrator` silently uses it as the narrator (memory owner)
whenever it differs from `bank_id` — the undocumented coupling reported in #3138.

Stop advertising that path without changing any runtime behavior (100% backward
compatible):
- retain.md now steers speaker attribution solely through each item's `context`,
  dropping the advice to set a bank `name` as the agent's name.
- The dry-run extract `agent_name` override is marked `deprecated` in the schema
  (still honored) and repointed to `context`.

`_resolve_narrator` and the prompt injection are unchanged, so existing banks
behave exactly as before.
@nicoloboschi
nicoloboschi merged commit f77f218 into main Aug 3, 2026
103 of 104 checks passed
@nicoloboschi
nicoloboschi deleted the fix/deprecate-bank-name-narrator-3138 branch August 3, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bank profile name is documented "Deprecated: display label only" but silently controls narrator attribution in fact extraction

1 participant