feat(agentos): add Hindsight long-term memory integration for AgentOS#2888
Open
benfrank241 wants to merge 4 commits into
Open
feat(agentos): add Hindsight long-term memory integration for AgentOS#2888benfrank241 wants to merge 4 commits into
benfrank241 wants to merge 4 commits into
Conversation
Adds `@vectorize-io/hindsight-agentos`, a lightweight wrapper that implements AgentOS's `AgentMemoryProvider` interface backed by Hindsight. - `getContext` recalls relevant memories from Hindsight before each model call and injects them into the system prompt. - `observe` retains each turn after generation (fire-and-forget by default), letting Hindsight handle entity extraction and consolidation into world/experience facts and mental models server-side. Both sides fail safe: recall failures return no context and retains never add turn latency. Bank, recall (budget/types/maxTokens/includeEntities/ labelTypes/heading) and retain (async/tags/metadata/includeAgentMessages) are all configurable; either side can be disabled. Includes 18 vitest tests (provider contract + a harness that simulates AgentOS's before/after turn wiring), a CI build job, release-script entry, docs gallery entry + integration page, and README listing. Resolves framerslab/agentos#16.
- Drop unused HindsightClient import in memory.ts (fails noUnusedLocals / ruff-style dead-code checks). - Add agentos to the INTEGRATIONS dict in generate_changelog.py so the release changelog step accepts the integration.
- Remove the "View Changelog" link from the integration doc page: the /changelog/integrations/agentos page doesn't exist until the integration is released, so the link broke the docusaurus build (onBrokenLinks: throw). The release tooling adds the changelog + its link when a version is cut. - Commit the generated docs-skill mirror (skills/hindsight-docs/references/sdks/integrations/agentos.md). - Apply repo prettier formatting to the integration TS/README.
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
Adds
@vectorize-io/hindsight-agentos, a first-party integration giving AgentOS agents long-term memory via Hindsight. Resolves the maintainer request in framerslab/agentos#16.AgentOS exposes a clean
AgentMemoryProviderhook (getContextbefore generation,observeafter) that auto-wires on every agent call path. This integration takes the lightweight external-wrapper route from the issue:createHindsightMemory(options)returns anAgentMemoryProviderbacked by Hindsight — no fork of AgentOS internals required.How it works
getContextobserveBoth sides fail safe — a recall failure returns no context (the agent still responds) and retains are fire-and-forget by default so they never add turn latency.
bank, all recall options (budget/types/maxTokens/includeEntities/labelTypes/heading) and retain options (async/tags/metadata/includeAgentMessages) are configurable; either side can be disabled.Meets the "Adding New Integrations" checklist
AgentMemoryProvidercontract plus a harness that simulates AgentOS's own before/after turn wiring (recall injected into the prompt, both turns retained). TheAgentMemoryProvidertype is imported from the real@framers/agentospackage.build-agentos-integration(npm ci → test → build), gated ondetect-changesintegrations-agentos, and registered in the PR-status report.agentosadded toVALID_INTEGRATIONSinscripts/release-integration.sh.integrations.json, integration page atdocs-integrations/agentos.md, icon, and a row in the integrations README.Test plan
npm ci && npm test— 18/18 passnpm run build— ESM + DTS build clean (compiles against real@framers/agentostypes)tsc --noEmitcleancheck-integrations.mjs/check-integration-seo.mjs— doc page + SEO passcheck-integration-lockfiles.sh— lockfile resolves from npm registrytest.ymlYAML valid;release-integration.shsyntax OK