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

6.1 KiB

sidebar_position, title, description
sidebar_position title description
14 Amazon Bedrock AgentCore Persistent Memory with Hindsight | Integration Add long-term memory to Amazon Bedrock AgentCore Runtime agents with Hindsight. Memory persists across sessions using stable user identity — not the ephemeral runtimeSessionId.

Amazon Bedrock AgentCore Runtime

Persistent memory for Amazon Bedrock AgentCore Runtime agents using Hindsight.

AgentCore Runtime sessions are explicitly ephemeral — they terminate on inactivity and reprovision fresh environments. hindsight-agentcore adds durable cross-session memory so agents remember users, decisions, and learned patterns across any number of Runtime sessions.

View Changelog →

How It Works

AgentCore Runtime invocation
        │
        ▼
   before_turn()         ← Recall relevant memories from Hindsight
        │
        ▼
  Agent executes          ← Prompt enriched with prior context
        │
        ▼
   after_turn()          ← Retain output to Hindsight (async)

Memory is keyed to stable user identity — not the runtimeSessionId. Banks survive session churn.

Default bank format:

tenant:{tenant_id}:user:{user_id}:agent:{agent_name}

Installation

pip install hindsight-agentcore

Quick Start

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

import os
from hindsight_agentcore import HindsightRuntimeAdapter, TurnContext, configure

configure(
    hindsight_api_url="https://api.hindsight.vectorize.io",
    api_key=os.environ["HINDSIGHT_API_KEY"],
)

adapter = HindsightRuntimeAdapter(agent_name="support-agent")


# Your AgentCore Runtime handler
async def handler(event: dict) -> dict:
    context = TurnContext(
        runtime_session_id=event["sessionId"],
        user_id=event["userId"],       # from validated auth — never client-supplied
        agent_name="support-agent",
        tenant_id=event.get("tenantId"),
        request_id=event.get("requestId"),
    )

    result = await adapter.run_turn(
        context=context,
        payload={"prompt": event["prompt"]},
        agent_callable=run_my_agent,
    )
    return result


async def run_my_agent(payload: dict, memory_context: str) -> dict:
    prompt = payload["prompt"]
    if memory_context:
        prompt = f"Past context:\n{memory_context}\n\nCurrent request: {prompt}"

    output = await call_bedrock(prompt)
    return {"output": output}

Lower-Level Hooks

For direct control over the recall → execute → retain cycle:

memory_context = await adapter.before_turn(context, query=user_message)

result = await run_my_agent(payload, memory_context=memory_context)

await adapter.after_turn(context, result=result["output"], query=user_message)

Retrieval Modes

Recall (default)

Fast multi-strategy retrieval (semantic + keyword + graph + temporal):

from hindsight_agentcore import RecallPolicy

adapter = HindsightRuntimeAdapter(
    recall_policy=RecallPolicy(mode="recall", budget="mid", max_tokens=1500)
)

Reflect

LLM-synthesized context for complex reasoning tasks:

adapter = HindsightRuntimeAdapter(
    recall_policy=RecallPolicy(mode="reflect")
)

Use reflect selectively — it's slower. Reserve it for explicit planning steps or routing decisions.

Async Retention

By default, after_turn() fires retention as a background task — the user turn is never delayed:

configure(retain_async=True)   # default
configure(retain_async=False)  # await retention before returning

Long-Running Workflows

For jobs spanning multiple Runtime sessions, retain at start and completion:

# Task start
await adapter.after_turn(
    context,
    result="Started QBR analysis for Acme Corp",
    query=task_description,
)

# ... long-running work across potentially multiple sessions ...

# Task completion
await adapter.after_turn(
    context,
    result=f"Completed QBR analysis. Finding: {summary}",
    query=task_description,
)

Identity and Auth

Never use runtimeSessionId as the bank ID. Sessions expire. Memory must survive session churn.

Preferred identity sources (in order):

  1. Validated user ID from AgentCore JWT/OAuth context
  2. X-Amzn-Bedrock-AgentCore-Runtime-User-Id header
  3. Application-supplied user ID in trusted server-side deployments
context = TurnContext(
    runtime_session_id=event["sessionId"],
    user_id=jwt_claims["sub"],         # stable identity from validated token
    agent_name="support-agent",
    tenant_id=jwt_claims.get("tenant"),
)

Custom Bank Resolution

Override the default tenant:user:agent format:

from hindsight_agentcore import TurnContext

def my_resolver(context: TurnContext) -> str:
    return f"acme:{context.user_id}:{context.agent_name}"

adapter = HindsightRuntimeAdapter(bank_resolver=my_resolver)

Security rule: The resolver must fail closed (BankResolutionError) rather than leak memory across users when identity is missing.

Configuration Reference

Option Env Variable Default Description
hindsight_api_url HINDSIGHT_API_URL Hindsight Cloud Hindsight server URL
api_key HINDSIGHT_API_KEY — API key for Hindsight Cloud
recall_budget — "mid" Search depth: low, mid, high
recall_max_tokens — 1500 Max tokens recalled
retain_async — True Non-blocking retention
timeout — 15.0 HTTP timeout in seconds
tags — [] Tags applied to all retained memories
verbose — False Log memory operations

Failure Modes

Failure Behavior
Hindsight unavailable before_turn() returns "", agent continues
Recall timeout Returns "", agent continues
Retain failure Logged as warning, user turn unaffected
Bad bank resolution Fails closed — no cross-user memory leakage

Requirements

  • Python 3.10+
  • hindsight-client>=0.4.0