* Add blog post: Adding Long-Term Memory to LangGraph and LangChain Agents * blog: update langgraph post date to 2026-03-24 and add cover image * blog: fix claude-code-telegram filename to match frontmatter date (2026-03-25) * blog: set claude-code-telegram date to 2026-03-23 * blog: fix date timezone offset by adding T12:00 to all post dates * ci: trigger fresh CI run * blog: fix broken docs link (routeBasePath is /)
132 lines
5.3 KiB
Markdown
132 lines
5.3 KiB
Markdown
---
|
||
title: "What's new in Hindsight 0.4.12"
|
||
description: New features and improvements in Hindsight 0.4.12
|
||
authors: [nicoloboschi]
|
||
date: 2026-02-18T12:00
|
||
hide_table_of_contents: true
|
||
---
|
||
|
||
Hindsight 0.4.12 expands what you can ingest, cuts ingestion costs, and broadens where you can run it.
|
||
|
||
<!-- truncate -->
|
||
|
||
- [**File Ingestion**](#file-ingestion): Retain PDFs, images, and Office documents directly.
|
||
- [**Batch API for Async Retain**](#batch-api-for-async-retain): Cut LLM ingestion costs by 50% using OpenAI and Groq Batch APIs.
|
||
- [**Go Client SDK**](#go-client-sdk): Idiomatic Go client with functional options and full API coverage.
|
||
- [**DiskANN Vector Indexing**](#diskann-vector-indexing): pgvectorscale and Azure pg_diskann support for large-scale deployments.
|
||
|
||
## File Ingestion
|
||
|
||
Hindsight can now retain PDFs, images, and common Office documents (DOCX, PPTX, XLSX) directly—without you needing to extract text first.
|
||
|
||
```python
|
||
from hindsight_sdk import HindsightClient
|
||
|
||
client = HindsightClient()
|
||
|
||
# Retain a PDF
|
||
with open("report.pdf", "rb") as f:
|
||
client.retain_files("my-bank", files=[("file", ("report.pdf", f, "application/pdf"))])
|
||
|
||
# Retain an image
|
||
with open("screenshot.png", "rb") as f:
|
||
client.retain_files("my-bank", files=[("file", ("screenshot.png", f, "image/png"))])
|
||
```
|
||
|
||
Or use the REST endpoint directly:
|
||
|
||
```bash
|
||
curl -X POST http://localhost:8888/v1/default/banks/my-bank/files/retain \
|
||
-F "file=@report.pdf;type=application/pdf"
|
||
```
|
||
|
||
Two file parsers are available: **Markitdown** (the default) and the new **Iris** parser, which provides improved extraction quality for complex documents. Switch parsers with:
|
||
|
||
```bash
|
||
export HINDSIGHT_API_FILE_PARSER=iris # or markitdown (default)
|
||
```
|
||
|
||
## Batch API for Async Retain
|
||
|
||
When using async retain, you can now cut your LLM costs by 50% by enabling the provider Batch API. OpenAI and Groq both offer a 50% discount on token pricing for batch workloads in exchange for a processing window of up to 24 hours.
|
||
|
||
```bash
|
||
export HINDSIGHT_API_RETAIN_BATCH_ENABLED=true
|
||
```
|
||
|
||
This requires async retain (`async=true` in your request). Hindsight submits fact extraction calls as a batch job to the provider, polls for completion, and processes results automatically. Because retain runs in the background anyway, the delayed processing window is typically invisible to end users.
|
||
|
||
This is the most impactful cost optimization for workloads that ingest large volumes of content—backfills, document libraries, conversation archives.
|
||
|
||
Reliability improvements in this release also ensure that large payloads are handled correctly throughout the batch lifecycle, and document tags are preserved when using the async retain flow.
|
||
|
||
## Go Client SDK
|
||
|
||
Hindsight now has a Go client, generated from the OpenAPI 3.1 spec using [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator).
|
||
|
||
```go
|
||
import hindsight "github.com/vectorize-io/hindsight/hindsight-clients/go"
|
||
|
||
cfg := hindsight.NewConfiguration()
|
||
cfg.Servers = hindsight.ServerConfigurations{
|
||
{URL: "http://localhost:8888"},
|
||
}
|
||
client := hindsight.NewAPIClient(cfg)
|
||
ctx := context.Background()
|
||
|
||
// Retain a memory
|
||
retainReq := hindsight.RetainRequest{
|
||
Items: []hindsight.MemoryItem{
|
||
{Content: "The deployment succeeded at 14:32 UTC.", Tags: []string{"ops"}},
|
||
},
|
||
}
|
||
client.MemoryAPI.RetainMemories(ctx, "my-bank").RetainRequest(retainReq).Execute()
|
||
|
||
// Recall memories
|
||
recallReq := hindsight.RecallRequest{Query: "recent deployments"}
|
||
resp, _, _ := client.MemoryAPI.RecallMemories(ctx, "my-bank").RecallRequest(recallReq).Execute()
|
||
for _, r := range resp.Results {
|
||
fmt.Println(r.Text)
|
||
}
|
||
```
|
||
|
||
See the [Go SDK documentation](/sdks/go) for the full reference.
|
||
|
||
## DiskANN Vector Indexing
|
||
|
||
Two new vector indexing backends are available for large-scale deployments:
|
||
|
||
**pgvectorscale (DiskANN)** — high-performance approximate nearest neighbor search for self-hosted deployments:
|
||
|
||
```bash
|
||
# Use the TimescaleDB + DiskANN docker-compose example
|
||
docker compose -f docker/docker-compose/timescale/docker-compose.yml up
|
||
```
|
||
|
||
**Azure pg_diskann** — native DiskANN indexing for Azure Database for PostgreSQL – Flexible Server, with no additional infrastructure required.
|
||
|
||
Configure the index backend via environment variable:
|
||
|
||
```bash
|
||
export HINDSIGHT_API_VECTOR_INDEX_BACKEND=diskann # pgvectorscale
|
||
export HINDSIGHT_API_VECTOR_INDEX_BACKEND=azure_diskann # Azure pg_diskann
|
||
```
|
||
|
||
Both backends are drop-in replacements for the default pgvector index, providing better recall performance at scale without changing the API.
|
||
|
||
## Other Updates
|
||
|
||
- **AI SDK tooling**: The Vercel AI SDK integration has been simplified and improved, with better TypeScript types and cleaner tool definitions.
|
||
- **Python client**: Async API consistency improvements and keepalive timeout fixes reduce connection drop issues under load.
|
||
- **OpenClaw hardening**: Safer shell handling (`execFile` instead of `exec`), HTTP dual-mode communication, per-user bank isolation, and more reliable reinitialization with cooldown logic.
|
||
|
||
## Feedback and Community
|
||
|
||
Hindsight 0.4.12 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).
|