Skip to main content

What's new in Hindsight 0.4.12

· 4 min read
Nicolò Boschi
Hindsight Team

Hindsight 0.4.12 expands what you can ingest, cuts ingestion costs, and broadens where you can run it.

File Ingestion

Hindsight can now retain PDFs, images, and common Office documents (DOCX, PPTX, XLSX) directly—without you needing to extract text first.

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:

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:

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.

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.

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 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:

# 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:

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:

For detailed changes, see the full changelog.