Skip to content

feat(paperclip): add hindsight-paperclip TypeScript integration#773

Open
benfrank241 wants to merge 3 commits intomainfrom
feat/paperclip-integration
Open

feat(paperclip): add hindsight-paperclip TypeScript integration#773
benfrank241 wants to merge 3 commits intomainfrom
feat/paperclip-integration

Conversation

@benfrank241
Copy link
Copy Markdown
Contributor

@benfrank241 benfrank241 commented Mar 30, 2026

Summary

  • New hindsight-paperclip npm package providing long-term memory for Paperclip AI agents
  • recall() / retain() functions for use in heartbeat lifecycle hooks (HTTP and Process adapters)
  • createMemoryMiddleware() for Express HTTP adapter agents — auto-recalls before each request, auto-retains agent output after each response
  • Bank ID strategy maps Paperclip's company/agent isolation to Hindsight banks: paperclip::{companyId}::{agentId} (configurable granularity)
  • 27 unit tests covering bank derivation, recall, and retain (all passing)
  • Docs page at sdks/integrations/paperclip added to sidebar

Package structure

hindsight-integrations/paperclip/
├── src/
│   ├── index.ts         # Main exports
│   ├── client.ts        # Hindsight HTTP client (native fetch, no deps)
│   ├── config.ts        # PaperclipMemoryConfig + loadConfig()
│   ├── bank.ts          # Bank ID derivation
│   ├── recall.ts        # recall() function
│   ├── retain.ts        # retain() function
│   └── middleware.ts    # createMemoryMiddleware() for Express
└── tests/
    ├── bank.test.ts
    ├── recall.test.ts
    └── retain.test.ts

Test plan

  • npm run build — TypeScript compiles cleanly
  • npm test — 27 tests pass (bank derivation, recall, retain)
  • Integration smoke test against a live Hindsight instance (7/7 passing)
  • End-to-end test with a Paperclip HTTP adapter agent

Adds long-term memory for Paperclip AI agents via a lightweight
TypeScript/Node.js npm package with no runtime dependencies.

- recall() / retain() functions for heartbeat lifecycle hooks
- createMemoryMiddleware() for Express HTTP adapter agents
- Bank ID strategy: paperclip::{companyId}::{agentId} (configurable)
- Skill file for agents to call Hindsight REST API directly
- 27 unit tests covering bank derivation, recall, and retain
- Docs page at sdks/integrations/paperclip
@benfrank241 benfrank241 force-pushed the feat/paperclip-integration branch from 4580d6a to 91d364b Compare March 31, 2026 19:07
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.

1 participant