Files
Nicolò Boschi 6f2799569f docs: make every integration changelog reachable, and compact the Integrations Hub (#4005)
* docs: link every integration changelog from its doc page

The release script has written a changelog page per integration since 0.4.20
(src/pages/changelog/integrations/<slug>.md), but nothing reliably linked them:
16 of 61 doc pages carried a "View Changelog" link, and the only index was a
hand-written table at the bottom of /changelog listing 6 of the 48 pages, stale
since the release that introduced them. coding-agents was one of the 31 pages
with a changelog nobody could reach except by guessing the URL.

Adds the link to the 30 pages missing one, plus a third invariant in
check-integrations.mjs so the next one can't ship unlinked: every changelog page
whose integration has a gallery entry must be linked from its doc page.

coding-agents.md is generated, so its link goes in the README as an absolute
hindsight.vectorize.io URL — the sync script rewrites our own absolute URLs to
site-relative, so it resolves on npm, GitHub and the docs site. It sits outside
the skill:begin regions, so SKILL.md is unchanged.

Claude-Session: https://claude.ai/code/session_01DNWFQn8AUN6SApcswHG3aN

* docs(integrations): compact grouped gallery with Docs/Changelog buttons

The Integrations Hub listed 60 three-line cards with a repeated "Hindsight Team"
byline and an OFFICIAL badge on 52 of them, running 6092px tall — scanning it
meant scrolling past what you came for. Cards are now a compact row (icon, name,
two-line description) grouped by category, with the featured three using the same
row tinted rather than a second card design: 4352px, and the shape of the
catalogue is visible at a glance.

Each card carries Docs and Changelog buttons. Which integrations have a changelog
comes from a new build-time plugin that indexes
src/pages/changelog/integrations/*.md and joins integrations.json on the link
slug (vercel-ai-sdk -> /sdks/integrations/ai-sdk -> ai-sdk.md), so an integration
grows the button on its first release with nothing to update by hand.

The card is a <div> now — nested anchors are invalid — so the name and the pills
are the links, not the whole card. /changelog's first line points here instead of
carrying its own listing.

Also drops the 14 CSS classes the old card owned, and shares CATEGORY_LABELS /
groupByCategory from src/lib/integrations.ts so the taxonomy has one definition.

Claude-Session: https://claude.ai/code/session_01DNWFQn8AUN6SApcswHG3aN
2026-09-02 10:21:08 +02:00

7.0 KiB

sidebar_position, title, description
sidebar_position title description
13 Strands Agents Persistent Memory with Hindsight | Integration Add long-term memory to Strands Agents SDK agents with Hindsight. Retain, recall, and reflect tools using Strands' native @tool pattern for persistent memory across sessions.

Strands Agents

Persistent memory tools for Strands Agents SDK agents via Hindsight. Give your agents long-term memory with retain, recall, and reflect — using Strands' native @tool pattern.

View Changelog →

Features

  • Native @tool Functions - Tools are plain Python functions, compatible with Agent(tools=[...])
  • Memory Instructions - Pre-recall memories for injection into agent system prompt
  • Three Memory Tools - Retain (store), Recall (search), Reflect (synthesize) — include any combination
  • Simple Configuration - Configure once globally, or pass a client directly

Installation

pip install hindsight-strands

Quick Start

:::tip Recommended: Hindsight Cloud Sign up free and grab an API key — no self-hosting required. :::

from strands import Agent
from hindsight_strands import create_hindsight_tools

tools = create_hindsight_tools(
    bank_id="user-123",
    hindsight_api_url="https://api.hindsight.vectorize.io",
    api_key="hsk_...",  # or set HINDSIGHT_API_KEY env var
)

agent = Agent(tools=tools)
agent("Remember that I prefer dark mode")
agent("What are my preferences?")

The agent now has three tools it can call:

  • hindsight_retain — Store information to long-term memory
  • hindsight_recall — Search long-term memory for relevant facts
  • hindsight_reflect — Synthesize a reasoned answer from memories

Self-hosting (local development)

If you're running Hindsight locally with ./scripts/dev/start-api.sh, swap the URL:

tools = create_hindsight_tools(
    bank_id="user-123",
    hindsight_api_url="http://localhost:8888",
)

See the installation guide for self-hosting setup.

With Memory Instructions

Pre-recall relevant memories and inject them into the system prompt:

from hindsight_strands import create_hindsight_tools, memory_instructions

tools = create_hindsight_tools(
    bank_id="user-123",
    hindsight_api_url="https://api.hindsight.vectorize.io",
    api_key="hsk_...",
)

memories = memory_instructions(
    bank_id="user-123",
    hindsight_api_url="https://api.hindsight.vectorize.io",
    api_key="hsk_...",
)

agent = Agent(
    tools=tools,
    system_prompt=f"You are a helpful assistant.\n\n{memories}",
)

Prefer creating one shared Hindsight client in app lifespan and passing client=.... This gives explicit ownership and clean shutdown via await client.aclose().

from contextlib import asynccontextmanager

from fastapi import FastAPI
from hindsight_client import Hindsight
from hindsight_strands import create_hindsight_tools, memory_instructions


@asynccontextmanager
async def lifespan(app: FastAPI):
    client = Hindsight(base_url="https://api.hindsight.vectorize.io", api_key="hsk_...")
    app.state.hindsight_client = client
    try:
        yield
    finally:
        await client.aclose()


app = FastAPI(lifespan=lifespan)


@app.post("/chat")
async def chat():
    client = app.state.hindsight_client
    tools = create_hindsight_tools(bank_id="user-123", client=client)
    memories = memory_instructions(bank_id="user-123", client=client)
    ...

If you pass hindsight_api_url/api_key directly to create_hindsight_tools(), hindsight-strands creates the client internally. In that case call await tools.aclose() (or tools.close()) during shutdown.

Selecting Tools

Include only the tools you need:

tools = create_hindsight_tools(
    bank_id="user-123",
    hindsight_api_url="https://api.hindsight.vectorize.io",
    api_key="hsk_...",
    enable_retain=True,
    enable_recall=True,
    enable_reflect=False,  # Omit reflect
)

Global Configuration

Instead of passing connection details to every call, configure once:

from hindsight_strands import configure, create_hindsight_tools

configure(
    hindsight_api_url="http://localhost:8888",
    api_key="your-api-key",       # Or set HINDSIGHT_API_KEY env var
    budget="mid",                  # Recall budget: low/mid/high
    max_tokens=4096,               # Max tokens for recall results
    tags=["env:prod"],             # Tags for stored memories
    recall_tags=["scope:global"],  # Tags to filter recall
    recall_tags_match="any",       # Tag match mode: any/all/any_strict/all_strict
)

# Now create tools without passing connection details
tools = create_hindsight_tools(bank_id="user-123")

Configuration Reference

create_hindsight_tools()

Parameter Default Description
bank_id required Hindsight memory bank ID
client None Pre-configured Hindsight client
hindsight_api_url None API URL (used if no client provided)
api_key None API key (used if no client provided)
budget "mid" Recall/reflect budget level (low/mid/high)
max_tokens 4096 Maximum tokens for recall results
tags None Tags applied when storing memories
recall_tags None Tags to filter when searching
recall_tags_match "any" Tag matching mode
enable_retain True Include the retain (store) tool
enable_recall True Include the recall (search) tool
enable_reflect True Include the reflect (synthesize) tool

memory_instructions()

Parameter Default Description
bank_id required Hindsight memory bank ID
client None Pre-configured Hindsight client
hindsight_api_url None API URL (used if no client provided)
api_key None API key (used if no client provided)
query "relevant context about the user" Recall query for memory injection
budget "low" Recall budget level
max_results 5 Maximum memories to inject
max_tokens 4096 Maximum tokens for recall results
prefix "Relevant memories:\n" Text prepended before memory list
tags None Tags to filter recall results
tags_match "any" Tag matching mode

configure()

Parameter Default Description
hindsight_api_url Hindsight Cloud (https://api.hindsight.vectorize.io) Hindsight API URL
api_key HINDSIGHT_API_KEY env API key for authentication
budget "mid" Default recall budget level
max_tokens 4096 Default max tokens for recall
tags None Default tags for retain operations
recall_tags None Default tags to filter recall
recall_tags_match "any" Default tag matching mode
verbose False Enable verbose logging

Requirements

  • Python >= 3.10
  • strands-agents
  • hindsight-client >= 0.4.0
  • A running Hindsight API server