Hindsight Client

raw JSON →
0.6.1 verified Sat May 09 auth: no python

Python client for Hindsight, a semantic memory system with personality-driven thinking. Current version 0.6.1, requires Python >=3.10. Released under MIT license. Development is active with regular updates.

pip install hindsight-client
error ValueError: No API key provided. Set HINDSIGHT_API_KEY environment variable or pass api_key to Client().
cause Client initialized without an API key.
fix
Export HINDSIGHT_API_KEY in your environment or pass api_key as a string to Client(api_key='...').
error pydantic.error_wrappers.ValidationError: 1 validation error for ThinkRequest personality -> value is not a valid enumeration member
cause Deprecated string personality value passed instead of Personality enum.
fix
Change 'personality="analytical"' to 'personality=Personality.ANALYTICAL' after importing Personality.
error requests.exceptions.ConnectionError: HTTPConnectionPool(host='api.example.com', port=443): Max retries exceeded
cause Incorrect base_url or network issue.
fix
Verify the base_url (e.g., 'https://api.hindsight.ai'). Check network connectivity.
breaking API key is required; missing key raises a ValueError on first call. Always set HINDSIGHT_API_KEY environment variable.
fix Set environment variable before using client: export HINDSIGHT_API_KEY='your_key'
gotcha Client instantiation does not validate the API key; validation happens on first request. A typo in the key will only surface then.
fix Call client.validate() immediately after construction to test credentials.
deprecated The 'personality' parameter in think() used to accept a string like 'logical', but now expects a Personality enum member.
fix Use from hindsight_client import Personality; response = client.think(prompt=..., personality=Personality.LOGICAL)

Initialize client with API key and base URL, then call think() to generate a response.

from hindsight_client import Client

client = Client(
    api_key=os.environ.get('HINDSIGHT_API_KEY', ''),
    base_url="https://api.example.com"
)
response = client.think(prompt="Tell me about semantic memory", personality="analytical")
print(response['text'])