Compare commits

...
9 changed files with 633 additions and 4 deletions
@@ -0,0 +1,194 @@
---
title: "What's new in Hindsight 0.4.19"
description: New features and improvements in Hindsight 0.4.19
authors: [nicoloboschi]
date: 2026-03-18
hide_table_of_contents: true
image: /img/blog/release0419.jpg
---
Hindsight 0.4.19 adds Agno and Hermes Agent integrations, three new retain extraction modes with named per-call strategies, Deno support for the TypeScript client, and a recovery mechanism for consolidation failures.
<!-- truncate -->
- [**Agno Integration**](#agno-integration): Add persistent memory to Agno agents with a native Toolkit.
- [**Hermes Agent Integration**](#hermes-agent-integration): Give Hermes agents long-term memory via a zero-config plugin.
- [**New Retain Modes**](#new-retain-modes): `verbatim`, `chunks`, and named strategies for mixed-content banks.
- [**TypeScript Deno Compatibility**](#typescript-deno-compatibility): Use the TypeScript client in Deno environments.
## Agno Integration
`hindsight-agno` is a new integration package that adds persistent memory to [Agno](https://github.com/agno-agi/agno) agents using Hindsight's native Toolkit pattern—the same pattern as Agno's built-in `Mem0Tools`.
```bash
pip install hindsight-agno
```
Pass `HindsightTools` directly to your agent's `tools` list:
```python
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from hindsight_agno import HindsightTools
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
tools=[HindsightTools(
bank_id="user-123",
hindsight_api_url="http://localhost:8888",
)],
)
agent.print_response("Remember that I prefer dark mode")
agent.print_response("What are my preferences?")
```
The toolkit registers three tools the agent can call: `retain_memory` (store), `recall_memory` (search), and `reflect_on_memory` (synthesize). You can include any combination by toggling `enable_retain`, `enable_recall`, and `enable_reflect`.
**Per-user bank isolation** is built in. If you don't pass a `bank_id`, the toolkit resolves it from `RunContext.user_id` automatically—so each user gets their own isolated memory bank with no extra code. A custom `bank_resolver` callable is also supported for more complex routing:
```python
tools=[HindsightTools(bank_resolver=lambda ctx: f"team-{ctx.user_id}")]
```
**Memory instructions** let you pre-recall relevant context at startup and inject it into the agent's system prompt, so the agent starts every conversation with relevant memories already loaded:
```python
from hindsight_agno import HindsightTools, memory_instructions
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
tools=[HindsightTools(bank_id="user-123", hindsight_api_url="http://localhost:8888")],
instructions=[memory_instructions(
bank_id="user-123",
hindsight_api_url="http://localhost:8888",
)],
)
```
See the [Agno integration documentation](/sdks/integrations/agno) for the full API reference.
## Hermes Agent Integration
`hindsight-hermes` is a new plugin package for [Hermes Agent](https://github.com/NousResearch/hermes-agent) (NousResearch). It uses Hermes's plugin discovery system—no code changes required—and registers three tools under a `[hindsight]` toolset.
```bash
uv pip install hindsight-hermes --python $HOME/.hermes/hermes-agent/venv/bin/python
```
Set environment variables and start Hermes:
```bash
export HINDSIGHT_API_URL=http://localhost:8888
export HINDSIGHT_BANK_ID=my-agent
hermes
```
Type `/tools` to verify the plugin loaded:
```
[hindsight]
* hindsight_recall - Search long-term memory for relevant information.
* hindsight_reflect - Synthesize a thoughtful answer from long-term memories.
* hindsight_retain - Store information to long-term memory for later retrieval.
```
Hermes has its own built-in `memory` tool that writes to local files. Since the LLM will prefer the one it's most familiar with, disable it so Hermes uses Hindsight instead:
```bash
hermes tools disable memory
```
If neither `HINDSIGHT_API_URL` nor `HINDSIGHT_API_KEY` is set, the plugin silently skips registration and Hermes starts normally.
See the [Hermes integration documentation](/sdks/integrations/hermes) for setup and troubleshooting.
## New Retain Modes
Three additions to `retain_extraction_mode` give you control over how much LLM work happens per ingested document—from full extraction down to zero.
### `verbatim` — preserve original text, extract metadata only
In the default (`concise`) mode, the LLM rewrites each chunk into compact extracted facts. `verbatim` mode skips that rewriting step: each chunk is stored exactly as it appears in the source, one memory per chunk. The LLM still runs, but only to extract entities, temporal information, and location—not to paraphrase the content. The fact text is the original chunk verbatim.
This is useful for RAG-style indexing and benchmarks where preserving the source wording matters, or when downstream systems need to display the exact original text in recall results.
```bash
HINDSIGHT_API_RETAIN_EXTRACTION_MODE=verbatim
```
### `chunks` — zero LLM cost
`chunks` skips the LLM entirely. Chunks are stored as-is with no entity extraction and no temporal indexing—only embeddings are generated for semantic search. Any entities you pass via `RetainContent.entities` are used directly. This is the fastest and cheapest retain mode; use it when ingestion speed and cost matter more than structured metadata.
```bash
HINDSIGHT_API_RETAIN_EXTRACTION_MODE=chunks
```
### Named retain strategies — mix content types in one bank
Named strategies let you configure multiple extraction profiles on a single bank and select among them at retain time. Any hierarchical config field can be overridden per strategy, including `retain_extraction_mode`, `retain_chunk_size`, `entity_labels`, `retain_mission`, and more.
Configure strategies via the bank config API:
```json
{
"retain_default_strategy": "conversations",
"retain_strategies": {
"conversations": {
"retain_extraction_mode": "concise",
"retain_chunk_size": 3000
},
"documents": {
"retain_extraction_mode": "verbatim",
"retain_chunk_size": 800
}
}
}
```
Then specify the strategy per retain call:
```python
# Uses default strategy ("conversations")
client.retain(bank_id, items=[{"content": "Alice joined the team today"}])
# Use document strategy for this item
client.retain(bank_id, items=[{"content": "...document text..."}], strategy="documents")
```
If no `strategy` is specified, `retain_default_strategy` is used. If neither is set, the bank/global config applies directly. Each item in a batch can also carry its own `strategy` field for fine-grained control.
## TypeScript Deno Compatibility
The TypeScript client (`hindsight-client`) now works in Deno environments. The build was migrated from `tsc` to `tsup`, producing dual CJS + ESM output with a proper `exports` field. The AI SDK and chat integrations were updated in the same pass.
No installation needed — import directly via the `npm:` specifier:
```typescript
import { HindsightClient } from "npm:@vectorize-io/hindsight-client";
```
Import paths and API are otherwise unchanged. No code changes are required if you're migrating an existing project from Node.js to Deno.
## Other Updates
**Improvements**
- Local reranker performance: FP16 inference (`HINDSIGHT_API_RERANKER_LOCAL_FP16=true`) and length-sorted bucket batching (`HINDSIGHT_API_RERANKER_LOCAL_BUCKET_BATCHING=true`) are now available as opt-in flags. Both default to off to preserve existing behavior. FP16 benefits GPU/MPS hardware; bucket batching reduces padding overhead and produces a 3654% speedup in benchmarks. Also fixes XLM-RoBERTa model loading under Transformers 5.x.
**Bug Fixes**
- Prevented silent memory loss when consolidation LLM calls fail. Previously, a batch that exhausted all retries was marked consolidated and permanently excluded from future runs—losing those memories silently. Now: the batch is split in half and retried recursively down to a single item (recovering most transient failures); only individual items that still fail all retries are tracked in a new `consolidation_failed_at` column. A new API endpoint `POST /v1/default/banks/{bank_id}/consolidation/recover` resets failed memories so they are picked up on the next consolidation run.
- Fixed Docker control-plane startup to respect `HINDSIGHT_CP_HOSTNAME` when constructing the API URL.
- Database cleanup migration removes orphaned observation memory units—rows left behind before the document delete cascade was fixed in 0.4.18—to prevent inconsistent memory state on existing installations.
## Feedback and Community
Hindsight 0.4.19 is a drop-in replacement for 0.4.x with no breaking changes.
Share your feedback:
- [GitHub Discussions](https://github.com/vectorize-io/hindsight/discussions)
- [GitHub Issues](https://github.com/vectorize-io/hindsight/issues)
For detailed changes, see the [full changelog](/changelog).
@@ -646,8 +646,6 @@ client.retain(bank_id, items=[{"content": "...document text..."}], strategy="doc
If no `strategy` is specified in a retain call, `retain_default_strategy` is used. If neither is set, the bank/global config applies directly.
> **Note on chunk size and retrieval fairness**: When mixing strategies with very different chunk sizes in the same bank, `chunks` and `verbatim` memories participate only in semantic retrieval (not entity graph or temporal paths). Smaller chunk sizes (e.g., 800 chars) produce more targeted embeddings and are recommended for document strategies to keep scores comparable with LLM-extracted facts.
**`HINDSIGHT_API_RETAIN_EXTRACTION_MODE=chunks` — zero LLM cost**
Each chunk is stored as-is with no LLM call whatsoever. No entity extraction, no temporal indexing — only embeddings are generated for semantic search. User-provided entities passed via `RetainContent.entities` are the sole source of entity data. Use when ingestion speed and cost matter more than structured metadata.
@@ -0,0 +1,186 @@
---
sidebar_position: 9
---
# Agno
Persistent memory tools for [Agno](https://github.com/agno-agi/agno) agents via Hindsight. Give your agents long-term memory with retain, recall, and reflect — using Agno's native Toolkit pattern.
## Features
- **Native Toolkit** - Extends Agno's `Toolkit` base class, just like `Mem0Tools`
- **Memory Instructions** - Pre-recall memories for injection into `Agent(instructions=[...])`
- **Three Memory Tools** - Retain (store), Recall (search), Reflect (synthesize) — include any combination
- **Flexible Bank Resolution** - Static bank ID, `RunContext.user_id`, or custom resolver
- **Simple Configuration** - Configure once globally, or pass a client directly
## Installation
```bash
pip install hindsight-agno
```
## Quick Start
```python
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from hindsight_agno import HindsightTools
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
tools=[HindsightTools(
bank_id="user-123",
hindsight_api_url="http://localhost:8888",
)],
)
agent.print_response("Remember that I prefer dark mode")
agent.print_response("What are my preferences?")
```
The agent now has three tools it can call:
- **`retain_memory`** — Store information to long-term memory
- **`recall_memory`** — Search long-term memory for relevant facts
- **`reflect_on_memory`** — Synthesize a reasoned answer from memories
## With Memory Instructions
Pre-recall relevant memories and inject them into the system prompt:
```python
from hindsight_agno import HindsightTools, memory_instructions
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
tools=[HindsightTools(
bank_id="user-123",
hindsight_api_url="http://localhost:8888",
)],
instructions=[memory_instructions(
bank_id="user-123",
hindsight_api_url="http://localhost:8888",
)],
)
```
## Selecting Tools
Include only the tools you need:
```python
tools = [HindsightTools(
bank_id="user-123",
hindsight_api_url="http://localhost:8888",
enable_retain=True,
enable_recall=True,
enable_reflect=False, # Omit reflect
)]
```
## Bank Resolution
The bank ID is resolved in order:
1. **`bank_resolver`** — Custom callable `(RunContext) -> str`
2. **`bank_id`** — Static bank ID passed to constructor
3. **`run_context.user_id`** — Automatic per-user banks
```python
# Per-user banks from RunContext
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
tools=[HindsightTools(hindsight_api_url="http://localhost:8888")],
user_id="user-123", # Used as bank_id
)
# Custom resolver
def resolve_bank(ctx):
return f"team-{ctx.user_id}"
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
tools=[HindsightTools(
bank_resolver=resolve_bank,
hindsight_api_url="http://localhost:8888",
)],
)
```
## Global Configuration
Instead of passing connection details to every toolkit, configure once:
```python
from hindsight_agno import configure, HindsightTools
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 toolkit without passing connection details
tools = [HindsightTools(bank_id="user-123")]
```
## Configuration Reference
### `HindsightTools()`
| Parameter | Default | Description |
|---|---|---|
| `bank_id` | `None` | Static Hindsight memory bank ID |
| `bank_resolver` | `None` | Callable `(RunContext) -> str` for dynamic 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` | Production API | 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
- agno
- hindsight-client >= 0.4.0
- A running Hindsight API server
@@ -0,0 +1,219 @@
---
sidebar_position: 10
---
# Hermes Agent
Hindsight memory integration for [Hermes Agent](https://github.com/NousResearch/hermes-agent). Gives your Hermes agent persistent long-term memory via retain, recall, and reflect tools.
## What it does
This package registers three tools into Hermes via its plugin system:
- **`hindsight_retain`** — Stores information to long-term memory. Hermes calls this when the user shares facts, preferences, or anything worth remembering.
- **`hindsight_recall`** — Searches long-term memory for relevant information. Returns a numbered list of matching memories.
- **`hindsight_reflect`** — Synthesizes a thoughtful answer from stored memories. Use this when you want Hermes to reason over what it knows rather than return raw facts.
These tools appear under the `[hindsight]` toolset in Hermes's `/tools` list.
## Setup
### 1. Install hindsight-hermes into the Hermes venv
The package must be installed in the **same Python environment** that Hermes runs in, so the entry point is discoverable.
```bash
uv pip install hindsight-hermes --python $HOME/.hermes/hermes-agent/venv/bin/python
```
### 2. Set environment variables
The plugin reads its configuration from environment variables. Set these before launching Hermes:
```bash
# Required — tells the plugin where Hindsight is running
export HINDSIGHT_API_URL=http://localhost:8888
# Required — the memory bank to read/write. Think of this as a "brain" for one user or agent.
export HINDSIGHT_BANK_ID=my-agent
# Optional — only needed if using Hindsight Cloud (https://api.hindsight.vectorize.io)
export HINDSIGHT_API_KEY=your-api-key
# Optional — recall budget: low (fast), mid (default), high (thorough)
export HINDSIGHT_BUDGET=mid
```
If neither `HINDSIGHT_API_URL` nor `HINDSIGHT_API_KEY` is set, the plugin silently skips registration — Hermes starts normally without the Hindsight tools.
### 3. Disable Hermes's built-in memory tool
Hermes has its own `memory` tool that saves to local files (`~/.hermes/`). If both are active, the LLM tends to prefer the built-in one since it's familiar. Disable it so the LLM uses Hindsight instead:
```bash
hermes tools disable memory
```
This persists across sessions. You can re-enable it later with `hermes tools enable memory`.
### 4. Start Hindsight API
Follow the [Quick Start](/developer/api/quickstart) guide to get the Hindsight API running, then come back here.
### 5. Launch Hermes
```bash
hermes
```
Verify the plugin loaded by typing `/tools` — you should see:
```
[hindsight]
* hindsight_recall - Search long-term memory for relevant information.
* hindsight_reflect - Synthesize a thoughtful answer from long-term memories.
* hindsight_retain - Store information to long-term memory for later retrieval.
```
### 6. Test it
**Store a memory:**
> Remember that my favourite colour is red
You should see `⚡ hindsight` in the response, confirming it called `hindsight_retain`.
**Recall a memory:**
> What's my favourite colour?
**Reflect on memories:**
> Based on what you know about me, suggest a colour scheme for my IDE
This calls `hindsight_reflect`, which synthesizes a response from all stored memories.
**Verify via API:**
```bash
curl -s http://localhost:8888/v1/default/banks/my-agent/memories/recall \
-H "Content-Type: application/json" \
-d '{"query": "favourite colour", "budget": "low"}' | python3 -m json.tool
```
## Troubleshooting
### Tools don't appear in `/tools`
1. **Check the plugin is installed in the right venv.** Run this from the Hermes venv:
```bash
python -c "from hindsight_hermes import register; print('OK')"
```
2. **Check the entry point is registered:**
```bash
python -c "
import importlib.metadata
eps = importlib.metadata.entry_points(group='hermes_agent.plugins')
print(list(eps))
"
```
You should see `EntryPoint(name='hindsight', value='hindsight_hermes', group='hermes_agent.plugins')`.
3. **Check env vars are set.** The plugin skips registration silently if `HINDSIGHT_API_URL` and `HINDSIGHT_API_KEY` are both unset.
### Hermes uses built-in memory instead of Hindsight
Run `hermes tools disable memory` and restart. The built-in `memory` tool and Hindsight tools have overlapping purposes — the LLM will prefer whichever it's more familiar with, which is usually the built-in one.
### Bank not found errors
The plugin auto-creates banks on first use. If you see bank errors, check that the Hindsight API is running and `HINDSIGHT_API_URL` is correct.
### Connection refused
Make sure the Hindsight API is running and listening on the URL you configured. Test with:
```bash
curl http://localhost:8888/health
```
## Manual registration (advanced)
If you don't want to use the plugin system, you can register tools directly in a Hermes startup script or custom agent:
```python
from hindsight_hermes import register_tools
register_tools(
bank_id="my-agent",
hindsight_api_url="http://localhost:8888",
budget="mid",
tags=["hermes"], # applied to all retained memories
recall_tags=["hermes"], # filter recall to only these tags
)
```
This imports `tools.registry` from Hermes at call time and registers the three tools directly. This approach gives you more control over parameters but requires Hermes to be importable.
## Memory instructions (system prompt injection)
Pre-recall memories at startup and inject them into the system prompt, so the agent starts every conversation with relevant context:
```python
from hindsight_hermes import memory_instructions
context = memory_instructions(
bank_id="my-agent",
hindsight_api_url="http://localhost:8888",
query="user preferences and important context",
budget="low",
max_results=5,
)
# Returns:
# Relevant memories:
# 1. User's favourite colour is red
# 2. User prefers dark mode
```
This never raises — if the API is down or no memories exist, it returns an empty string.
## Global configuration (advanced)
Instead of passing parameters to every call, configure once:
```python
from hindsight_hermes import configure
configure(
hindsight_api_url="http://localhost:8888",
api_key="your-key",
budget="mid",
tags=["hermes"],
)
```
Subsequent calls to `register_tools()` or `memory_instructions()` will use these defaults if no explicit values are provided.
## MCP alternative
Hermes also supports MCP servers natively. You can use Hindsight's MCP server directly instead of this plugin — no `hindsight-hermes` package needed:
```yaml
# In your Hermes config
mcp_servers:
- name: hindsight
url: http://localhost:8888/mcp
```
This exposes the same retain/recall/reflect operations through Hermes's MCP integration. The tradeoff is that MCP tools may have different naming and the LLM needs to discover them, whereas the plugin registers tools with Hermes-native schemas.
## Configuration reference
| Parameter | Env Var | Default | Description |
|-----------|---------|---------|-------------|
| `hindsight_api_url` | `HINDSIGHT_API_URL` | `https://api.hindsight.vectorize.io` | Hindsight API URL |
| `api_key` | `HINDSIGHT_API_KEY` | — | API key for authentication |
| `bank_id` | `HINDSIGHT_BANK_ID` | — | Memory bank ID |
| `budget` | `HINDSIGHT_BUDGET` | `mid` | Recall budget (low/mid/high) |
| `max_tokens` | — | `4096` | Max tokens for recall results |
| `tags` | — | — | Tags applied when storing memories |
| `recall_tags` | — | — | Tags to filter recall results |
| `recall_tags_match` | — | `any` | Tag matching mode (any/all/any_strict/all_strict) |
| `toolset` | — | `hindsight` | Hermes toolset group name |
+12
View File
@@ -214,6 +214,18 @@ const sidebars: SidebarsConfig = {
label: 'Pydantic AI',
customProps: { icon: '/img/icons/pydanticai.png' },
},
{
type: 'doc',
id: 'sdks/integrations/agno',
label: 'Agno',
customProps: { icon: '/img/icons/agno.png' },
},
{
type: 'doc',
id: 'sdks/integrations/hermes',
label: 'Hermes Agent',
customProps: { icon: '/img/icons/hermes.png' },
},
{
type: 'doc',
id: 'sdks/integrations/skills',
+22
View File
@@ -8,6 +8,28 @@ This changelog highlights user-facing changes only. Internal maintenance, CI/CD,
For full release details, see [GitHub Releases](https://github.com/vectorize-io/hindsight/releases).
## [0.4.19](https://github.com/vectorize-io/hindsight/releases/tag/v0.4.19)
**Features**
- TypeScript client now works in Deno environments. ([`72c25c97`](https://github.com/vectorize-io/hindsight/commit/72c25c97))
- Added Agno integration to use Hindsight as a memory toolkit. ([`8c378b98`](https://github.com/vectorize-io/hindsight/commit/8c378b98))
- Added Hermes Agent integration (hindsight-hermes) for persistent memory. ([`ef90842f`](https://github.com/vectorize-io/hindsight/commit/ef90842f))
- Expanded retain behavior with new `verbatim` and `chunks` extraction modes and named retain strategies. ([`e4f8a157`](https://github.com/vectorize-io/hindsight/commit/e4f8a157))
**Improvements**
- Improved local reranker performance/efficiency with FP16 and bucketed batching, plus compatibility with Transformers 5.x. ([`e7da7d0e`](https://github.com/vectorize-io/hindsight/commit/e7da7d0e))
**Bug Fixes**
- Prevented silent memory loss when consolidation fails (failed consolidations are tracked and can be recovered). ([`28dac7c7`](https://github.com/vectorize-io/hindsight/commit/28dac7c7))
- Fixed Docker control-plane startup to respect the configured control-plane hostname. ([`8a64dc8d`](https://github.com/vectorize-io/hindsight/commit/8a64dc8d))
- Database cleanup migration now removes orphaned observation memory units to avoid inconsistent memory state. ([`f09ad9de`](https://github.com/vectorize-io/hindsight/commit/f09ad9de))
- Deleting a document now also deletes linked memory units to prevent leftover/stale memory entries. ([`f27bd953`](https://github.com/vectorize-io/hindsight/commit/f27bd953))
- Fixed MCP middleware to send an Accept header, preventing 406 response errors in some setups. ([`836fd81e`](https://github.com/vectorize-io/hindsight/commit/836fd81e))
- Improved compatibility with Gemini tool-calling by preserving thought signature metadata to avoid failures on gemini-3.1-flash-lite-preview. ([`21f9f46c`](https://github.com/vectorize-io/hindsight/commit/21f9f46c))
## [0.4.18](https://github.com/vectorize-io/hindsight/releases/tag/v0.4.18)
**Features**
Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 254 B

@@ -646,8 +646,6 @@ client.retain(bank_id, items=[{"content": "...document text..."}], strategy="doc
If no `strategy` is specified in a retain call, `retain_default_strategy` is used. If neither is set, the bank/global config applies directly.
> **Note on chunk size and retrieval fairness**: When mixing strategies with very different chunk sizes in the same bank, `chunks` and `verbatim` memories participate only in semantic retrieval (not entity graph or temporal paths). Smaller chunk sizes (e.g., 800 chars) produce more targeted embeddings and are recommended for document strategies to keep scores comparable with LLM-extracted facts.
**`HINDSIGHT_API_RETAIN_EXTRACTION_MODE=chunks` — zero LLM cost**
Each chunk is stored as-is with no LLM call whatsoever. No entity extraction, no temporal indexing — only embeddings are generated for semantic search. User-provided entities passed via `RetainContent.entities` are the sole source of entity data. Use when ingestion speed and cost matter more than structured metadata.