feat(hindsight): offer a starter memory template during setup - #73415
Closed
benfrank241 wants to merge 2 commits into
Closed
benfrank241 wants to merge 2 commits into
benfrank241 wants to merge 2 commits into
Conversation
`hermes memory setup` left the user with a blank bank. Add an optional step
(cloud / local_external) that fetches the Hindsight Bank Templates catalog,
shows the ones tagged for Hermes, and applies the chosen manifest to the
bank via the import API — so the agent's memory arrives pre-configured with a
mission, dispositions, mental models, and directives for its use case.
- New `plugins/memory/hindsight/templates.py`: fetch catalog (filtered to the
`hermes` integration), fetch a manifest, and POST it to
`/v1/default/banks/{bank}/import` (which creates the bank). Catalog source is
overridable via `HINDSIGHT_TEMPLATES_URL`.
- Wizard: after config is saved, offer a template picker (Blank is always an
option). Best-effort and non-fatal — network/apply failures just skip.
- Skipped for local_embedded (its daemon isn't running during setup).
- Tests cover the hermes filter, manifest URL resolution, the import POST
(endpoint + auth), and the picker orchestration (apply / blank / none / error).
…mplate step
Follow-ups on the setup-wizard starter-template step:
- Warn on re-apply: before applying a template, probe the bank (export
endpoint). If it already has config / mental models / directives, confirm
before overwriting ("Apply" vs "Keep existing"). Best-effort — a missing
bank or any probe error is treated as not-customized and proceeds.
- Testable mode gate: extract `supported_for_mode()` (cloud / local_external)
and use it in the wizard so local_embedded is provably skipped.
- Tests: apply-time failure (e.g. 401 for OAuth-only users) is swallowed with
a hint; the customization probe (config present / empty / error); and the
warn flow (keep-existing declines, confirm applies, fresh bank skips the
prompt). 16 tests total.
Contributor
Author
|
Follow-ups pushed:
|
Contributor
Author
|
Superseded by the combined PR #74379 — same changes bundled into a single review surface. Closing this one to consolidate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermes memory setupcurrently leaves the user with a blank Hindsight bank — the "day-one empty brain." This adds an optional step that seeds the bank with a starter template so the agent's memory arrives already configured (mission, dispositions, mental models, directives) for its use case.It reuses Hindsight's existing Bank Templates feature (the catalog behind hindsight.vectorize.io/templates) and its import API — nothing new server-side.
Flow
After config is saved (cloud / local_external), the wizard:
hermesintegration.POSTs it to/v1/default/banks/{bank}/import(which creates the bank if needed and applies config + mental models + directives).It's best-effort and non-fatal — any network/apply failure just prints a hint and continues. Skipped for
local_embedded(its daemon isn't running during setup).Details
plugins/memory/hindsight/templates.pykeeps the logic out of the provider module and testable.HINDSIGHT_TEMPLATES_URL(pin a version / point at a mirror)..env/environment; OAuth-only users (nohsk_key) will see the graceful "apply one later" hint.Tests
tests/plugins/memory/test_hindsight_templates.py(8, all passing):POST(correct endpoint +Authorizationheader + body; and omitted auth when no key)(The 2 pre-existing
test_hindsight_provider.py::TestConfig/TestAvailabilityfailures reproduce on cleanmainand are unrelated.)Depends on
The Hermes starter templates land in vectorize-io/hindsight#2996 (adds the
hermes-tagged templates to the catalog). Until that merges, the picker filters an empty set and the step no-ops cleanly.