All skills
vectorize-io avatar

/hindsight-docs

@5bfef3c
by vectorize-iovectorize-io/hindsight44k stars
5,845

Complete Hindsight documentation for AI agents. Use this to learn about Hindsight architecture, APIs, configuration, and best practices.

Use this Skill: https://skilld.dev/gh/vectorize-io/hindsight/hindsight-docs

This session only. Nothing lands on disk.

referencesdeveloperdevelopment.md

≈741 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Development Guide

Guide to setting up a local development environment for contributing to Hindsight.

Prerequisites

  • Python 3.11+
  • uv - Fast Python package manager
  • Docker and Docker Compose
  • An LLM provider credential, or a local/subscription-backed provider such as Ollama or GitHub Copilot

Local Development Setup

1. Clone the Repository

git clone https://github.com/vectorize-io/hindsight.git
cd hindsight

2. Install Dependencies

uv sync

3. Start PostgreSQL

Start only the database via Docker:

cd docker && docker-compose up -d postgres

4. Configure Environment

cp .env.example .env

Edit .env with your LLM API key:

# Database (connects to Docker postgres)
HINDSIGHT_API_DATABASE_URL=postgresql://hindsight:hindsight_dev@localhost:5432/hindsight

# LLM Provider (choose one)
HINDSIGHT_API_LLM_PROVIDER=groq
HINDSIGHT_API_LLM_API_KEY=gsk_xxxxxxxxxxxx
HINDSIGHT_API_LLM_MODEL=llama-3.1-70b-versatile

5. Start the API Server

./scripts/start-server.sh --env local

The server will be available at http://localhost:8888.

Running Tests

# Run all tests
uv run pytest

# Run specific test file
uv run pytest tests/test_retrieval.py

# Run with verbose output
uv run pytest -v

Code Generation

Regenerate API Clients

When you modify the OpenAPI spec, regenerate the clients:

./scripts/generate-clients.sh

This generates:

  • Python client in hindsight-clients/python/
  • TypeScript client in hindsight-clients/typescript/

Export OpenAPI Schema

./scripts/export-openapi.sh

Project Structure

hindsight/
├── hindsight-api/          # Main API server
│   ├── hindsight_api/
│   │   ├── api/           # HTTP endpoints
│   │   ├── engine/        # Memory engine, retrieval, reasoning
│   │   └── web/           # Server entry point
│   └── tests/
├── hindsight-clients/      # Generated SDK clients
│   ├── python/
│   └── typescript/
├── hindsight-control-plane/ # Admin UI (Next.js)
├── docker/                 # Docker Compose setup
└── scripts/               # Development scripts

Contributing

  1. Create a feature branch from main
  2. Make your changes
  3. Run tests: uv run pytest
  4. Submit a pull request

Troubleshooting

Database Connection Issues

Ensure PostgreSQL is running:

docker-compose ps

Check database connectivity:

psql postgresql://hindsight:hindsight_dev@localhost:5432/hindsight

ML Model Download

On first run, Hindsight downloads embedding and reranking models. This may take a few minutes. Models are cached in ~/.cache/huggingface/.

Port Conflicts

If port 8888 is in use:

HINDSIGHT_API_PORT=8889 ./scripts/start-server.sh --env local

Source: SKILL.md on GitHub

1 alerttoday5 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    The skill is a comprehensive documentation set for the Hindsight memory system, providing architecture overviews, API references, and integration guides for multiple AI agent frameworks. No security risks were identified in the documentation or provided examples.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

  • Runlayer6mo

    30/42 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 5bfef3c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 16 hours ago.

Activeupdated 2 months ago

README badge

README badge for vectorize-io/hindsight/hindsight-docs