Hindsight: AI Long-Term Memory
Hindsight is a PostgreSQL-native long-term memory service for AI agents.
Pigsty provides the app/hindsight configuration template (conf/app/hindsight.yml). By default, it uses Pigsty-managed PostgreSQL instead of Hindsight’s built-in development database.
Quick Start
Default access URLs:
- UI:
http://hs.pigstyorhttp://<IP>:9999 - API:
http://hs-api.pigstyorhttp://<IP>:8888
Key Settings
conf/app/hindsight.yml overrides /opt/hindsight/.env through apps.hindsight.conf. Key parameters:
HINDSIGHT_API_PUBLISH_PORT: public API port, default8888HINDSIGHT_UI_PUBLISH_PORT: public UI port, default9999HINDSIGHT_DB_HOST/HINDSIGHT_DB_PORT/HINDSIGHT_DB_NAME/HINDSIGHT_DB_USER/HINDSIGHT_DB_PASSWORDHINDSIGHT_API_VECTOR_EXTENSION: defaultpgvectorHINDSIGHT_API_TEXT_SEARCH_EXTENSION: defaultnativeHINDSIGHT_API_LLM_PROVIDER: defaultnoneHINDSIGHT_MODEL_CACHE: host model-cache directory, default/data/hindsight
With the default LLM provider, none, Hindsight can retain text and recall it using local embedding/reranker models. Fact extraction, reflection, and consolidation require Ollama or an OpenAI-compatible API.
The template mounts the host model-cache directory at /home/hindsight/.cache; it has no hindsight-cache named volume. An empty directory may hide models bundled in the image. Check model availability on first startup and allow downloads as needed.
The database needs vector, plus pg_trgm in public. The template explicitly declares only vector; add pg_trgm and check its schema before deploying. CREATE EXTENSION IF NOT EXISTS does not move an existing extension.
The development template uses a named volume to preserve bundled models, sets HF_HUB_OFFLINE=1, and adds combined API/UI health checks and make health. These features require matching application files. After changing the API port inside the container, also check the control-plane connection URL.
Operations
Request the API’s /health/ready and the UI proxy’s /api/banks?limit=1 separately to confirm that the application is ready and the control plane can reach the API.
References
- Hindsight project: https://github.com/vectorize-io/hindsight
- Pigsty template: https://github.com/pgsty/pigsty/blob/main/conf/app/hindsight.yml
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)