From 144e4c49d1da672ec6fc5db846de5e5dfac7ccb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Tue, 3 Mar 2026 15:03:42 +0100 Subject: [PATCH] Release v0.4.15 - Update version to 0.4.15 in all components - Regenerate OpenAPI spec and client SDKs - Python packages: hindsight-api, hindsight-dev, hindsight-all, hindsight-litellm, hindsight-crewai, hindsight-pydantic-ai, hindsight-embed - Python client: hindsight-clients/python - TypeScript client: hindsight-clients/typescript - Rust CLI: hindsight-cli - Control Plane: hindsight-control-plane - OpenClaw integration: hindsight-integrations/openclaw - AI SDK integration: hindsight-integrations/ai-sdk - Chat SDK integration: hindsight-integrations/chat - Helm chart - Sync documentation to version-0.4 --- helm/hindsight/Chart.yaml | 4 +- hindsight-api/hindsight_api/__init__.py | 2 +- hindsight-api/pyproject.toml | 2 +- hindsight-cli/Cargo.toml | 2 +- hindsight-clients/go/api/openapi.yaml | 2 +- hindsight-clients/go/api_banks.go | 2 +- hindsight-clients/go/api_directives.go | 2 +- hindsight-clients/go/api_documents.go | 2 +- hindsight-clients/go/api_entities.go | 2 +- hindsight-clients/go/api_files.go | 2 +- hindsight-clients/go/api_memory.go | 2 +- hindsight-clients/go/api_mental_models.go | 2 +- hindsight-clients/go/api_monitoring.go | 2 +- hindsight-clients/go/api_operations.go | 2 +- hindsight-clients/go/client.go | 4 +- hindsight-clients/go/configuration.go | 2 +- .../go/model_add_background_request.go | 2 +- .../model_async_operation_submit_response.go | 2 +- .../go/model_background_response.go | 2 +- .../go/model_bank_config_response.go | 2 +- .../go/model_bank_config_update.go | 2 +- hindsight-clients/go/model_bank_list_item.go | 2 +- .../go/model_bank_list_response.go | 2 +- .../go/model_bank_profile_response.go | 2 +- .../go/model_bank_stats_response.go | 2 +- hindsight-clients/go/model_budget.go | 2 +- .../go/model_cancel_operation_response.go | 2 +- .../go/model_child_operation_status.go | 2 +- hindsight-clients/go/model_chunk_data.go | 2 +- .../go/model_chunk_include_options.go | 2 +- hindsight-clients/go/model_chunk_response.go | 2 +- ...odel_clear_memory_observations_response.go | 2 +- .../go/model_consolidation_response.go | 2 +- .../go/model_create_bank_request.go | 2 +- .../go/model_create_directive_request.go | 2 +- .../go/model_create_mental_model_request.go | 2 +- .../go/model_create_mental_model_response.go | 2 +- .../go/model_delete_document_response.go | 2 +- hindsight-clients/go/model_delete_response.go | 2 +- .../go/model_directive_list_response.go | 2 +- .../go/model_directive_response.go | 2 +- .../go/model_disposition_traits.go | 2 +- .../go/model_document_response.go | 2 +- .../go/model_entity_detail_response.go | 2 +- .../go/model_entity_include_options.go | 2 +- hindsight-clients/go/model_entity_input.go | 2 +- .../go/model_entity_list_item.go | 2 +- .../go/model_entity_list_response.go | 2 +- .../go/model_entity_observation_response.go | 2 +- .../go/model_entity_state_response.go | 2 +- hindsight-clients/go/model_features_info.go | 2 +- .../go/model_file_retain_response.go | 2 +- .../go/model_graph_data_response.go | 2 +- .../go/model_http_validation_error.go | 2 +- hindsight-clients/go/model_include_options.go | 2 +- .../go/model_list_documents_response.go | 2 +- .../go/model_list_memory_units_response.go | 2 +- .../go/model_list_tags_response.go | 2 +- hindsight-clients/go/model_memory_item.go | 2 +- .../go/model_mental_model_list_response.go | 2 +- .../go/model_mental_model_response.go | 2 +- .../go/model_mental_model_trigger.go | 2 +- .../go/model_observation_scopes.go | 2 +- .../go/model_operation_response.go | 2 +- .../go/model_operation_status_response.go | 2 +- .../go/model_operations_list_response.go | 2 +- hindsight-clients/go/model_recall_request.go | 2 +- hindsight-clients/go/model_recall_response.go | 2 +- hindsight-clients/go/model_recall_result.go | 2 +- .../go/model_reflect_based_on.go | 2 +- .../go/model_reflect_directive.go | 2 +- hindsight-clients/go/model_reflect_fact.go | 2 +- .../go/model_reflect_include_options.go | 2 +- .../go/model_reflect_llm_call.go | 2 +- .../go/model_reflect_mental_model.go | 2 +- hindsight-clients/go/model_reflect_request.go | 2 +- .../go/model_reflect_response.go | 2 +- .../go/model_reflect_tool_call.go | 2 +- hindsight-clients/go/model_reflect_trace.go | 2 +- hindsight-clients/go/model_retain_request.go | 2 +- hindsight-clients/go/model_retain_response.go | 2 +- .../go/model_source_facts_include_options.go | 2 +- hindsight-clients/go/model_tag_item.go | 2 +- hindsight-clients/go/model_timestamp.go | 2 +- hindsight-clients/go/model_token_usage.go | 2 +- .../go/model_tool_calls_include_options.go | 2 +- .../go/model_update_directive_request.go | 2 +- .../go/model_update_disposition_request.go | 2 +- .../go/model_update_mental_model_request.go | 2 +- .../go/model_validation_error.go | 2 +- .../go/model_validation_error_loc_inner.go | 2 +- .../go/model_version_response.go | 2 +- hindsight-clients/go/response.go | 2 +- hindsight-clients/go/utils.go | 2 +- .../python/hindsight_client_api/__init__.py | 2 +- .../hindsight_client_api/api/banks_api.py | 2 +- .../api/directives_api.py | 2 +- .../hindsight_client_api/api/documents_api.py | 2 +- .../hindsight_client_api/api/entities_api.py | 2 +- .../hindsight_client_api/api/files_api.py | 2 +- .../hindsight_client_api/api/memory_api.py | 2 +- .../api/mental_models_api.py | 2 +- .../api/monitoring_api.py | 2 +- .../api/operations_api.py | 2 +- .../python/hindsight_client_api/api_client.py | 2 +- .../hindsight_client_api/configuration.py | 4 +- .../python/hindsight_client_api/exceptions.py | 2 +- .../hindsight_client_api/models/__init__.py | 2 +- .../models/add_background_request.py | 2 +- .../models/async_operation_submit_response.py | 2 +- .../models/background_response.py | 2 +- .../models/bank_config_response.py | 2 +- .../models/bank_config_update.py | 2 +- .../models/bank_list_item.py | 2 +- .../models/bank_list_response.py | 2 +- .../models/bank_profile_response.py | 2 +- .../models/bank_stats_response.py | 2 +- .../hindsight_client_api/models/budget.py | 2 +- .../models/cancel_operation_response.py | 2 +- .../models/child_operation_status.py | 2 +- .../hindsight_client_api/models/chunk_data.py | 2 +- .../models/chunk_include_options.py | 2 +- .../models/chunk_response.py | 2 +- .../clear_memory_observations_response.py | 2 +- .../models/consolidation_response.py | 2 +- .../models/create_bank_request.py | 2 +- .../models/create_directive_request.py | 2 +- .../models/create_mental_model_request.py | 2 +- .../models/create_mental_model_response.py | 2 +- .../models/delete_document_response.py | 2 +- .../models/delete_response.py | 2 +- .../models/directive_list_response.py | 2 +- .../models/directive_response.py | 2 +- .../models/disposition_traits.py | 2 +- .../models/document_response.py | 2 +- .../models/entity_detail_response.py | 2 +- .../models/entity_include_options.py | 2 +- .../models/entity_input.py | 2 +- .../models/entity_list_item.py | 2 +- .../models/entity_list_response.py | 2 +- .../models/entity_observation_response.py | 2 +- .../models/entity_state_response.py | 2 +- .../models/features_info.py | 2 +- .../models/file_retain_response.py | 2 +- .../models/graph_data_response.py | 2 +- .../models/http_validation_error.py | 2 +- .../models/include_options.py | 2 +- .../models/list_documents_response.py | 2 +- .../models/list_memory_units_response.py | 2 +- .../models/list_tags_response.py | 2 +- .../models/memory_item.py | 2 +- .../models/mental_model_list_response.py | 2 +- .../models/mental_model_response.py | 2 +- .../models/mental_model_trigger.py | 2 +- .../models/observation_scopes.py | 2 +- .../models/operation_response.py | 2 +- .../models/operation_status_response.py | 2 +- .../models/operations_list_response.py | 2 +- .../models/recall_request.py | 2 +- .../models/recall_response.py | 2 +- .../models/recall_result.py | 2 +- .../models/reflect_based_on.py | 2 +- .../models/reflect_directive.py | 2 +- .../models/reflect_fact.py | 2 +- .../models/reflect_include_options.py | 2 +- .../models/reflect_llm_call.py | 2 +- .../models/reflect_mental_model.py | 2 +- .../models/reflect_request.py | 2 +- .../models/reflect_response.py | 2 +- .../models/reflect_tool_call.py | 2 +- .../models/reflect_trace.py | 2 +- .../models/retain_request.py | 2 +- .../models/retain_response.py | 2 +- .../models/source_facts_include_options.py | 2 +- .../hindsight_client_api/models/tag_item.py | 2 +- .../hindsight_client_api/models/timestamp.py | 2 +- .../models/token_usage.py | 2 +- .../models/tool_calls_include_options.py | 2 +- .../models/update_directive_request.py | 2 +- .../models/update_disposition_request.py | 2 +- .../models/update_mental_model_request.py | 2 +- .../models/validation_error.py | 2 +- .../models/validation_error_loc_inner.py | 2 +- .../models/version_response.py | 2 +- .../python/hindsight_client_api/rest.py | 2 +- hindsight-clients/python/pyproject.toml | 2 +- hindsight-clients/typescript/package.json | 2 +- hindsight-control-plane/package.json | 2 +- hindsight-dev/pyproject.toml | 2 +- hindsight-docs/static/openapi.json | 2 +- .../version-0.4/developer/api/documents.mdx | 45 +++ .../developer/api/memory-banks.mdx | 67 ++++ .../version-0.4/developer/api/retain.mdx | 70 +++- .../version-0.4/developer/configuration.md | 3 + .../version-0.4/developer/extensions.md | 27 +- .../version-0.4/developer/models.md | 6 + .../version-0.4/developer/observations.mdx | 8 + .../version-0.4/developer/retain.md | 6 + .../version-0.4/sdks/integrations/chat.md | 8 +- .../sdks/integrations/pydantic-ai.md | 184 +++++++++ .../version-0.4-sidebars.json | 10 +- hindsight-embed/hindsight_embed/__init__.py | 2 +- hindsight-embed/pyproject.toml | 2 +- hindsight-integrations/ai-sdk/package.json | 2 +- hindsight-integrations/chat/package.json | 2 +- hindsight-integrations/crewai/pyproject.toml | 2 +- hindsight-integrations/litellm/pyproject.toml | 2 +- hindsight-integrations/openclaw/package.json | 2 +- .../pydantic-ai/pyproject.toml | 2 +- hindsight/pyproject.toml | 2 +- .../cookbook/applications/chat-memory.md | 120 ------ .../cookbook/applications/deliveryman-demo.md | 145 ------- .../applications/go-memory-service.md | 102 ----- .../applications/hindsight-litellm-demo.md | 206 ---------- .../hindsight-tool-learning-demo.md | 123 ------ .../applications/openai-fitness-coach.md | 315 --------------- .../applications/sanity-blog-memory.md | 371 ----------------- .../cookbook/applications/stancetracker.md | 276 ------------- .../cookbook/applications/taste-ai.md | 122 ------ .../references/cookbook/index.md | 144 ------- .../cookbook/recipes/fitness_tracker.md | 306 -------------- .../cookbook/recipes/healthcare_assistant.md | 299 -------------- .../cookbook/recipes/litellm-memory-demo.md | 187 --------- .../cookbook/recipes/movie_recommendation.md | 246 ------------ .../cookbook/recipes/per-user-memory.md | 247 ------------ .../cookbook/recipes/personal_assistant.md | 266 ------------- .../cookbook/recipes/personalized_search.md | 299 -------------- .../references/cookbook/recipes/quickstart.md | 162 -------- .../cookbook/recipes/study_buddy.md | 335 ---------------- .../recipes/support-agent-shared-knowledge.md | 315 --------------- .../cookbook/recipes/tool-learning-demo.md | 372 ------------------ .../references/developer/api/documents.md | 121 +++++- .../references/developer/api/memory-banks.md | 67 ++++ .../references/developer/api/retain.md | 68 +++- .../references/developer/configuration.md | 3 + .../references/developer/extensions.md | 27 +- .../references/developer/models.md | 6 + .../references/developer/observations.md | 8 + .../references/developer/retain.md | 6 + .../references/sdks/integrations/chat.md | 8 +- .../sdks/integrations/pydantic-ai.md | 184 +++++++++ uv.lock | 10 +- 242 files changed, 1121 insertions(+), 5183 deletions(-) create mode 100644 hindsight-docs/versioned_docs/version-0.4/sdks/integrations/pydantic-ai.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/chat-memory.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/deliveryman-demo.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/go-memory-service.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/hindsight-litellm-demo.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/hindsight-tool-learning-demo.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/openai-fitness-coach.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/sanity-blog-memory.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/stancetracker.md delete mode 100644 skills/hindsight-docs/references/cookbook/applications/taste-ai.md delete mode 100644 skills/hindsight-docs/references/cookbook/index.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/fitness_tracker.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/healthcare_assistant.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/litellm-memory-demo.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/movie_recommendation.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/per-user-memory.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/personal_assistant.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/personalized_search.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/quickstart.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/study_buddy.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/support-agent-shared-knowledge.md delete mode 100644 skills/hindsight-docs/references/cookbook/recipes/tool-learning-demo.md create mode 100644 skills/hindsight-docs/references/sdks/integrations/pydantic-ai.md diff --git a/helm/hindsight/Chart.yaml b/helm/hindsight/Chart.yaml index 88deeb5f..14e53003 100644 --- a/helm/hindsight/Chart.yaml +++ b/helm/hindsight/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: hindsight description: Hindsight helm chart type: application -version: 0.4.14 -appVersion: "0.4.14" +version: 0.4.15 +appVersion: "0.4.15" keywords: - ai - memory diff --git a/hindsight-api/hindsight_api/__init__.py b/hindsight-api/hindsight_api/__init__.py index cc6a8950..52b08eb9 100644 --- a/hindsight-api/hindsight_api/__init__.py +++ b/hindsight-api/hindsight_api/__init__.py @@ -46,4 +46,4 @@ __all__ = [ "RemoteTEICrossEncoder", "LLMConfig", ] -__version__ = "0.4.14" +__version__ = "0.4.15" diff --git a/hindsight-api/pyproject.toml b/hindsight-api/pyproject.toml index 776b81eb..b045b999 100644 --- a/hindsight-api/pyproject.toml +++ b/hindsight-api/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "hindsight-api" -version = "0.4.14" +version = "0.4.15" description = "Hindsight: Agent Memory That Works Like Human Memory" readme = "README.md" requires-python = ">=3.11" diff --git a/hindsight-cli/Cargo.toml b/hindsight-cli/Cargo.toml index 59453545..a788ee19 100644 --- a/hindsight-cli/Cargo.toml +++ b/hindsight-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hindsight-cli" -version = "0.4.14" +version = "0.4.15" edition = "2021" authors = ["Hindsight Team"] description = "A beautiful CLI for Hindsight - semantic memory system" diff --git a/hindsight-clients/go/api/openapi.yaml b/hindsight-clients/go/api/openapi.yaml index bad0388e..3b16443f 100644 --- a/hindsight-clients/go/api/openapi.yaml +++ b/hindsight-clients/go/api/openapi.yaml @@ -7,7 +7,7 @@ info: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: Hindsight HTTP API - version: 0.4.14 + version: 0.4.15 servers: - url: / paths: diff --git a/hindsight-clients/go/api_banks.go b/hindsight-clients/go/api_banks.go index d9dc92eb..729d7529 100644 --- a/hindsight-clients/go/api_banks.go +++ b/hindsight-clients/go/api_banks.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_directives.go b/hindsight-clients/go/api_directives.go index b0cd077f..8dea27fb 100644 --- a/hindsight-clients/go/api_directives.go +++ b/hindsight-clients/go/api_directives.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_documents.go b/hindsight-clients/go/api_documents.go index 8b771311..764eb6a7 100644 --- a/hindsight-clients/go/api_documents.go +++ b/hindsight-clients/go/api_documents.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_entities.go b/hindsight-clients/go/api_entities.go index b5c43b2f..1779f114 100644 --- a/hindsight-clients/go/api_entities.go +++ b/hindsight-clients/go/api_entities.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_files.go b/hindsight-clients/go/api_files.go index b7072653..58b03dd3 100644 --- a/hindsight-clients/go/api_files.go +++ b/hindsight-clients/go/api_files.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_memory.go b/hindsight-clients/go/api_memory.go index 9985f638..53b0575a 100644 --- a/hindsight-clients/go/api_memory.go +++ b/hindsight-clients/go/api_memory.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_mental_models.go b/hindsight-clients/go/api_mental_models.go index 469a0261..7b0f0db0 100644 --- a/hindsight-clients/go/api_mental_models.go +++ b/hindsight-clients/go/api_mental_models.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_monitoring.go b/hindsight-clients/go/api_monitoring.go index fe3e931f..f70a256d 100644 --- a/hindsight-clients/go/api_monitoring.go +++ b/hindsight-clients/go/api_monitoring.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/api_operations.go b/hindsight-clients/go/api_operations.go index 6c6c86b4..a722f91f 100644 --- a/hindsight-clients/go/api_operations.go +++ b/hindsight-clients/go/api_operations.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/client.go b/hindsight-clients/go/client.go index c1fd1bb6..ce9df843 100644 --- a/hindsight-clients/go/client.go +++ b/hindsight-clients/go/client.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -41,7 +41,7 @@ var ( queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) -// APIClient manages communication with the Hindsight HTTP API API v0.4.14 +// APIClient manages communication with the Hindsight HTTP API API v0.4.15 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/hindsight-clients/go/configuration.go b/hindsight-clients/go/configuration.go index ae9be72a..6655749f 100644 --- a/hindsight-clients/go/configuration.go +++ b/hindsight-clients/go/configuration.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_add_background_request.go b/hindsight-clients/go/model_add_background_request.go index 71777586..26fb6c6b 100644 --- a/hindsight-clients/go/model_add_background_request.go +++ b/hindsight-clients/go/model_add_background_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_async_operation_submit_response.go b/hindsight-clients/go/model_async_operation_submit_response.go index 30ca1d03..f6db2ba5 100644 --- a/hindsight-clients/go/model_async_operation_submit_response.go +++ b/hindsight-clients/go/model_async_operation_submit_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_background_response.go b/hindsight-clients/go/model_background_response.go index 76400477..1bdd2df8 100644 --- a/hindsight-clients/go/model_background_response.go +++ b/hindsight-clients/go/model_background_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_bank_config_response.go b/hindsight-clients/go/model_bank_config_response.go index 4dc21bea..70481fc7 100644 --- a/hindsight-clients/go/model_bank_config_response.go +++ b/hindsight-clients/go/model_bank_config_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_bank_config_update.go b/hindsight-clients/go/model_bank_config_update.go index 05d45918..8818e673 100644 --- a/hindsight-clients/go/model_bank_config_update.go +++ b/hindsight-clients/go/model_bank_config_update.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_bank_list_item.go b/hindsight-clients/go/model_bank_list_item.go index 600efade..4fec7514 100644 --- a/hindsight-clients/go/model_bank_list_item.go +++ b/hindsight-clients/go/model_bank_list_item.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_bank_list_response.go b/hindsight-clients/go/model_bank_list_response.go index a3ba706a..b9c570f5 100644 --- a/hindsight-clients/go/model_bank_list_response.go +++ b/hindsight-clients/go/model_bank_list_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_bank_profile_response.go b/hindsight-clients/go/model_bank_profile_response.go index b2451700..a131604e 100644 --- a/hindsight-clients/go/model_bank_profile_response.go +++ b/hindsight-clients/go/model_bank_profile_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_bank_stats_response.go b/hindsight-clients/go/model_bank_stats_response.go index 50976202..363a00b1 100644 --- a/hindsight-clients/go/model_bank_stats_response.go +++ b/hindsight-clients/go/model_bank_stats_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_budget.go b/hindsight-clients/go/model_budget.go index 3439bbbe..de3283b6 100644 --- a/hindsight-clients/go/model_budget.go +++ b/hindsight-clients/go/model_budget.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_cancel_operation_response.go b/hindsight-clients/go/model_cancel_operation_response.go index 3469803b..3d30b4f1 100644 --- a/hindsight-clients/go/model_cancel_operation_response.go +++ b/hindsight-clients/go/model_cancel_operation_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_child_operation_status.go b/hindsight-clients/go/model_child_operation_status.go index 79346e19..b1f6424f 100644 --- a/hindsight-clients/go/model_child_operation_status.go +++ b/hindsight-clients/go/model_child_operation_status.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_chunk_data.go b/hindsight-clients/go/model_chunk_data.go index 720e8ca6..033d06ea 100644 --- a/hindsight-clients/go/model_chunk_data.go +++ b/hindsight-clients/go/model_chunk_data.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_chunk_include_options.go b/hindsight-clients/go/model_chunk_include_options.go index a58a1312..9a155f5d 100644 --- a/hindsight-clients/go/model_chunk_include_options.go +++ b/hindsight-clients/go/model_chunk_include_options.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_chunk_response.go b/hindsight-clients/go/model_chunk_response.go index 893101ce..c65ca89a 100644 --- a/hindsight-clients/go/model_chunk_response.go +++ b/hindsight-clients/go/model_chunk_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_clear_memory_observations_response.go b/hindsight-clients/go/model_clear_memory_observations_response.go index 94494958..63f468da 100644 --- a/hindsight-clients/go/model_clear_memory_observations_response.go +++ b/hindsight-clients/go/model_clear_memory_observations_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_consolidation_response.go b/hindsight-clients/go/model_consolidation_response.go index f5c3edbc..531dca1c 100644 --- a/hindsight-clients/go/model_consolidation_response.go +++ b/hindsight-clients/go/model_consolidation_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_create_bank_request.go b/hindsight-clients/go/model_create_bank_request.go index ce97ae48..9f6c76d9 100644 --- a/hindsight-clients/go/model_create_bank_request.go +++ b/hindsight-clients/go/model_create_bank_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_create_directive_request.go b/hindsight-clients/go/model_create_directive_request.go index 55c0a072..afd4f288 100644 --- a/hindsight-clients/go/model_create_directive_request.go +++ b/hindsight-clients/go/model_create_directive_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_create_mental_model_request.go b/hindsight-clients/go/model_create_mental_model_request.go index 11d86082..c09e37d7 100644 --- a/hindsight-clients/go/model_create_mental_model_request.go +++ b/hindsight-clients/go/model_create_mental_model_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_create_mental_model_response.go b/hindsight-clients/go/model_create_mental_model_response.go index c1ea5a8d..4a68309b 100644 --- a/hindsight-clients/go/model_create_mental_model_response.go +++ b/hindsight-clients/go/model_create_mental_model_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_delete_document_response.go b/hindsight-clients/go/model_delete_document_response.go index fa0b9e6a..922093a1 100644 --- a/hindsight-clients/go/model_delete_document_response.go +++ b/hindsight-clients/go/model_delete_document_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_delete_response.go b/hindsight-clients/go/model_delete_response.go index 94c35ec9..18e820ac 100644 --- a/hindsight-clients/go/model_delete_response.go +++ b/hindsight-clients/go/model_delete_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_directive_list_response.go b/hindsight-clients/go/model_directive_list_response.go index f4c035bd..34e1898b 100644 --- a/hindsight-clients/go/model_directive_list_response.go +++ b/hindsight-clients/go/model_directive_list_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_directive_response.go b/hindsight-clients/go/model_directive_response.go index b06fc2ac..6c0e1b42 100644 --- a/hindsight-clients/go/model_directive_response.go +++ b/hindsight-clients/go/model_directive_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_disposition_traits.go b/hindsight-clients/go/model_disposition_traits.go index 0a0d3b60..a88414d0 100644 --- a/hindsight-clients/go/model_disposition_traits.go +++ b/hindsight-clients/go/model_disposition_traits.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_document_response.go b/hindsight-clients/go/model_document_response.go index ce80067e..9d342d4f 100644 --- a/hindsight-clients/go/model_document_response.go +++ b/hindsight-clients/go/model_document_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_entity_detail_response.go b/hindsight-clients/go/model_entity_detail_response.go index 75e54f6f..bd668d22 100644 --- a/hindsight-clients/go/model_entity_detail_response.go +++ b/hindsight-clients/go/model_entity_detail_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_entity_include_options.go b/hindsight-clients/go/model_entity_include_options.go index e609f70b..1186da70 100644 --- a/hindsight-clients/go/model_entity_include_options.go +++ b/hindsight-clients/go/model_entity_include_options.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_entity_input.go b/hindsight-clients/go/model_entity_input.go index 56616996..7d1527e5 100644 --- a/hindsight-clients/go/model_entity_input.go +++ b/hindsight-clients/go/model_entity_input.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_entity_list_item.go b/hindsight-clients/go/model_entity_list_item.go index 040d602b..d14bc45c 100644 --- a/hindsight-clients/go/model_entity_list_item.go +++ b/hindsight-clients/go/model_entity_list_item.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_entity_list_response.go b/hindsight-clients/go/model_entity_list_response.go index eb5c9721..a998f08d 100644 --- a/hindsight-clients/go/model_entity_list_response.go +++ b/hindsight-clients/go/model_entity_list_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_entity_observation_response.go b/hindsight-clients/go/model_entity_observation_response.go index a35fdc35..5ac0ffae 100644 --- a/hindsight-clients/go/model_entity_observation_response.go +++ b/hindsight-clients/go/model_entity_observation_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_entity_state_response.go b/hindsight-clients/go/model_entity_state_response.go index 46cc03d7..d7fe3953 100644 --- a/hindsight-clients/go/model_entity_state_response.go +++ b/hindsight-clients/go/model_entity_state_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_features_info.go b/hindsight-clients/go/model_features_info.go index 32535422..4c287f15 100644 --- a/hindsight-clients/go/model_features_info.go +++ b/hindsight-clients/go/model_features_info.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_file_retain_response.go b/hindsight-clients/go/model_file_retain_response.go index 0ae64b19..6ddf88ed 100644 --- a/hindsight-clients/go/model_file_retain_response.go +++ b/hindsight-clients/go/model_file_retain_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_graph_data_response.go b/hindsight-clients/go/model_graph_data_response.go index 87658cc9..c1f63e00 100644 --- a/hindsight-clients/go/model_graph_data_response.go +++ b/hindsight-clients/go/model_graph_data_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_http_validation_error.go b/hindsight-clients/go/model_http_validation_error.go index 6d378041..3d3ddb39 100644 --- a/hindsight-clients/go/model_http_validation_error.go +++ b/hindsight-clients/go/model_http_validation_error.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_include_options.go b/hindsight-clients/go/model_include_options.go index c2d93163..adce0b93 100644 --- a/hindsight-clients/go/model_include_options.go +++ b/hindsight-clients/go/model_include_options.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_list_documents_response.go b/hindsight-clients/go/model_list_documents_response.go index 00e4b052..9b6c6e81 100644 --- a/hindsight-clients/go/model_list_documents_response.go +++ b/hindsight-clients/go/model_list_documents_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_list_memory_units_response.go b/hindsight-clients/go/model_list_memory_units_response.go index 61c6c628..9a7be212 100644 --- a/hindsight-clients/go/model_list_memory_units_response.go +++ b/hindsight-clients/go/model_list_memory_units_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_list_tags_response.go b/hindsight-clients/go/model_list_tags_response.go index aa84e4d6..4ec4dacf 100644 --- a/hindsight-clients/go/model_list_tags_response.go +++ b/hindsight-clients/go/model_list_tags_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_memory_item.go b/hindsight-clients/go/model_memory_item.go index ab91c6b5..b61128e2 100644 --- a/hindsight-clients/go/model_memory_item.go +++ b/hindsight-clients/go/model_memory_item.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_mental_model_list_response.go b/hindsight-clients/go/model_mental_model_list_response.go index 5d6835f6..8a987ab2 100644 --- a/hindsight-clients/go/model_mental_model_list_response.go +++ b/hindsight-clients/go/model_mental_model_list_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_mental_model_response.go b/hindsight-clients/go/model_mental_model_response.go index 805ab165..9a98fb16 100644 --- a/hindsight-clients/go/model_mental_model_response.go +++ b/hindsight-clients/go/model_mental_model_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_mental_model_trigger.go b/hindsight-clients/go/model_mental_model_trigger.go index 093cb121..56d4d6fd 100644 --- a/hindsight-clients/go/model_mental_model_trigger.go +++ b/hindsight-clients/go/model_mental_model_trigger.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_observation_scopes.go b/hindsight-clients/go/model_observation_scopes.go index f1737295..bbe3f72f 100644 --- a/hindsight-clients/go/model_observation_scopes.go +++ b/hindsight-clients/go/model_observation_scopes.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_operation_response.go b/hindsight-clients/go/model_operation_response.go index bd45b0f2..9be8710a 100644 --- a/hindsight-clients/go/model_operation_response.go +++ b/hindsight-clients/go/model_operation_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_operation_status_response.go b/hindsight-clients/go/model_operation_status_response.go index bac865b6..1546a4d1 100644 --- a/hindsight-clients/go/model_operation_status_response.go +++ b/hindsight-clients/go/model_operation_status_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_operations_list_response.go b/hindsight-clients/go/model_operations_list_response.go index d1d1d081..a59c2387 100644 --- a/hindsight-clients/go/model_operations_list_response.go +++ b/hindsight-clients/go/model_operations_list_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_recall_request.go b/hindsight-clients/go/model_recall_request.go index 9a9d115a..458efefd 100644 --- a/hindsight-clients/go/model_recall_request.go +++ b/hindsight-clients/go/model_recall_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_recall_response.go b/hindsight-clients/go/model_recall_response.go index 42d3f1dd..2af8908d 100644 --- a/hindsight-clients/go/model_recall_response.go +++ b/hindsight-clients/go/model_recall_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_recall_result.go b/hindsight-clients/go/model_recall_result.go index 29a236d3..126d87f2 100644 --- a/hindsight-clients/go/model_recall_result.go +++ b/hindsight-clients/go/model_recall_result.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_based_on.go b/hindsight-clients/go/model_reflect_based_on.go index c2e5acb5..19d12e7d 100644 --- a/hindsight-clients/go/model_reflect_based_on.go +++ b/hindsight-clients/go/model_reflect_based_on.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_directive.go b/hindsight-clients/go/model_reflect_directive.go index fa35cfc9..93a872b9 100644 --- a/hindsight-clients/go/model_reflect_directive.go +++ b/hindsight-clients/go/model_reflect_directive.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_fact.go b/hindsight-clients/go/model_reflect_fact.go index fbcb2377..e4152ca6 100644 --- a/hindsight-clients/go/model_reflect_fact.go +++ b/hindsight-clients/go/model_reflect_fact.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_include_options.go b/hindsight-clients/go/model_reflect_include_options.go index 7cc3022f..e0d67376 100644 --- a/hindsight-clients/go/model_reflect_include_options.go +++ b/hindsight-clients/go/model_reflect_include_options.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_llm_call.go b/hindsight-clients/go/model_reflect_llm_call.go index 66f18fc7..3e8cc46c 100644 --- a/hindsight-clients/go/model_reflect_llm_call.go +++ b/hindsight-clients/go/model_reflect_llm_call.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_mental_model.go b/hindsight-clients/go/model_reflect_mental_model.go index 9bebb2d5..1640569a 100644 --- a/hindsight-clients/go/model_reflect_mental_model.go +++ b/hindsight-clients/go/model_reflect_mental_model.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_request.go b/hindsight-clients/go/model_reflect_request.go index 431942f8..9cd33280 100644 --- a/hindsight-clients/go/model_reflect_request.go +++ b/hindsight-clients/go/model_reflect_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_response.go b/hindsight-clients/go/model_reflect_response.go index 1a420e67..8091a7d9 100644 --- a/hindsight-clients/go/model_reflect_response.go +++ b/hindsight-clients/go/model_reflect_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_tool_call.go b/hindsight-clients/go/model_reflect_tool_call.go index 587497a1..de20082e 100644 --- a/hindsight-clients/go/model_reflect_tool_call.go +++ b/hindsight-clients/go/model_reflect_tool_call.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_reflect_trace.go b/hindsight-clients/go/model_reflect_trace.go index e807efb6..9026adae 100644 --- a/hindsight-clients/go/model_reflect_trace.go +++ b/hindsight-clients/go/model_reflect_trace.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_retain_request.go b/hindsight-clients/go/model_retain_request.go index c7674001..75984549 100644 --- a/hindsight-clients/go/model_retain_request.go +++ b/hindsight-clients/go/model_retain_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_retain_response.go b/hindsight-clients/go/model_retain_response.go index 63db5ec0..7f0e6f00 100644 --- a/hindsight-clients/go/model_retain_response.go +++ b/hindsight-clients/go/model_retain_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_source_facts_include_options.go b/hindsight-clients/go/model_source_facts_include_options.go index f5d73610..286d020a 100644 --- a/hindsight-clients/go/model_source_facts_include_options.go +++ b/hindsight-clients/go/model_source_facts_include_options.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_tag_item.go b/hindsight-clients/go/model_tag_item.go index 7002ee20..c841130f 100644 --- a/hindsight-clients/go/model_tag_item.go +++ b/hindsight-clients/go/model_tag_item.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_timestamp.go b/hindsight-clients/go/model_timestamp.go index fc15a3fc..3b33ff4b 100644 --- a/hindsight-clients/go/model_timestamp.go +++ b/hindsight-clients/go/model_timestamp.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_token_usage.go b/hindsight-clients/go/model_token_usage.go index 95d8a806..dc4384f9 100644 --- a/hindsight-clients/go/model_token_usage.go +++ b/hindsight-clients/go/model_token_usage.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_tool_calls_include_options.go b/hindsight-clients/go/model_tool_calls_include_options.go index 46e2e091..1ee0a3c4 100644 --- a/hindsight-clients/go/model_tool_calls_include_options.go +++ b/hindsight-clients/go/model_tool_calls_include_options.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_update_directive_request.go b/hindsight-clients/go/model_update_directive_request.go index f5678c5e..521e2ec9 100644 --- a/hindsight-clients/go/model_update_directive_request.go +++ b/hindsight-clients/go/model_update_directive_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_update_disposition_request.go b/hindsight-clients/go/model_update_disposition_request.go index 314e825e..4e684311 100644 --- a/hindsight-clients/go/model_update_disposition_request.go +++ b/hindsight-clients/go/model_update_disposition_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_update_mental_model_request.go b/hindsight-clients/go/model_update_mental_model_request.go index 6dd73a9a..8bc1ca9d 100644 --- a/hindsight-clients/go/model_update_mental_model_request.go +++ b/hindsight-clients/go/model_update_mental_model_request.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_validation_error.go b/hindsight-clients/go/model_validation_error.go index 31642cc4..d9487e60 100644 --- a/hindsight-clients/go/model_validation_error.go +++ b/hindsight-clients/go/model_validation_error.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_validation_error_loc_inner.go b/hindsight-clients/go/model_validation_error_loc_inner.go index 27841368..1c2136f2 100644 --- a/hindsight-clients/go/model_validation_error_loc_inner.go +++ b/hindsight-clients/go/model_validation_error_loc_inner.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/model_version_response.go b/hindsight-clients/go/model_version_response.go index ffc320c5..ecd85e59 100644 --- a/hindsight-clients/go/model_version_response.go +++ b/hindsight-clients/go/model_version_response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/response.go b/hindsight-clients/go/response.go index 2faabc19..bd5747f0 100644 --- a/hindsight-clients/go/response.go +++ b/hindsight-clients/go/response.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/go/utils.go b/hindsight-clients/go/utils.go index 7a274b24..4fa0aab9 100644 --- a/hindsight-clients/go/utils.go +++ b/hindsight-clients/go/utils.go @@ -3,7 +3,7 @@ Hindsight HTTP API HTTP API for Hindsight -API version: 0.4.14 +API version: 0.4.15 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/hindsight-clients/python/hindsight_client_api/__init__.py b/hindsight-clients/python/hindsight_client_api/__init__.py index a1b13070..e5fd623e 100644 --- a/hindsight-clients/python/hindsight_client_api/__init__.py +++ b/hindsight-clients/python/hindsight_client_api/__init__.py @@ -7,7 +7,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/banks_api.py b/hindsight-clients/python/hindsight_client_api/api/banks_api.py index dcc65a96..e0d7d7f2 100644 --- a/hindsight-clients/python/hindsight_client_api/api/banks_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/banks_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/directives_api.py b/hindsight-clients/python/hindsight_client_api/api/directives_api.py index d4262451..3acff4b0 100644 --- a/hindsight-clients/python/hindsight_client_api/api/directives_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/directives_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/documents_api.py b/hindsight-clients/python/hindsight_client_api/api/documents_api.py index 51179c65..ef0267eb 100644 --- a/hindsight-clients/python/hindsight_client_api/api/documents_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/documents_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/entities_api.py b/hindsight-clients/python/hindsight_client_api/api/entities_api.py index 47c9febd..e65ff55d 100644 --- a/hindsight-clients/python/hindsight_client_api/api/entities_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/entities_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/files_api.py b/hindsight-clients/python/hindsight_client_api/api/files_api.py index 6f7c3777..e75284bb 100644 --- a/hindsight-clients/python/hindsight_client_api/api/files_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/files_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/memory_api.py b/hindsight-clients/python/hindsight_client_api/api/memory_api.py index c7d557cc..1928fda3 100644 --- a/hindsight-clients/python/hindsight_client_api/api/memory_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/memory_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/mental_models_api.py b/hindsight-clients/python/hindsight_client_api/api/mental_models_api.py index fbb78d0a..6efcc04c 100644 --- a/hindsight-clients/python/hindsight_client_api/api/mental_models_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/mental_models_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/monitoring_api.py b/hindsight-clients/python/hindsight_client_api/api/monitoring_api.py index 637a0359..fcdedbcc 100644 --- a/hindsight-clients/python/hindsight_client_api/api/monitoring_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/monitoring_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api/operations_api.py b/hindsight-clients/python/hindsight_client_api/api/operations_api.py index b551b32a..9dba8144 100644 --- a/hindsight-clients/python/hindsight_client_api/api/operations_api.py +++ b/hindsight-clients/python/hindsight_client_api/api/operations_api.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/api_client.py b/hindsight-clients/python/hindsight_client_api/api_client.py index 7bb76e0f..053891d5 100644 --- a/hindsight-clients/python/hindsight_client_api/api_client.py +++ b/hindsight-clients/python/hindsight_client_api/api_client.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/configuration.py b/hindsight-clients/python/hindsight_client_api/configuration.py index 02aa14f5..1bae67bf 100644 --- a/hindsight-clients/python/hindsight_client_api/configuration.py +++ b/hindsight-clients/python/hindsight_client_api/configuration.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -489,7 +489,7 @@ class Configuration: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 0.4.14\n"\ + "Version of the API: 0.4.15\n"\ "SDK Package Version: 0.0.7".\ format(env=sys.platform, pyversion=sys.version) diff --git a/hindsight-clients/python/hindsight_client_api/exceptions.py b/hindsight-clients/python/hindsight_client_api/exceptions.py index 78971220..8504287e 100644 --- a/hindsight-clients/python/hindsight_client_api/exceptions.py +++ b/hindsight-clients/python/hindsight_client_api/exceptions.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/__init__.py b/hindsight-clients/python/hindsight_client_api/models/__init__.py index 0d66df53..0e6bcf95 100644 --- a/hindsight-clients/python/hindsight_client_api/models/__init__.py +++ b/hindsight-clients/python/hindsight_client_api/models/__init__.py @@ -6,7 +6,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/add_background_request.py b/hindsight-clients/python/hindsight_client_api/models/add_background_request.py index 76fe07ce..aae262b8 100644 --- a/hindsight-clients/python/hindsight_client_api/models/add_background_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/add_background_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/async_operation_submit_response.py b/hindsight-clients/python/hindsight_client_api/models/async_operation_submit_response.py index 00c55573..4a336acd 100644 --- a/hindsight-clients/python/hindsight_client_api/models/async_operation_submit_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/async_operation_submit_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/background_response.py b/hindsight-clients/python/hindsight_client_api/models/background_response.py index ad700f75..a540d078 100644 --- a/hindsight-clients/python/hindsight_client_api/models/background_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/background_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/bank_config_response.py b/hindsight-clients/python/hindsight_client_api/models/bank_config_response.py index daf6e53e..45472f74 100644 --- a/hindsight-clients/python/hindsight_client_api/models/bank_config_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/bank_config_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/bank_config_update.py b/hindsight-clients/python/hindsight_client_api/models/bank_config_update.py index a5ff8596..d66c8fea 100644 --- a/hindsight-clients/python/hindsight_client_api/models/bank_config_update.py +++ b/hindsight-clients/python/hindsight_client_api/models/bank_config_update.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/bank_list_item.py b/hindsight-clients/python/hindsight_client_api/models/bank_list_item.py index 729f943a..8c8c3793 100644 --- a/hindsight-clients/python/hindsight_client_api/models/bank_list_item.py +++ b/hindsight-clients/python/hindsight_client_api/models/bank_list_item.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/bank_list_response.py b/hindsight-clients/python/hindsight_client_api/models/bank_list_response.py index f79415ca..dfed26d4 100644 --- a/hindsight-clients/python/hindsight_client_api/models/bank_list_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/bank_list_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/bank_profile_response.py b/hindsight-clients/python/hindsight_client_api/models/bank_profile_response.py index 832cbe4a..bafca3b5 100644 --- a/hindsight-clients/python/hindsight_client_api/models/bank_profile_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/bank_profile_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/bank_stats_response.py b/hindsight-clients/python/hindsight_client_api/models/bank_stats_response.py index 86972b6f..97967fa8 100644 --- a/hindsight-clients/python/hindsight_client_api/models/bank_stats_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/bank_stats_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/budget.py b/hindsight-clients/python/hindsight_client_api/models/budget.py index 6256d887..736f06be 100644 --- a/hindsight-clients/python/hindsight_client_api/models/budget.py +++ b/hindsight-clients/python/hindsight_client_api/models/budget.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/cancel_operation_response.py b/hindsight-clients/python/hindsight_client_api/models/cancel_operation_response.py index 0e47933a..ed5708f3 100644 --- a/hindsight-clients/python/hindsight_client_api/models/cancel_operation_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/cancel_operation_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/child_operation_status.py b/hindsight-clients/python/hindsight_client_api/models/child_operation_status.py index 289c267b..e479a333 100644 --- a/hindsight-clients/python/hindsight_client_api/models/child_operation_status.py +++ b/hindsight-clients/python/hindsight_client_api/models/child_operation_status.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/chunk_data.py b/hindsight-clients/python/hindsight_client_api/models/chunk_data.py index 53dead42..9daf4d40 100644 --- a/hindsight-clients/python/hindsight_client_api/models/chunk_data.py +++ b/hindsight-clients/python/hindsight_client_api/models/chunk_data.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/chunk_include_options.py b/hindsight-clients/python/hindsight_client_api/models/chunk_include_options.py index 8ec085e5..1f5fd935 100644 --- a/hindsight-clients/python/hindsight_client_api/models/chunk_include_options.py +++ b/hindsight-clients/python/hindsight_client_api/models/chunk_include_options.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/chunk_response.py b/hindsight-clients/python/hindsight_client_api/models/chunk_response.py index 1c2337b9..d61db605 100644 --- a/hindsight-clients/python/hindsight_client_api/models/chunk_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/chunk_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/clear_memory_observations_response.py b/hindsight-clients/python/hindsight_client_api/models/clear_memory_observations_response.py index 78a80e68..f736028b 100644 --- a/hindsight-clients/python/hindsight_client_api/models/clear_memory_observations_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/clear_memory_observations_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/consolidation_response.py b/hindsight-clients/python/hindsight_client_api/models/consolidation_response.py index 44abffaa..05c8be0a 100644 --- a/hindsight-clients/python/hindsight_client_api/models/consolidation_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/consolidation_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/create_bank_request.py b/hindsight-clients/python/hindsight_client_api/models/create_bank_request.py index 54110fef..2351eab5 100644 --- a/hindsight-clients/python/hindsight_client_api/models/create_bank_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/create_bank_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/create_directive_request.py b/hindsight-clients/python/hindsight_client_api/models/create_directive_request.py index af4e82dc..7908f5a1 100644 --- a/hindsight-clients/python/hindsight_client_api/models/create_directive_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/create_directive_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/create_mental_model_request.py b/hindsight-clients/python/hindsight_client_api/models/create_mental_model_request.py index 59e2c523..b2e86d30 100644 --- a/hindsight-clients/python/hindsight_client_api/models/create_mental_model_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/create_mental_model_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/create_mental_model_response.py b/hindsight-clients/python/hindsight_client_api/models/create_mental_model_response.py index 47175629..0dd54006 100644 --- a/hindsight-clients/python/hindsight_client_api/models/create_mental_model_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/create_mental_model_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/delete_document_response.py b/hindsight-clients/python/hindsight_client_api/models/delete_document_response.py index 277b3c91..f4ea2da1 100644 --- a/hindsight-clients/python/hindsight_client_api/models/delete_document_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/delete_document_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/delete_response.py b/hindsight-clients/python/hindsight_client_api/models/delete_response.py index c8de7e9e..a550b1b9 100644 --- a/hindsight-clients/python/hindsight_client_api/models/delete_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/delete_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/directive_list_response.py b/hindsight-clients/python/hindsight_client_api/models/directive_list_response.py index 17c0f9f8..268b8ffe 100644 --- a/hindsight-clients/python/hindsight_client_api/models/directive_list_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/directive_list_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/directive_response.py b/hindsight-clients/python/hindsight_client_api/models/directive_response.py index 102208c1..d5b7ff42 100644 --- a/hindsight-clients/python/hindsight_client_api/models/directive_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/directive_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/disposition_traits.py b/hindsight-clients/python/hindsight_client_api/models/disposition_traits.py index 20c2ca4f..bcf91810 100644 --- a/hindsight-clients/python/hindsight_client_api/models/disposition_traits.py +++ b/hindsight-clients/python/hindsight_client_api/models/disposition_traits.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/document_response.py b/hindsight-clients/python/hindsight_client_api/models/document_response.py index ff77539e..28c6a771 100644 --- a/hindsight-clients/python/hindsight_client_api/models/document_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/document_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/entity_detail_response.py b/hindsight-clients/python/hindsight_client_api/models/entity_detail_response.py index 73bede27..95314898 100644 --- a/hindsight-clients/python/hindsight_client_api/models/entity_detail_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/entity_detail_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/entity_include_options.py b/hindsight-clients/python/hindsight_client_api/models/entity_include_options.py index 2cf59cc5..2b2be52b 100644 --- a/hindsight-clients/python/hindsight_client_api/models/entity_include_options.py +++ b/hindsight-clients/python/hindsight_client_api/models/entity_include_options.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/entity_input.py b/hindsight-clients/python/hindsight_client_api/models/entity_input.py index 79adf01c..86b762e9 100644 --- a/hindsight-clients/python/hindsight_client_api/models/entity_input.py +++ b/hindsight-clients/python/hindsight_client_api/models/entity_input.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/entity_list_item.py b/hindsight-clients/python/hindsight_client_api/models/entity_list_item.py index d202e13f..b26e62e4 100644 --- a/hindsight-clients/python/hindsight_client_api/models/entity_list_item.py +++ b/hindsight-clients/python/hindsight_client_api/models/entity_list_item.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/entity_list_response.py b/hindsight-clients/python/hindsight_client_api/models/entity_list_response.py index 4bb4f3fb..28c642e9 100644 --- a/hindsight-clients/python/hindsight_client_api/models/entity_list_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/entity_list_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/entity_observation_response.py b/hindsight-clients/python/hindsight_client_api/models/entity_observation_response.py index e0857c0b..1f5c938a 100644 --- a/hindsight-clients/python/hindsight_client_api/models/entity_observation_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/entity_observation_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/entity_state_response.py b/hindsight-clients/python/hindsight_client_api/models/entity_state_response.py index 173f43dc..b082deea 100644 --- a/hindsight-clients/python/hindsight_client_api/models/entity_state_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/entity_state_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/features_info.py b/hindsight-clients/python/hindsight_client_api/models/features_info.py index 7ce84418..3562e316 100644 --- a/hindsight-clients/python/hindsight_client_api/models/features_info.py +++ b/hindsight-clients/python/hindsight_client_api/models/features_info.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/file_retain_response.py b/hindsight-clients/python/hindsight_client_api/models/file_retain_response.py index d2ce3695..09d775ad 100644 --- a/hindsight-clients/python/hindsight_client_api/models/file_retain_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/file_retain_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/graph_data_response.py b/hindsight-clients/python/hindsight_client_api/models/graph_data_response.py index fad5f483..a42a2419 100644 --- a/hindsight-clients/python/hindsight_client_api/models/graph_data_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/graph_data_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/http_validation_error.py b/hindsight-clients/python/hindsight_client_api/models/http_validation_error.py index 7be7919f..14a39a6c 100644 --- a/hindsight-clients/python/hindsight_client_api/models/http_validation_error.py +++ b/hindsight-clients/python/hindsight_client_api/models/http_validation_error.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/include_options.py b/hindsight-clients/python/hindsight_client_api/models/include_options.py index 1b28cfb0..7cad9551 100644 --- a/hindsight-clients/python/hindsight_client_api/models/include_options.py +++ b/hindsight-clients/python/hindsight_client_api/models/include_options.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/list_documents_response.py b/hindsight-clients/python/hindsight_client_api/models/list_documents_response.py index b8f3efa4..9a63e3d0 100644 --- a/hindsight-clients/python/hindsight_client_api/models/list_documents_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/list_documents_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/list_memory_units_response.py b/hindsight-clients/python/hindsight_client_api/models/list_memory_units_response.py index 883a1d1b..314af2e5 100644 --- a/hindsight-clients/python/hindsight_client_api/models/list_memory_units_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/list_memory_units_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/list_tags_response.py b/hindsight-clients/python/hindsight_client_api/models/list_tags_response.py index 1d35e5a0..17a61f6a 100644 --- a/hindsight-clients/python/hindsight_client_api/models/list_tags_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/list_tags_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/memory_item.py b/hindsight-clients/python/hindsight_client_api/models/memory_item.py index 09576069..d2f69a18 100644 --- a/hindsight-clients/python/hindsight_client_api/models/memory_item.py +++ b/hindsight-clients/python/hindsight_client_api/models/memory_item.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/mental_model_list_response.py b/hindsight-clients/python/hindsight_client_api/models/mental_model_list_response.py index cf467686..54de310b 100644 --- a/hindsight-clients/python/hindsight_client_api/models/mental_model_list_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/mental_model_list_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/mental_model_response.py b/hindsight-clients/python/hindsight_client_api/models/mental_model_response.py index e4bb2aa5..d30bc96c 100644 --- a/hindsight-clients/python/hindsight_client_api/models/mental_model_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/mental_model_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/mental_model_trigger.py b/hindsight-clients/python/hindsight_client_api/models/mental_model_trigger.py index a9d5e918..d2acd0df 100644 --- a/hindsight-clients/python/hindsight_client_api/models/mental_model_trigger.py +++ b/hindsight-clients/python/hindsight_client_api/models/mental_model_trigger.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/observation_scopes.py b/hindsight-clients/python/hindsight_client_api/models/observation_scopes.py index 50622fee..a095b482 100644 --- a/hindsight-clients/python/hindsight_client_api/models/observation_scopes.py +++ b/hindsight-clients/python/hindsight_client_api/models/observation_scopes.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/operation_response.py b/hindsight-clients/python/hindsight_client_api/models/operation_response.py index 4a37e094..e5d938eb 100644 --- a/hindsight-clients/python/hindsight_client_api/models/operation_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/operation_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/operation_status_response.py b/hindsight-clients/python/hindsight_client_api/models/operation_status_response.py index 12bcfac4..3f16d17a 100644 --- a/hindsight-clients/python/hindsight_client_api/models/operation_status_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/operation_status_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/operations_list_response.py b/hindsight-clients/python/hindsight_client_api/models/operations_list_response.py index c57602c0..db2a939f 100644 --- a/hindsight-clients/python/hindsight_client_api/models/operations_list_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/operations_list_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/recall_request.py b/hindsight-clients/python/hindsight_client_api/models/recall_request.py index b9473745..75fe54a5 100644 --- a/hindsight-clients/python/hindsight_client_api/models/recall_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/recall_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/recall_response.py b/hindsight-clients/python/hindsight_client_api/models/recall_response.py index 743491ac..f652666a 100644 --- a/hindsight-clients/python/hindsight_client_api/models/recall_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/recall_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/recall_result.py b/hindsight-clients/python/hindsight_client_api/models/recall_result.py index 7e0cab12..039bc343 100644 --- a/hindsight-clients/python/hindsight_client_api/models/recall_result.py +++ b/hindsight-clients/python/hindsight_client_api/models/recall_result.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_based_on.py b/hindsight-clients/python/hindsight_client_api/models/reflect_based_on.py index 6ce99601..220f9a05 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_based_on.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_based_on.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_directive.py b/hindsight-clients/python/hindsight_client_api/models/reflect_directive.py index 87033769..50b05ea9 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_directive.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_directive.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_fact.py b/hindsight-clients/python/hindsight_client_api/models/reflect_fact.py index bc431fd9..8c6b9c97 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_fact.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_fact.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_include_options.py b/hindsight-clients/python/hindsight_client_api/models/reflect_include_options.py index 4cad817b..8a8ab827 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_include_options.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_include_options.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_llm_call.py b/hindsight-clients/python/hindsight_client_api/models/reflect_llm_call.py index a7c05717..2f490ef5 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_llm_call.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_llm_call.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_mental_model.py b/hindsight-clients/python/hindsight_client_api/models/reflect_mental_model.py index c87dc64b..72ea00b7 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_mental_model.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_mental_model.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_request.py b/hindsight-clients/python/hindsight_client_api/models/reflect_request.py index e43a9470..bc6811c0 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_response.py b/hindsight-clients/python/hindsight_client_api/models/reflect_response.py index 81bc98c3..fa91a748 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_tool_call.py b/hindsight-clients/python/hindsight_client_api/models/reflect_tool_call.py index 63abe045..bbace558 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_tool_call.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_tool_call.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/reflect_trace.py b/hindsight-clients/python/hindsight_client_api/models/reflect_trace.py index 92870997..d4a54c04 100644 --- a/hindsight-clients/python/hindsight_client_api/models/reflect_trace.py +++ b/hindsight-clients/python/hindsight_client_api/models/reflect_trace.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/retain_request.py b/hindsight-clients/python/hindsight_client_api/models/retain_request.py index ccb996b0..6e408851 100644 --- a/hindsight-clients/python/hindsight_client_api/models/retain_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/retain_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/retain_response.py b/hindsight-clients/python/hindsight_client_api/models/retain_response.py index 8503cfab..7572118d 100644 --- a/hindsight-clients/python/hindsight_client_api/models/retain_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/retain_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/source_facts_include_options.py b/hindsight-clients/python/hindsight_client_api/models/source_facts_include_options.py index 68ab9d66..2a20332a 100644 --- a/hindsight-clients/python/hindsight_client_api/models/source_facts_include_options.py +++ b/hindsight-clients/python/hindsight_client_api/models/source_facts_include_options.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/tag_item.py b/hindsight-clients/python/hindsight_client_api/models/tag_item.py index 6b9f6a26..f3832dd2 100644 --- a/hindsight-clients/python/hindsight_client_api/models/tag_item.py +++ b/hindsight-clients/python/hindsight_client_api/models/tag_item.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/timestamp.py b/hindsight-clients/python/hindsight_client_api/models/timestamp.py index ed4fd12b..c9770048 100644 --- a/hindsight-clients/python/hindsight_client_api/models/timestamp.py +++ b/hindsight-clients/python/hindsight_client_api/models/timestamp.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/token_usage.py b/hindsight-clients/python/hindsight_client_api/models/token_usage.py index f92e1601..f9de210b 100644 --- a/hindsight-clients/python/hindsight_client_api/models/token_usage.py +++ b/hindsight-clients/python/hindsight_client_api/models/token_usage.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/tool_calls_include_options.py b/hindsight-clients/python/hindsight_client_api/models/tool_calls_include_options.py index 992a0e38..f66327a2 100644 --- a/hindsight-clients/python/hindsight_client_api/models/tool_calls_include_options.py +++ b/hindsight-clients/python/hindsight_client_api/models/tool_calls_include_options.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/update_directive_request.py b/hindsight-clients/python/hindsight_client_api/models/update_directive_request.py index 736c823a..ddf63819 100644 --- a/hindsight-clients/python/hindsight_client_api/models/update_directive_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/update_directive_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/update_disposition_request.py b/hindsight-clients/python/hindsight_client_api/models/update_disposition_request.py index 4b9bf562..cc1097df 100644 --- a/hindsight-clients/python/hindsight_client_api/models/update_disposition_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/update_disposition_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/update_mental_model_request.py b/hindsight-clients/python/hindsight_client_api/models/update_mental_model_request.py index af63cf5a..0c11f9bc 100644 --- a/hindsight-clients/python/hindsight_client_api/models/update_mental_model_request.py +++ b/hindsight-clients/python/hindsight_client_api/models/update_mental_model_request.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/validation_error.py b/hindsight-clients/python/hindsight_client_api/models/validation_error.py index 2bc9b2c7..9cef510e 100644 --- a/hindsight-clients/python/hindsight_client_api/models/validation_error.py +++ b/hindsight-clients/python/hindsight_client_api/models/validation_error.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/validation_error_loc_inner.py b/hindsight-clients/python/hindsight_client_api/models/validation_error_loc_inner.py index 4f9c6558..6bc5636d 100644 --- a/hindsight-clients/python/hindsight_client_api/models/validation_error_loc_inner.py +++ b/hindsight-clients/python/hindsight_client_api/models/validation_error_loc_inner.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/models/version_response.py b/hindsight-clients/python/hindsight_client_api/models/version_response.py index f75dea31..82f04d51 100644 --- a/hindsight-clients/python/hindsight_client_api/models/version_response.py +++ b/hindsight-clients/python/hindsight_client_api/models/version_response.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/hindsight_client_api/rest.py b/hindsight-clients/python/hindsight_client_api/rest.py index e8ac6cff..87444122 100644 --- a/hindsight-clients/python/hindsight_client_api/rest.py +++ b/hindsight-clients/python/hindsight_client_api/rest.py @@ -5,7 +5,7 @@ HTTP API for Hindsight - The version of the OpenAPI document: 0.4.14 + The version of the OpenAPI document: 0.4.15 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/hindsight-clients/python/pyproject.toml b/hindsight-clients/python/pyproject.toml index 4d95666d..90894adf 100644 --- a/hindsight-clients/python/pyproject.toml +++ b/hindsight-clients/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hindsight-client" -version = "0.4.14" +version = "0.4.15" description = "Python client for Hindsight - Semantic memory system with personality-driven thinking" authors = [ {name = "Hindsight Team"} diff --git a/hindsight-clients/typescript/package.json b/hindsight-clients/typescript/package.json index c231b621..be24388c 100644 --- a/hindsight-clients/typescript/package.json +++ b/hindsight-clients/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@vectorize-io/hindsight-client", - "version": "0.4.14", + "version": "0.4.15", "description": "TypeScript client for Hindsight - Semantic memory system with personality-driven thinking", "main": "./dist/src/index.js", "types": "./dist/src/index.d.ts", diff --git a/hindsight-control-plane/package.json b/hindsight-control-plane/package.json index c5b99593..d61564ec 100644 --- a/hindsight-control-plane/package.json +++ b/hindsight-control-plane/package.json @@ -1,6 +1,6 @@ { "name": "@vectorize-io/hindsight-control-plane", - "version": "0.4.14", + "version": "0.4.15", "description": "Control plane for Hindsight - Semantic memory system", "bin": { "hindsight-control-plane": "./bin/cli.js" diff --git a/hindsight-dev/pyproject.toml b/hindsight-dev/pyproject.toml index 0c403839..691d3ea8 100644 --- a/hindsight-dev/pyproject.toml +++ b/hindsight-dev/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "hindsight-dev" -version = "0.4.14" +version = "0.4.15" description = "Development utilities for Hindsight" requires-python = ">=3.11" dependencies = [ diff --git a/hindsight-docs/static/openapi.json b/hindsight-docs/static/openapi.json index 082ad671..a7ec3517 100644 --- a/hindsight-docs/static/openapi.json +++ b/hindsight-docs/static/openapi.json @@ -10,7 +10,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.4.14" + "version": "0.4.15" }, "paths": { "/health": { diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/api/documents.mdx b/hindsight-docs/versioned_docs/version-0.4/developer/api/documents.mdx index c6d25789..bd3ea29c 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/api/documents.mdx +++ b/hindsight-docs/versioned_docs/version-0.4/developer/api/documents.mdx @@ -131,6 +131,51 @@ hindsight document delete my-bank meeting-2024-03-15 Deleting a document permanently removes all memories extracted from it. This action cannot be undone. ::: +## List Documents + +List documents in a bank with optional filtering by ID and tags. + + + + + + + + + + +```bash +# List all documents +hindsight document list my-bank + +# Filter by ID substring +hindsight document list my-bank --q report + +# Filter by tags +hindsight document list my-bank --tags team-a --tags team-b +``` + + + + +### Filtering Options + +| Parameter | Description | +|---|---| +| `q` | Case-insensitive substring match on document ID. `report` matches `report-2024`, `annual-report`, etc. | +| `tags` | Filter by document tags. Accepts multiple values. | +| `tags_match` | How to match tags (default: `any_strict`). See below. | +| `limit` / `offset` | Pagination. Default limit is 100. | + +**`tags_match` modes:** + +| Mode | Behaviour | +|---|---| +| `any_strict` *(default)* | Document must have **at least one** of the specified tags. Untagged docs excluded. | +| `any` | Same as `any_strict` but also includes untagged documents. | +| `all_strict` | Document must have **all** specified tags. Untagged docs excluded. | +| `all` | Same as `all_strict` but also includes untagged documents. | + ## Document Response Format ```json diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/api/memory-banks.mdx b/hindsight-docs/versioned_docs/version-0.4/developer/api/memory-banks.mdx index 3e53a2a3..85bd477c 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/api/memory-banks.mdx +++ b/hindsight-docs/versioned_docs/version-0.4/developer/api/memory-banks.mdx @@ -83,6 +83,73 @@ Only active when `retain_extraction_mode` is `custom`. Replaces the built-in ext See [Retain configuration](/developer/configuration#retain) for environment variable names and defaults. +### entity_labels {#entity-labels} + +Defines a controlled vocabulary of `key:value` classification labels extracted at retain time and stored as entities. Because labels become entities, they automatically link memories in the knowledge graph (two memories with `pedagogy:scaffolding` are linked), improve semantic and BM25 retrieval, and optionally filter memories via the standard `tags`/`tags_match` API when `tag: true` is set on a group. + +Each entry in `entity_labels` is a **label group** — one classification dimension: + +```json +{ + "entity_labels": [ + { + "key": "engagement", + "description": "Student engagement level during the session", + "type": "value", + "optional": true, + "values": [ + { "value": "active", "description": "Student is actively participating" }, + { "value": "passive", "description": "Student is listening but not participating" } + ] + }, + { + "key": "pedagogy", + "description": "Teaching strategies used", + "type": "multi-values", + "values": [ + { "value": "scaffolding", "description": "Breaking complex tasks into smaller steps" }, + { "value": "direct_instruction", "description": "Explicit explanation by the teacher" }, + { "value": "socratic_questioning", "description": "Guiding through questions rather than answers" } + ] + } + ] +} +``` + +| Field | Default | Description | +|-------|---------|-------------| +| `key` | — | Label group identifier. Becomes the prefix in `key:value` entities. | +| `description` | `""` | Shown to the LLM to guide label assignment. | +| `type` | `"value"` | `"value"` → pick one enum value; `"multi-values"` → pick multiple; `"text"` → free-form string. | +| `values` | `[]` | Allowed values for `"value"` and `"multi-values"` types. Ignored for `"text"`. | +| `optional` | `true` | When `true` the LLM may skip the label if not applicable. When `false` the LLM must always assign a value. Has no effect on `"multi-values"` groups (always optional). | +| `tag` | `false` | When `true`, extracted `key:value` labels are also written as tags on the memory unit, enabling filtering via `tags`/`tags_match` in recall/reflect. | + +**Enum groups** (`type: "value"` or `type: "multi-values"`): the LLM picks from the predefined `values` list; anything outside the list is silently dropped. Vocabulary stays stable and graph links stay tight. Use `"multi-values"` when a fact can belong to several values at once. + +**Free-text groups** (`type: "text"`): the LLM writes any string. Use the `description` field to provide examples and guidance. Graph clustering is less reliable than with enum groups because the model may phrase the same concept differently across sessions. + +```json +{ + "key": "topic", + "description": "Specific subject being discussed. Examples: algebra, quadratic equations, geometry.", + "type": "text", + "optional": true, + "values": [] +} +``` + +### entities_allow_free_form + +By default, entity labels are extracted **alongside** regular named entities (people, places, concepts). Set to `false` to disable free-form extraction so only label entities are stored: + +```json +{ + "entity_labels": [...], + "entities_allow_free_form": false +} +``` + ### enable_observations {#observations-configuration} Toggles automatic observation consolidation on or off. Defaults to `true` when the observations feature is enabled on the server. diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/api/retain.mdx b/hindsight-docs/versioned_docs/version-0.4/developer/api/retain.mdx index 7149b59c..bd0df1e9 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/api/retain.mdx +++ b/hindsight-docs/versioned_docs/version-0.4/developer/api/retain.mdx @@ -66,9 +66,15 @@ The raw text to store. This is the only required field. Hindsight chunks the con ### timestamp -When the event described in the content actually occurred. Accepts any ISO 8601 string (e.g., `"2024-01-15T10:30:00Z"`). If omitted, defaults to the current time at ingestion. +When the event described in the content actually occurred. Three forms are accepted: -The timestamp is injected verbatim into the LLM fact-extraction prompt so the model can resolve relative temporal references in the content — for example, if the content says "last Monday", the model uses the provided timestamp as the anchor to pin down the actual date. It also enables temporal recall queries like "What happened last spring?" to work correctly. +| Value | Behaviour | +|-------|-----------| +| Omitted / `null` | Defaults to the current time at ingestion. | +| ISO 8601 string (e.g. `"2024-01-15T10:30:00Z"`) | Uses the provided datetime. | +| `"unset"` | Stores the content **without any timestamp**. Use this for timeless material such as reference documents, books, or fictional content where no real event time exists. | + +The timestamp is injected into the LLM fact-extraction prompt so the model can resolve relative temporal references in the content — for example, if the content says "last Monday", the model uses the provided timestamp as the anchor to pin down the actual date. When `"unset"` is passed the prompt shows `Event Date: Unknown`, allowing the model to correctly return `N/A` for the `when` field of every extracted fact. Providing a real timestamp also enables temporal recall queries like "What happened last spring?" to work correctly. ### context @@ -114,6 +120,66 @@ Use consistent naming patterns to keep tag filtering predictable. Common convent See [Recall API](./recall#tags) for filtering by tags during retrieval. +### observation_scopes + +Controls which [observations](../observations) this memory contributes to during consolidation. Each scope runs an independent pass, creating or updating observations tagged with only that scope's tags. + +:::info Scope isolation +During consolidation, Hindsight uses `all_strict` matching to find existing observations to update — only observations whose tags exactly match the current scope are considered. This keeps scopes isolated: a memory consolidated under `["student:alice"]` will never bleed into an observation tagged `["student:alice", "teacher:bob"]`. +::: + +The examples below use a lesson transcript retained with `tags: ["student:alice", "teacher:bob", "session-id:s1"]`. + +#### combined *(default)* + +One consolidation pass using all tags together. The resulting observation is tagged with the full set. + +- Observations created: `["student:alice", "teacher:bob", "session-id:s1"]` +- ✗ *"What does Alice struggle with across all her sessions?"* — no match, because no observation was ever built for `student:alice` alone +- ✗ *"How does Bob teach?"* — no match for `teacher:bob` alone +- ✓ *"What happened in session s1 with Alice and Bob?"* — exact match + +**Use when** the memory is meaningful only as a whole and you never need to query any single tag in isolation. + +#### per_tag + +One consolidation pass per individual tag. Each tag gets its own isolated observation that grows with every new memory sharing that tag. + +- Observations created: `["student:alice"]` · `["teacher:bob"]` · `["session-id:s1"]` +- ✓ *"What does Alice struggle with across all her sessions?"* +- ✓ *"How does Bob teach?"* +- ✓ *"What happened in session s1?"* +- ✗ *"How does Alice perform specifically with Bob?"* — no observation for the `["student:alice", "teacher:bob"]` combination +- ✗ *"How does Bob teach in online sessions?"* — no observation for `["teacher:bob", "session-id:s1"]` + +**Use when** content involves multiple tags that each represent an independent subject — the most common choice for multi-party content like conversations, lessons, or support sessions. + +#### all_combinations + +One pass per subset of tags — singles, pairs, triples, and so on. For 3 tags that is 7 passes. + +- Observations created: all `"per_tag"` scopes above, plus `["student:alice", "teacher:bob"]` · `["student:alice", "session-id:s1"]` · `["teacher:bob", "session-id:s1"]` · `["student:alice", "teacher:bob", "session-id:s1"]` +- ✓ All questions from `"per_tag"` above +- ✓ *"How does Alice perform specifically with Bob?"* — matched by `["student:alice", "teacher:bob"]` + +**Use when** you need observations at every granularity — per tag, per pair, per group. + +#### custom + +Pass an explicit list of tag sets. Each inner list is one scope. + +```json +[["student:alice"], ["teacher:bob"], ["teacher:bob", "session-id:s1"]] +``` + +- Observations created: exactly those three scopes — nothing more +- ✓ *"What does Alice struggle with?"* +- ✓ *"How does Bob teach?"* +- ✓ *"How does Bob teach in session s1 specifically?"* +- ✗ *"What happened in session s1 regardless of teacher?"* — `["session-id:s1"]` alone was not included + +**Use when** you know exactly which combinations are meaningful and want to avoid unnecessary passes. + ### Response The synchronous retain response includes: diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/configuration.md b/hindsight-docs/versioned_docs/version-0.4/developer/configuration.md index cb5aea1b..4e642092 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/configuration.md +++ b/hindsight-docs/versioned_docs/version-0.4/developer/configuration.md @@ -553,6 +553,8 @@ Controls the retain (memory ingestion) pipeline. | `HINDSIGHT_API_RETAIN_BATCH_ENABLED` | Use LLM Batch API for fact extraction (50% cost savings, only with async operations) | `false` | | `HINDSIGHT_API_RETAIN_BATCH_POLL_INTERVAL_SECONDS` | Batch API polling interval in seconds | `60` | +> **Entity labels** (`entity_labels`) and **free-form entity extraction** (`entities_allow_free_form`) are configured per bank via the [bank config API](/developer/api/memory-banks#retain-configuration), not as global environment variables — each bank can have its own controlled vocabulary. See [Entity Labels](/developer/retain#entity-labels) for details. + #### Customizing retain: when to use what There are three levels of customization for the retain pipeline. Start with the simplest that covers your needs: @@ -780,6 +782,7 @@ export HINDSIGHT_API_OBSERVATIONS_MISSION="Observations are recurring patterns i | Variable | Description | Default | |----------|-------------|---------| | `HINDSIGHT_API_REFLECT_MAX_ITERATIONS` | Max tool call iterations before forcing a response | `10` | +| `HINDSIGHT_API_REFLECT_MAX_CONTEXT_TOKENS` | Max accumulated context tokens in the reflect loop before forcing final synthesis. Prevents `context_length_exceeded` errors on large banks. Lower this if your LLM has a context window smaller than 128K. | `100000` | | `HINDSIGHT_API_REFLECT_MISSION` | Global reflect mission (identity and reasoning framing). Overridden per bank via config API. | - | #### Disposition diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/extensions.md b/hindsight-docs/versioned_docs/version-0.4/developer/extensions.md index 3264fe2e..ba8ef011 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/extensions.md +++ b/hindsight-docs/versioned_docs/version-0.4/developer/extensions.md @@ -40,6 +40,10 @@ For other multi-tenant setups with separate schemas per tenant (e.g., custom JWT Adds custom HTTP endpoints under the `/ext/` path prefix. Useful for adding domain-specific APIs that integrate with Hindsight's memory engine. +Provides two router methods: +- `get_router(memory)` — returns a FastAPI router mounted at `/ext/` +- `get_root_router(memory)` — returns a FastAPI router mounted at the application root (for well-known endpoints or other paths that must be at specific locations). Returns `None` by default. + **No built-in implementation** - implement your own to add custom endpoints. ```bash @@ -117,6 +121,7 @@ class JwtTenantExtension(TenantExtension): async def authenticate(self, context: RequestContext) -> TenantContext: token = context.api_key if not token: + # Optional headers dict is forwarded in HTTP/MCP error responses raise AuthenticationError("Bearer token required") try: @@ -129,6 +134,15 @@ class JwtTenantExtension(TenantExtension): raise AuthenticationError(str(e)) ``` +`AuthenticationError` accepts an optional `headers` dict that is forwarded in both HTTP and MCP error responses. This is useful for returning custom headers like `WWW-Authenticate`: + +```python +raise AuthenticationError( + "Authorization required", + headers={"WWW-Authenticate": 'Bearer realm="example"'}, +) +``` + ### Example: Custom HttpExtension ```python @@ -151,9 +165,20 @@ class MyHttpExtension(HttpExtension): return {"status": "ok"} return router + + def get_root_router(self, memory: MemoryEngine) -> APIRouter | None: + """Optional: mount routes at the application root (not under /ext/).""" + router = APIRouter() + + @router.get("/.well-known/my-metadata") + async def metadata(): + return {"version": "1.0"} + + return router ``` -Routes are available at `/ext/hello`, `/ext/custom/{bank_id}/action`, etc. +Routes from `get_router` are available at `/ext/hello`, `/ext/custom/{bank_id}/action`, etc. +Routes from `get_root_router` are mounted at the app root (e.g., `/.well-known/my-metadata`). ### Example: Custom OperationValidatorExtension diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/models.md b/hindsight-docs/versioned_docs/version-0.4/developer/models.md index 339bf6c5..59667ada 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/models.md +++ b/hindsight-docs/versioned_docs/version-0.4/developer/models.md @@ -26,6 +26,12 @@ Hindsight works with any provider that exposes an OpenAI-compatible API (e.g., A See [Configuration](./configuration#llm-provider) for setup examples. ::: +### Benchmarks + +Not sure which model to use? The **[Model Leaderboard](https://benchmarks.hindsight.vectorize.io/)** benchmarks models across accuracy, speed, cost, and reliability for retain, reflect, and observation consolidation so you can pick the right trade-off for your use case. + +[![Model Leaderboard](/img/leaderboard.png)](https://benchmarks.hindsight.vectorize.io/) + ### Tested Models The following models have been tested and verified to work correctly with Hindsight: diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/observations.mdx b/hindsight-docs/versioned_docs/version-0.4/developer/observations.mdx index b59de72e..e845aef9 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/observations.mdx +++ b/hindsight-docs/versioned_docs/version-0.4/developer/observations.mdx @@ -131,6 +131,14 @@ This ensures responses stay accurate even as the underlying data changes. --- +## Observation Scopes + +By default, observations are scoped to all of a memory's tags combined. The `observation_scopes` retain parameter lets you control this — building separate observations per tag, per combination, or with a custom list of scopes. This is key when a single memory carries multiple tags and you want each tag to accumulate its own observations independently. + +See [`observation_scopes` in the Retain API](./api/retain#observation_scopes) for the full explanation and options. + +--- + ## Observations Mission You can define exactly what this bank should synthesise by setting an **observations mission** (`observations_mission`). This replaces the built-in durable-knowledge rules with your own instructions, letting you control what shape observations take. diff --git a/hindsight-docs/versioned_docs/version-0.4/developer/retain.md b/hindsight-docs/versioned_docs/version-0.4/developer/retain.md index fc85d5e0..4966ef6f 100644 --- a/hindsight-docs/versioned_docs/version-0.4/developer/retain.md +++ b/hindsight-docs/versioned_docs/version-0.4/developer/retain.md @@ -90,6 +90,12 @@ The same entity mentioned different ways gets unified: If "Alice" appears with "Google" and "Stanford" multiple times, a new "Alice" mentioning those is likely the same person. Hindsight uses co-occurrence patterns to disambiguate common names. +### Entity Labels + +You can define a controlled vocabulary of `key:value` classification labels (e.g. `pedagogy:scaffolding`, `engagement:active`) that are extracted at retain time and stored as entities. Because labels become entities, they automatically link related memories in the knowledge graph and improve both semantic and keyword retrieval. Labels can optionally also write to the memory unit's tags, enabling standard tag-based filtering during recall and reflect. + +See [entity_labels in the bank config](/developer/api/memory-banks#entity-labels) for full configuration details. + --- ## Building Connections diff --git a/hindsight-docs/versioned_docs/version-0.4/sdks/integrations/chat.md b/hindsight-docs/versioned_docs/version-0.4/sdks/integrations/chat.md index 8b024f52..a35b3b18 100644 --- a/hindsight-docs/versioned_docs/version-0.4/sdks/integrations/chat.md +++ b/hindsight-docs/versioned_docs/version-0.4/sdks/integrations/chat.md @@ -4,7 +4,7 @@ sidebar_position: 5 # Vercel Chat SDK -The `@vectorize-io/hindsight-chat` package gives your [Vercel Chat SDK](https://github.com/vercel/chat) bots persistent, per-user memory with a single handler wrapper. Works with Slack, Discord, Teams, Google Chat, GitHub, and Linear. +We built `@vectorize-io/hindsight-chat` to give [Vercel Chat SDK](https://github.com/vercel/chat) bots persistent, per-user memory with a single handler wrapper. The integration works across Slack, Discord, Teams, Google Chat, GitHub, and Linear — no custom plumbing required. ## Installation @@ -60,7 +60,7 @@ chat.onNewMention( ### `withHindsightChat(options, handler)` -Returns a standard Chat SDK handler `(thread, message) => Promise`. +`withHindsightChat` wraps your existing Chat SDK handler and injects memory context automatically. It returns a standard handler `(thread, message) => Promise` so it drops in without changing your handler signature. #### Options @@ -80,7 +80,7 @@ Returns a standard Chat SDK handler `(thread, message) => Promise`. ### Context (`ctx`) -The third argument passed to your handler: +We inject a third `ctx` argument into your handler that exposes the full Hindsight memory API scoped to the current user's bank: | Property/Method | Description | |----------------|-------------| @@ -160,4 +160,4 @@ chat.onNewMention( ## Error Handling -Memory failures never break your bot. Auto-recall and auto-retain errors are logged as warnings and the handler continues with empty memories. Manual `ctx.retain()`, `ctx.recall()`, and `ctx.reflect()` calls propagate errors normally so you can handle them as needed. +We designed the integration so that memory failures never break your bot. Auto-recall and auto-retain errors are caught internally, logged as warnings, and the handler continues with empty memories. Manual `ctx.retain()`, `ctx.recall()`, and `ctx.reflect()` calls propagate errors normally so you can handle them as needed. diff --git a/hindsight-docs/versioned_docs/version-0.4/sdks/integrations/pydantic-ai.md b/hindsight-docs/versioned_docs/version-0.4/sdks/integrations/pydantic-ai.md new file mode 100644 index 00000000..8f6e6baa --- /dev/null +++ b/hindsight-docs/versioned_docs/version-0.4/sdks/integrations/pydantic-ai.md @@ -0,0 +1,184 @@ +--- +sidebar_position: 6 +--- + +# Pydantic AI + +Persistent memory tools for [Pydantic AI](https://ai.pydantic.dev/) agents via Hindsight. Give your agents long-term memory with retain, recall, and reflect — all async-native with no thread-pool hacks. + +## Features + +- **Async-Native Tools** — Uses Pydantic AI's async tool interface directly (`aretain`, `arecall`, `areflect`) +- **Memory Instructions** — Auto-inject relevant memories into every agent run via `instructions=[...]` +- **Three Memory Tools** — Retain (store), Recall (search), Reflect (synthesize) — include any combination +- **Simple Configuration** — Configure once globally, or pass a client directly +- **Lightweight** — Depends on `pydantic-ai-slim` to avoid pulling in all model providers + +## Installation + +```bash +pip install hindsight-pydantic-ai +``` + +## Quick Start + +```python +from hindsight_client import Hindsight +from hindsight_pydantic_ai import create_hindsight_tools, memory_instructions +from pydantic_ai import Agent + +client = Hindsight(base_url="http://localhost:8888") + +agent = Agent( + "openai:gpt-4o", + tools=create_hindsight_tools(client=client, bank_id="user-123"), + instructions=[memory_instructions(client=client, bank_id="user-123")], +) + +result = await agent.run("What do you remember about my preferences?") +print(result.output) +``` + +The agent now has three tools it can call: + +- **`hindsight_retain`** — Store information to long-term memory +- **`hindsight_recall`** — Search long-term memory for relevant facts +- **`hindsight_reflect`** — Synthesize a reasoned answer from memories + +The `memory_instructions` callable automatically recalls relevant memories and injects them into the system prompt on every run. + +## Tools Only (No Auto-Injection) + +If you want the agent to decide when to use memory rather than always injecting context: + +```python +agent = Agent( + "openai:gpt-4o", + tools=create_hindsight_tools(client=client, bank_id="user-123"), +) +``` + +## Instructions Only (No Tools) + +If you just want memories auto-injected without giving the agent explicit memory tools: + +```python +agent = Agent( + "openai:gpt-4o", + instructions=[memory_instructions(client=client, bank_id="user-123")], +) +``` + +## Selecting Tools + +Include only the tools you need: + +```python +tools = create_hindsight_tools( + client=client, + bank_id="user-123", + include_retain=True, + include_recall=True, + include_reflect=False, # Omit reflect +) +``` + +## Global Configuration + +Instead of passing a client to every call, configure once: + +```python +from hindsight_pydantic_ai import configure, create_hindsight_tools + +configure( + hindsight_api_url="http://localhost:8888", + api_key="your-api-key", # Or set HINDSIGHT_API_KEY env var + budget="mid", # Recall budget: low/mid/high + max_tokens=4096, # Max tokens for recall results + tags=["env:prod"], # Tags for stored memories + recall_tags=["scope:global"], # Tags to filter recall + recall_tags_match="any", # Tag match mode: any/all/any_strict/all_strict +) + +# Now create tools without passing client — uses global config +tools = create_hindsight_tools(bank_id="user-123") +``` + +## Per-Tool Overrides + +Constructor arguments override global configuration: + +```python +tools = create_hindsight_tools( + bank_id="user-123", + budget="high", # Override global budget + max_tokens=8192, # Override global max_tokens + tags=["session:abc"], # Override global tags +) +``` + +## Memory Instructions Options + +Customize what memories get injected and how: + +```python +instructions_fn = memory_instructions( + client=client, + bank_id="user-123", + query="relevant context about the user", # What to search for + budget="low", # Keep it fast + max_results=5, # Limit injected memories + max_tokens=4096, # Max recall tokens + prefix="Relevant memories:\n", # Text before the memory list + tags=["scope:global"], # Filter by tags + tags_match="any", # Tag match mode +) +``` + +## API Reference + +### `create_hindsight_tools()` + +| Parameter | Default | Description | +|---|---|---| +| `bank_id` | *required* | Hindsight memory bank ID | +| `client` | `None` | Pre-configured Hindsight client | +| `hindsight_api_url` | `None` | API URL (used if no client provided) | +| `api_key` | `None` | API key (used if no client provided) | +| `budget` | `"mid"` | Recall/reflect budget level (low/mid/high) | +| `max_tokens` | `4096` | Maximum tokens for recall results | +| `tags` | `None` | Tags applied when storing memories | +| `recall_tags` | `None` | Tags to filter when searching | +| `recall_tags_match` | `"any"` | Tag matching mode | +| `include_retain` | `True` | Include the retain (store) tool | +| `include_recall` | `True` | Include the recall (search) tool | +| `include_reflect` | `True` | Include the reflect (synthesize) tool | + +### `memory_instructions()` + +| Parameter | Default | Description | +|---|---|---| +| `bank_id` | *required* | Hindsight memory bank ID | +| `client` | `None` | Pre-configured Hindsight client | +| `hindsight_api_url` | `None` | API URL (used if no client provided) | +| `api_key` | `None` | API key (used if no client provided) | +| `query` | `"relevant context about the user"` | Recall query for memory injection | +| `budget` | `"low"` | Recall budget level | +| `max_results` | `5` | Maximum memories to inject | +| `max_tokens` | `4096` | Maximum tokens for recall results | +| `prefix` | `"Relevant memories:\n"` | Text prepended before memory list | +| `tags` | `None` | Tags to filter recall results | +| `tags_match` | `"any"` | Tag matching mode | + +### `configure()` + +| Parameter | Default | Description | +|---|---|---| +| `hindsight_api_url` | Production API | Hindsight API URL | +| `api_key` | `HINDSIGHT_API_KEY` env | API key for authentication | +| `budget` | `"mid"` | Default recall budget level | +| `max_tokens` | `4096` | Default max tokens for recall | +| `tags` | `None` | Default tags for retain operations | +| `recall_tags` | `None` | Default tags to filter recall | +| `recall_tags_match` | `"any"` | Default tag matching mode | +| `verbose` | `False` | Enable verbose logging | diff --git a/hindsight-docs/versioned_sidebars/version-0.4-sidebars.json b/hindsight-docs/versioned_sidebars/version-0.4-sidebars.json index 0f86ed1c..00db81ee 100644 --- a/hindsight-docs/versioned_sidebars/version-0.4-sidebars.json +++ b/hindsight-docs/versioned_sidebars/version-0.4-sidebars.json @@ -224,6 +224,14 @@ "icon": "/img/icons/crewai.png" } }, + { + "type": "doc", + "id": "sdks/integrations/pydantic-ai", + "label": "Pydantic AI", + "customProps": { + "icon": "/img/icons/pydanticai.png" + } + }, { "type": "doc", "id": "sdks/integrations/skills", @@ -232,4 +240,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/hindsight-embed/hindsight_embed/__init__.py b/hindsight-embed/hindsight_embed/__init__.py index 6022470e..d24568fe 100644 --- a/hindsight-embed/hindsight_embed/__init__.py +++ b/hindsight-embed/hindsight_embed/__init__.py @@ -3,7 +3,7 @@ from .daemon_embed_manager import DaemonEmbedManager from .embed_manager import EmbedManager -__version__ = "0.4.14" +__version__ = "0.4.15" __all__ = [ "EmbedManager", diff --git a/hindsight-embed/pyproject.toml b/hindsight-embed/pyproject.toml index ec5d0b74..3cbc9de1 100644 --- a/hindsight-embed/pyproject.toml +++ b/hindsight-embed/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "hindsight-embed" -version = "0.4.14" +version = "0.4.15" description = "Hindsight embedded CLI - local memory operations without a server" readme = "README.md" requires-python = ">=3.11" diff --git a/hindsight-integrations/ai-sdk/package.json b/hindsight-integrations/ai-sdk/package.json index e7923c2a..e2c03444 100644 --- a/hindsight-integrations/ai-sdk/package.json +++ b/hindsight-integrations/ai-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@vectorize-io/hindsight-ai-sdk", - "version": "0.4.14", + "version": "0.4.15", "description": "Hindsight memory integration for Vercel AI SDK - Give your AI agents persistent, human-like memory", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/hindsight-integrations/chat/package.json b/hindsight-integrations/chat/package.json index bb304a35..ad95cf22 100644 --- a/hindsight-integrations/chat/package.json +++ b/hindsight-integrations/chat/package.json @@ -1,6 +1,6 @@ { "name": "@vectorize-io/hindsight-chat", - "version": "0.4.14", + "version": "0.4.15", "description": "Hindsight memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/hindsight-integrations/crewai/pyproject.toml b/hindsight-integrations/crewai/pyproject.toml index ba246aa4..d24c77ac 100644 --- a/hindsight-integrations/crewai/pyproject.toml +++ b/hindsight-integrations/crewai/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hindsight-crewai" -version = "0.4.14" +version = "0.4.15" description = "CrewAI memory integration via Hindsight - persistent memory for AI agent crews" readme = "README.md" requires-python = ">=3.10" diff --git a/hindsight-integrations/litellm/pyproject.toml b/hindsight-integrations/litellm/pyproject.toml index dcced80e..117e0243 100644 --- a/hindsight-integrations/litellm/pyproject.toml +++ b/hindsight-integrations/litellm/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hindsight-litellm" -version = "0.4.14" +version = "0.4.15" description = "Universal LLM memory integration via LiteLLM - works with 100+ providers" readme = "README.md" requires-python = ">=3.10" diff --git a/hindsight-integrations/openclaw/package.json b/hindsight-integrations/openclaw/package.json index 192126b3..b950a93e 100644 --- a/hindsight-integrations/openclaw/package.json +++ b/hindsight-integrations/openclaw/package.json @@ -1,6 +1,6 @@ { "name": "@vectorize-io/hindsight-openclaw", - "version": "0.4.14", + "version": "0.4.15", "description": "Hindsight memory plugin for OpenClaw - biomimetic long-term memory with fact extraction", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/hindsight-integrations/pydantic-ai/pyproject.toml b/hindsight-integrations/pydantic-ai/pyproject.toml index c88bfce4..a3993ee1 100644 --- a/hindsight-integrations/pydantic-ai/pyproject.toml +++ b/hindsight-integrations/pydantic-ai/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hindsight-pydantic-ai" -version = "0.1.0" +version = "0.4.15" description = "Pydantic AI integration for Hindsight - persistent memory tools for AI agents" requires-python = ">=3.10" license = { text = "MIT" } diff --git a/hindsight/pyproject.toml b/hindsight/pyproject.toml index d2eff092..ee46a13a 100644 --- a/hindsight/pyproject.toml +++ b/hindsight/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "hindsight-all" -version = "0.4.14" +version = "0.4.15" description = "Hindsight: Agent Memory That Works Like Human Memory - All-in-One Bundle" readme = "README.md" requires-python = ">=3.11" diff --git a/skills/hindsight-docs/references/cookbook/applications/chat-memory.md b/skills/hindsight-docs/references/cookbook/applications/chat-memory.md deleted file mode 100644 index cf36aa9e..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/chat-memory.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Chat Memory App - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/chat-memory) -::: - - -A demo chat application that uses Groq's `qwen/qwen3-32b` model with Hindsight for persistent per-user memory. - -## Features - -- 🧠 **Persistent Memory**: Each user gets their own memory bank that remembers conversations -- 🚀 **Fast AI**: Powered by Groq's high-speed inference -- 🎯 **Per-User Context**: Isolated memory per user with automatic context retrieval -- 💬 **Real-time Chat**: Instant responses with memory-augmented context - -## Setup - -### 1. Start Hindsight API - -First, start the Hindsight API server using Docker: - -```bash -export GROQ_API_KEY=your_groq_api_key_here - -# Start Hindsight with Groq as the LLM provider -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_PROVIDER=groq \ - -e HINDSIGHT_API_LLM_API_KEY=$GROQ_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL="openai/gpt-oss-20b" \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -- **API**: http://localhost:8888 -- **Control Plane UI**: http://localhost:9999 - -### 2. Configure Environment - -Copy your Groq API key to the environment file: - -```bash -# Update .env.local with your Groq API key -echo "GROQ_API_KEY=your_groq_api_key_here" > .env.local -echo "HINDSIGHT_API_URL=http://localhost:8888" >> .env.local -``` - -If you don't have one, you can get a free Groq API key here: https://console.groq.com/home - -### 3. Install Dependencies - -```bash -npm install -``` - -### 4. Run the App - -```bash -npm run dev -``` - -Open http://localhost:3000 in your browser. - -## How It Works - -1. **User Identity**: Each browser session gets a unique user ID -2. **Memory Bank Creation**: First message creates a personal memory bank in Hindsight -3. **Context Retrieval**: Before responding, relevant memories are retrieved -4. **Memory Augmented Response**: Groq generates responses with memory context -5. **Conversation Storage**: Each conversation is stored for future context - -## Architecture - -``` -User Message - ↓ -Next.js API Route (/api/chat) - ↓ -Hindsight.recall() → Get relevant memories - ↓ -Groq API → Generate response with memory context - ↓ -Hindsight.retain() → Store conversation - ↓ -Response to User -``` - -## Memory Bank Structure - -Each user gets their own isolated memory bank with: -- **Name**: "Chat Memory for [userId]" -- **Background**: Conversational AI assistant context -- **Disposition**: Empathetic (4), Low Skepticism (2), Balanced Literalism (3) - -## Try It Out - -1. **First Conversation**: Tell the assistant about yourself - - "Hi! I'm a software engineer from San Francisco. I love Python and machine learning." - -2. **Second Conversation**: Ask what it remembers - - "What do you know about me?" - - "What programming languages do I like?" - -3. **Context Building**: Continue sharing preferences - - "I prefer VS Code over other editors" - - "I'm working on a React project" - -4. **Memory Verification**: Visit the Hindsight Control Plane at http://localhost:9999 to see stored memories - -## Development - -- **Groq Model**: Uses `qwen/qwen3-32b` for fast, high-quality responses -- **Memory Storage**: Automatic conversation retention with context categorization -- **Memory Retrieval**: Semantic search with 2048 token budget for relevant context diff --git a/skills/hindsight-docs/references/cookbook/applications/deliveryman-demo.md b/skills/hindsight-docs/references/cookbook/applications/deliveryman-demo.md deleted file mode 100644 index 866c3e21..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/deliveryman-demo.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Deliveryman Demo - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/deliveryman-demo) -::: - - -A delivery agent simulation that demonstrates Hindsight's long-term memory capabilities. An AI agent navigates a multi-building office complex to deliver packages, learning employee locations and optimal paths over time through mental models. - -## Prerequisites - -- Python 3.11+ -- Node.js 18+ -- [uv](https://docs.astral.sh/uv/) (Python package manager) - -## Setup (Fresh Environment) - -### 1. Clone Repositories - -```bash -# Clone Hindsight (memory engine) -git clone https://github.com/anthropics/hindsight.git - -# Clone the cookbook (contains this demo) -git clone https://github.com/anthropics/hindsight-cookbook.git -``` - -### 2. Start Hindsight API - -```bash -cd hindsight -cp .env.example .env -``` - -Edit `.env` with your LLM configuration: - -```bash -HINDSIGHT_API_LLM_PROVIDER=groq -HINDSIGHT_API_LLM_API_KEY= -HINDSIGHT_API_LLM_MODEL=openai/gpt-oss-120b -HINDSIGHT_API_HOST=0.0.0.0 -HINDSIGHT_API_PORT=8888 -HINDSIGHT_API_ENABLE_OBSERVATIONS=true - -# Retain extraction settings (improves employee/location extraction) -HINDSIGHT_API_RETAIN_EXTRACTION_MODE=custom -HINDSIGHT_API_RETAIN_CUSTOM_INSTRUCTIONS="Delivery agent. Remember employee locations, building layout, and optimal paths." - -# Embedded database storage -PG0_DATA_DIR=/tmp/hindsight-data -``` - -Start the API: - -```bash -./scripts/dev/start-api.sh -# Runs on http://localhost:8888 -``` - -### 3. Start Hindsight Control Plane (Optional) - -The control plane provides a web UI for inspecting memory banks, facts, and mental models. - -```bash -cd hindsight -./scripts/dev/start-control-plane.sh -# Runs on a dynamic port (check terminal output) -``` - -### 4. Start Demo Backend - -```bash -cd hindsight-cookbook/deliveryman-demo/backend - -# Create virtual environment and install dependencies -python -m venv .venv -source .venv/bin/activate -pip install -r requirements.txt -``` - -Create `backend/.env`: - -```bash -OPENAI_API_KEY= -GROQ_API_KEY= -HINDSIGHT_API_URL=http://localhost:8888 -LLM_MODEL=openai/gpt-4o -``` - -Start the backend: - -```bash -./run.sh -# Or manually: -python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --ws wsproto --reload -``` - -**Note:** The `--ws wsproto` flag is required for WebSocket support. Without it, connections will fail with error 1006. - -### 5. Start Demo Frontend - -```bash -cd hindsight-cookbook/deliveryman-demo/frontend -npm install -npm run dev -# Runs on http://localhost:5173 -``` - -### 6. Open the Demo - -Navigate to http://localhost:5173 in your browser. - -## How It Works - -1. The agent receives a delivery task (e.g., "Deliver Package #3954 to Victor Huang") -2. It navigates a multi-building complex with floors, elevators, and sky bridges -3. Along the way it encounters employees and learns their locations -4. After each delivery, the conversation is sent to Hindsight via the **retain** API -5. Hindsight extracts facts (employee locations, building layout) and builds **mental models** -6. On subsequent deliveries, the agent queries Hindsight to recall what it learned - -## Architecture - -``` -Browser (5173) → Frontend (React + Phaser) - ↓ WebSocket - Backend (8000) → FastAPI + Delivery Agent - ↓ HTTP - Hindsight API (8888) → Memory Engine + PostgreSQL -``` - -## Troubleshooting - -| Problem | Solution | -|---------|----------| -| WebSocket error 1006 | Restart backend with `--ws wsproto` flag | -| Mental models missing employees | Check `HINDSIGHT_API_RETAIN_EXTRACTION_MODE=custom` is set | -| Hindsight connection refused | Verify Hindsight API is running on port 8888 | -| Frontend shows "Disconnected" | Check backend is running on port 8000 | diff --git a/skills/hindsight-docs/references/cookbook/applications/go-memory-service.md b/skills/hindsight-docs/references/cookbook/applications/go-memory-service.md deleted file mode 100644 index ef0728fc..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/go-memory-service.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Go Memory-Augmented API - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/go-memory-service) -::: - - -A Go HTTP microservice demonstrating per-user memory isolation with Hindsight. Remembers each user's tech stack, problems solved, and preferences to provide personalized assistance. - -## Features - -- 🔐 **Per-User Isolation**: Each user gets their own memory bank -- 🧠 **Context-Aware Responses**: Uses recall + reflect for personalized answers -- 🏃 **Fire-and-Forget Memory**: Background goroutines store interactions without blocking responses -- 🏷️ **Tag-Based Partitioning**: Organize memories by type (projects, debugging, preferences) - -## Setup - -### 1. Start Hindsight - -```bash -export OPENAI_API_KEY=your-key - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -### 2. Run the service - -```bash -go run main.go -``` - -### 3. Try it out - -```bash -# Store memories -curl -s localhost:8080/learn -d '{ - "user_id": "alice", - "content": "I am building a Go microservice with gRPC and PostgreSQL", - "tags": ["project"] -}' - -curl -s localhost:8080/learn -d '{ - "user_id": "alice", - "content": "I prefer structured logging with slog over zerolog", - "tags": ["preferences"] -}' - -# Ask questions (uses recall + reflect) -curl -s localhost:8080/ask -d '{ - "user_id": "alice", - "query": "What tech stack am I using?" -}' | jq . - -# Raw memory recall -curl -s "localhost:8080/recall/alice?q=database" | jq . -``` - -## API Endpoints - -- `POST /learn` - Store new information for a user -- `POST /ask` - Ask a question using the user's memories -- `GET /recall/{userID}?q=query` - Direct memory recall -- `GET /health` - Health check - -## Key Patterns - -**Per-User Banks**: Each user gets an isolated memory bank (`user-alice`, `user-bob`) - -**Async Memory Storage**: Interactions are stored in background goroutines: - -```go -go func() { - bgCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - - retainReq := hindsight.RetainRequest{ - Items: []hindsight.MemoryItem{{ - Content: interaction, - Context: *hindsight.NewNullableString(hindsight.PtrString("Q&A interaction")), - }}, - } - client.MemoryAPI.RetainMemories(bgCtx, bankID).RetainRequest(retainReq).Execute() -}() -``` - -**Tag-Based Filtering**: Partition memories within a bank by type for scoped retrieval - -## Learn More - -- [Go SDK Documentation](https://hindsight.vectorize.io/sdks/go) -- [Hindsight Documentation](https://hindsight.vectorize.io) diff --git a/skills/hindsight-docs/references/cookbook/applications/hindsight-litellm-demo.md b/skills/hindsight-docs/references/cookbook/applications/hindsight-litellm-demo.md deleted file mode 100644 index 6ec29c3c..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/hindsight-litellm-demo.md +++ /dev/null @@ -1,206 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Memory Approaches Comparison Demo - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/hindsight-litellm-demo) -::: - - -Interactive Streamlit app comparing three memory approaches for LLM applications: - -1. **No Memory** - Each query is independent (baseline) -2. **Full Conversation History** - Pass entire conversation (truncated to simulate context limits) -3. **Hindsight Memory** - Intelligent semantic memory retrieval - -This demo showcases how Hindsight's semantic memory outperforms traditional approaches, especially as conversations grow longer. - -## Quick Start - -```bash -# 1. Set your OpenAI API key -export OPENAI_API_KEY=your-key - -# 2. Start Hindsight server -docker run -d -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_PROVIDER=openai \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - ghcr.io/vectorize-io/hindsight:latest - -# 3. Run the demo -./run.sh -``` - -Then open http://localhost:8501 in your browser. - -## What This Demo Shows - -### The Problem with Traditional Approaches - -| Approach | How it Works | Limitation | -|----------|--------------|------------| -| **No Memory** | Each query standalone | Forgets everything between messages | -| **Full History** | Pass all messages to LLM | Token limits cause truncation - loses early context | -| **Hindsight** | Semantic retrieval of relevant facts | Retrieves what's relevant regardless of when it was said | - -### Key Insight - -After 5-10 messages, watch the **Full Conversation History** column start losing early context due to truncation (artificially set to 4 messages to demonstrate this quickly). Meanwhile, **Hindsight Memory** can still recall facts from the beginning because it uses semantic retrieval rather than sequential history. - -## Testing the Demo - -1. **Introduce yourself**: - - "Hi, I'm Sarah, a data scientist at Netflix" - - "I prefer Python and love machine learning" - -2. **Have several exchanges** about different topics - -3. **Test recall**: - - "What programming language should I use?" - - "What do you know about me?" - -Watch how the three columns respond differently as the conversation grows. - -## Features - -- **Side-by-side comparison** of all three approaches -- **Debug panels** showing what context each approach uses -- **Memory explorer** to search Hindsight memories directly -- **Configurable settings** for history truncation, max memories, etc. -- **Multi-provider support** via LiteLLM (OpenAI, Anthropic, Groq) - -## Prerequisites - -- Python 3.10+ -- Hindsight server running (Docker recommended) -- At least one LLM API key (OpenAI recommended) - -## Setup - -### Using run.sh (Recommended) - -```bash -# Set API key -export OPENAI_API_KEY=your-key - -# Start Hindsight, then run: -./run.sh -``` - -The script will check and install dependencies automatically. - -### Manual Setup - -```bash -# Install dependencies -pip install streamlit litellm - -# Install Hindsight packages -pip install hindsight-client hindsight-litellm - -# Run the app -streamlit run app.py -``` - -### Starting Hindsight Server - -```bash -docker run -d -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_PROVIDER=openai \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - ghcr.io/vectorize-io/hindsight:latest - -# Verify it's running -curl http://localhost:8888/health -``` - -## Configuration - -### Sidebar Options - -**Model Selection:** -- Provider: OpenAI, Anthropic, Groq -- Model: Various models per provider -- Custom model ID support - -**Full History Config:** -- Max Messages to Keep (default: 4 to demonstrate truncation) - -**Hindsight Config:** -- API URL (default: http://localhost:8888) -- Bank ID and Entity ID for memory isolation -- Max Memories to retrieve -- Recall Budget (low/mid/high) - -**Generation Settings:** -- Temperature -- Max Tokens -- System Prompt - -## Supported Models - -### OpenAI -- gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-4, gpt-3.5-turbo - -### Anthropic -- claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022 -- claude-3-opus-20240229, claude-3-sonnet-20240229 - -### Groq -- groq/llama-3.1-70b-versatile, groq/llama-3.1-8b-instant -- groq/mixtral-8x7b-32768 - -## Environment Variables - -```bash -# Required -export OPENAI_API_KEY=sk-... - -# Optional (for other providers) -export ANTHROPIC_API_KEY=sk-ant-... -export GROQ_API_KEY=gsk_... - -# Optional -export HINDSIGHT_URL=http://localhost:8888 -``` - -## Troubleshooting - -### Hindsight server not responding - -```bash -# Check if running -curl http://localhost:8888/health - -# Start with Docker -docker run -d -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_PROVIDER=openai \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - ghcr.io/vectorize-io/hindsight:latest -``` - -### hindsight-litellm not installed - -```bash -pip install hindsight-litellm -``` - -### API key errors - -Make sure the appropriate API key is set: -```bash -export OPENAI_API_KEY=your-key -``` - -## Related - -- [Hindsight](https://github.com/vectorize-io/hindsight) - Memory infrastructure for AI applications -- [hindsight-litellm](https://github.com/vectorize-io/hindsight/tree/main/hindsight-integrations/litellm) - LiteLLM integration package - -## License - -MIT diff --git a/skills/hindsight-docs/references/cookbook/applications/hindsight-tool-learning-demo.md b/skills/hindsight-docs/references/cookbook/applications/hindsight-tool-learning-demo.md deleted file mode 100644 index 81d10dbf..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/hindsight-tool-learning-demo.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Tool Learning Demo - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/hindsight-tool-learning-demo) -::: - - -An interactive Streamlit demo showing how Hindsight helps LLMs learn which tool to use when tool names are ambiguous. - -## The Problem - -When building AI agents with tool/function calling, tool names and descriptions aren't always clear. An LLM might randomly select between similarly-named tools, leading to incorrect behavior. - -## The Scenario - -This demo simulates a **customer service routing system** with two channels: - -| Tool | Description (What the LLM sees) | Actual Purpose (Hidden) | -|------|--------------------------------|------------------------| -| `route_to_channel_alpha` | "Routes to channel Alpha for appropriate request types" | Financial issues (refunds, billing, payments) | -| `route_to_channel_omega` | "Routes to channel Omega for appropriate request types" | Technical issues (bugs, features, errors) | - -The descriptions are **intentionally vague**! Without prior knowledge, the LLM must guess which channel handles what. - -## The Solution: Learning with Hindsight - -With Hindsight memory: -1. **Store routing feedback** about which channel handles which request type -2. **Retrieve learned knowledge** when making routing decisions -3. **Consistently route correctly** based on past experience - -## Quick Start - -### Prerequisites - -1. **Hindsight Server** running (Docker): -```bash -docker run -d -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_PROVIDER=openai \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - ghcr.io/vectorize-io/hindsight:latest -``` - -2. **OpenAI API Key**: -```bash -export OPENAI_API_KEY=your-key-here -``` - -### Run the Demo - -```bash -./run.sh -``` - -Or manually: -```bash -pip install -r requirements.txt -streamlit run app.py -``` - -## How to Use the Demo - -### Step 1: Test Without Memory (Baseline) - -1. Select a **Financial Request** (e.g., "I need a refund...") -2. Click **Route Request** -3. Observe: The "Without Hindsight" column may route incorrectly - -### Step 2: Route First Customer and Learn - -1. Route a customer → Both LLMs route simultaneously -2. Feedback is automatically stored to Hindsight -3. Wait ~5 seconds for Hindsight to index the memory - -### Step 3: Test With Memory - -1. Select another request (financial or technical) -2. Click **Route Request** -3. Observe: The "With Hindsight" column should now route correctly! - -### Step 4: View Statistics - -- See accuracy comparison between "Without Memory" vs "With Hindsight" -- Review test history to see the improvement over time - -## Demo Features - -- **Side-by-side comparison**: See routing results with and without memory -- **Pre-defined test requests**: Financial and technical scenarios -- **Custom requests**: Enter your own customer requests -- **Memory Explorer**: Query stored routing knowledge directly -- **Live statistics**: Track accuracy improvement - -## Key Insight - -> Even when tool names and descriptions don't reveal their purpose, Hindsight allows the LLM to **learn from experience** which tool to use for which type of request. - -This is especially valuable for: -- Enterprise systems with legacy tool names -- Multi-tenant systems where tools have generic names -- Agents that need to learn organization-specific workflows - -## Configuration - -| Setting | Default | Description | -|---------|---------|-------------| -| Model | gpt-4o-mini | LLM model for routing decisions | -| Temperature (No Memory) | 0.7 | Randomness for baseline tests | -| Hindsight API URL | http://localhost:8888 | Hindsight server URL | - -## Files - -- `app.py` - Main Streamlit application -- `requirements.txt` - Python dependencies -- `run.sh` - Launch script with dependency checking -- `README.md` - This file diff --git a/skills/hindsight-docs/references/cookbook/applications/openai-fitness-coach.md b/skills/hindsight-docs/references/cookbook/applications/openai-fitness-coach.md deleted file mode 100644 index d0971fc0..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/openai-fitness-coach.md +++ /dev/null @@ -1,315 +0,0 @@ ---- -sidebar_position: 6 ---- - -# OpenAI Agent + Hindsight Memory Integration - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/openai-fitness-coach) -::: - - -A fitness coach example demonstrating how to use **OpenAI Agents** with **Hindsight as a memory backend**. - -## What This Demonstrates - -This example showcases: - -- **OpenAI Assistants** handling conversation logic -- **Hindsight** providing sophisticated memory storage & retrieval -- **Function calling** to bridge them together -- **Streaming responses** for real-time interaction (enabled by default) -- **Bidirectional memory** - both user data AND coach observations stored -- **System-level post-processing** - automatic opinion storage for reliability -- **Temporal-semantic memory** queries via function tools -- **Enhanced preference learning** - coach learns and respects user likes/dislikes -- **Real-world integration pattern** for adding memory to AI agents - -## Architecture - -``` -User: "I ran 5K today, don't like tempo runs" - | -OpenAI Assistant - | -Function Call: store_memory(workout + preference) - | -Hindsight API (stores as world/agent) - | -OpenAI Assistant: "What should I focus on?" - | -Function Call: retrieve_memories("workouts and preferences") - | -Hindsight API (returns workouts + preferences) - | -OpenAI Assistant (analyzes, gives advice) - | -Function Call: store_memory(advice as opinion) - | -Hindsight API (stores coach's observation) - | -Personalized Answer -``` - -## Key Difference from Standard Demo - -| Component | Standard Demo | OpenAI Integration | -|-----------|---------------|-------------------| -| **Conversation** | Hindsight `/think` endpoint | OpenAI Assistant API | -| **Memory** | Hindsight (built-in) | Hindsight (via function calling) | -| **LLM** | Configured in Hindsight | OpenAI GPT-4 | -| **Opinion Formation** | Automatic in `/think` | Explicit via `store_memory(type="opinion")` | -| **Best For** | Hindsight-native apps | Integrating memory into existing OpenAI agents | - -## Quick Start - -### Prerequisites - -1. **OpenAI API Key** - ```bash - export OPENAI_API_KEY=your_openai_api_key - ``` - -2. **Hindsight API running** - ```bash - # Follow Hindsight setup instructions to start the API - # Default: http://localhost:8888 - ``` - -3. **Install dependencies** - ```bash - pip install openai requests - ``` - -### Run the Conversational Demo - -```bash -cd openai-fitness-coach -export OPENAI_API_KEY=your_key_here -python demo_conversational.py -``` - -The demo showcases: -1. **Natural language workout logging** - Tell the coach what you did conversationally -2. **Preference learning** - Express likes/dislikes and watch the coach adapt -3. **Goal tracking** - Set goals, track progress, achieve milestones -4. **Bidirectional memory** - Both your activities AND coach's advice are stored -5. **Streaming responses** - See responses appear in real-time -6. **7 interactive phases** - From goal setting to achievement recognition - -The demo uses a separate agent (`fitness-coach-demo`) to avoid mixing with real data. - -## Usage - -### Chat with Your Coach - -**Interactive mode:** -```bash -python openai_coach.py -``` - -**Single question:** -```bash -python openai_coach.py "What did I do for training this week?" -``` - -## How It Works - -### 1. Memory Tools (`memory_tools.py`) - -Defines function tools that the OpenAI Agent can call: - -```python -retrieve_memories(query, fact_types, top_k) -search_workouts(after_date, before_date, workout_type) -get_nutrition_summary(after_date, before_date) -get_user_goals() -get_coach_opinions(about) -``` - -Each function makes API calls to Hindsight to fetch relevant memories. - -### 2. OpenAI Agent (`openai_coach.py`) - -Creates an OpenAI Assistant with: -- Fitness coaching instructions -- Access to memory function tools -- Conversation management - -When you ask a question: -1. User message is sent to OpenAI Assistant -2. Assistant decides which memory functions to call -3. Functions fetch data from Hindsight -4. Assistant generates response using retrieved context - -### 3. Function Calling Flow - -```python -# User asks: "What did I run this week?" - -# OpenAI Assistant decides to call: -search_workouts( - after_date="2024-11-18", - workout_type="running" -) - -# Function retrieves from Hindsight: -{ - "results": [ - {"text": "User completed 45-minute cardio workout: running..."}, - {"text": "User completed 60-minute cardio workout: running..."} - ] -} - -# OpenAI Assistant generates response: -"This week you've done two runs: a 45-minute run on Monday -and a longer 60-minute run on Wednesday. Great consistency!" -``` - -## Example Questions - -Try asking: - -```bash -python openai_coach.py "What does my training look like this week?" -python openai_coach.py "Based on my workouts, should I rest today?" -python openai_coach.py "How is my nutrition supporting my goals?" -python openai_coach.py "What's my progress toward my goal?" -python openai_coach.py "Compare my training this month to last month" -``` - -The agent will automatically: -1. Identify what memories it needs -2. Call the appropriate function tools -3. Retrieve data from Hindsight -4. Generate a personalized response - -## Memory Types Retrieved - -The OpenAI Agent can retrieve different memory types from Hindsight: - -- **World Facts** (`fact_type: "world"`): Workouts, meals, activities -- **Agent Facts** (`fact_type: "agent"`): Goals, intentions -- **Opinions** (`fact_type: "opinion"`): Coach's observations about patterns - -## Customization - -### Add New Function Tools - -Edit `memory_tools.py` to add new capabilities: - -```python -def get_weekly_summary(week_offset: int = 0): - """Get a summary of a specific week.""" - # Implementation - pass - -# Add to MEMORY_TOOLS list -MEMORY_TOOLS.append({ - "type": "function", - "function": { - "name": "get_weekly_summary", - "description": "Get training summary for a specific week", - # ... parameters - } -}) - -# Add to FUNCTION_MAP -FUNCTION_MAP["get_weekly_summary"] = get_weekly_summary -``` - -### Modify Assistant Instructions - -Edit `openai_coach.py` to change the coach's personality or behavior: - -```python -assistant = client.beta.assistants.create( - name="Your Custom Coach", - instructions="Your custom instructions here...", - model="gpt-4o-mini", - tools=MEMORY_TOOLS -) -``` - -## Use Cases - -This pattern works for any application that needs memory: - -1. **Customer Support Agents** - Remember past conversations and issues -2. **Personal Assistants** - Remember preferences, schedules, past decisions -3. **Educational Tutors** - Track learning progress over time -4. **Health Coaches** - Monitor habits, progress, goals (like this example) -5. **Sales Assistants** - Remember customer interactions and preferences - -## Integration Pattern - -**To add Hindsight memory to your own OpenAI Agent:** - -1. Define function tools that call Hindsight API -2. Register them with your OpenAI Assistant -3. Implement function handlers to execute Hindsight queries -4. Let OpenAI Assistant decide when to retrieve memories - -The key benefit: **Separation of concerns** -- OpenAI = Conversation logic -- Hindsight = Memory storage, retrieval, temporal queries, entity linking - -## When to Use This vs. Standard Hindsight - -**Use OpenAI + Hindsight (this example) when:** -- You want OpenAI's conversation capabilities -- You're already using OpenAI Agents -- You want explicit control over when to retrieve memories -- You want to combine Hindsight with other OpenAI features - -**Use Hindsight directly when:** -- You want a complete memory-first solution -- You want automatic memory retrieval and opinion formation -- You want to use different LLM providers (not just OpenAI) -- You want the `/think` endpoint's integrated approach - -## Learning Points - -After running this demo, you'll understand: - -1. How to add sophisticated memory to any OpenAI Agent -2. How function calling bridges LLMs and memory systems -3. How temporal-semantic queries work via function tools -4. Real-world pattern for LLM + memory integration - -## Core Files - -- `demo_conversational.py` - Conversational demo showcasing preference learning and goal tracking -- `openai_coach.py` - OpenAI Assistant wrapper with streaming and memory integration -- `memory_tools.py` - Function calling tools that bridge to Hindsight API -- `.openai_assistant_id` - Saved assistant ID (auto-generated, gitignored) - -## Common Issues - -**"OPENAI_API_KEY not set"** -```bash -export OPENAI_API_KEY=your_api_key_here -``` - -**"Agent not found"** -- Make sure the Hindsight fitness-coach agent exists - -**"Connection refused"** -- Make sure Hindsight API is running on localhost:8888 - -## Next Steps - -1. Run the demo to see it in action -2. Try chatting with the coach: `python openai_coach.py` -3. Log your own workouts and meals -4. Experiment with different questions -5. Add custom function tools for your use case - ---- - -**Built with:** -- OpenAI Assistants API -- Hindsight (temporal-semantic memory) -- Function calling for integration diff --git a/skills/hindsight-docs/references/cookbook/applications/sanity-blog-memory.md b/skills/hindsight-docs/references/cookbook/applications/sanity-blog-memory.md deleted file mode 100644 index fc555869..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/sanity-blog-memory.md +++ /dev/null @@ -1,371 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Sanity CMS Blog Memory - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/sanity-blog-memory) -::: - - -A Hindsight cookbook recipe demonstrating how to sync blog posts from **Sanity CMS** to Hindsight agent memory, enabling semantic search, temporal queries, and AI-powered content insights. - -## Features - -- **Blog Post Sync**: Automatically sync all blog posts from Sanity to Hindsight -- **Document-based Upsert**: Idempotent syncing with `document_id` - re-running sync updates existing content -- **Semantic Search**: Find related content using natural language queries -- **Temporal Queries**: Ask "What did I write in January 2025?" -- **Reflect for Insights**: Generate AI-powered analysis of your blog content -- **Related Content Discovery**: Power "Related Posts" features with semantic similarity - -## Architecture - -``` -┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ -│ │ │ │ │ │ -│ Sanity CMS │───────▶│ Sync Script │───────▶│ Hindsight │ -│ (Content) │ GROQ │ (TypeScript) │ HTTP │ (Memory) │ -│ │ │ │ │ │ -└─────────────────┘ └─────────────────┘ └─────────────────┘ - │ - ▼ - ┌─────────────────┐ - │ │ - │ Your App │ - │ - Recall │ - │ - Reflect │ - │ │ - └─────────────────┘ -``` - -## Quick Start - -### 1. Start Hindsight - -Choose your preferred LLM provider: - -**Option A: Using Docker Compose (Recommended)** - -```bash -# Set your API key -export OPENAI_API_KEY=sk-... -# OR -export GOOGLE_API_KEY=... # Gemini (free tier available) -# OR -export GROQ_API_KEY=... # Groq (free tier available) - -# Start Hindsight -docker compose up -d -``` - -**Option B: Using Docker directly** - -```bash -export OPENAI_API_KEY=sk-... - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -- **API**: http://localhost:8888 -- **Control Plane UI**: http://localhost:9999 - -### 2. Configure Environment - -```bash -# Copy example config -cp .env.example .env - -# Edit with your values -nano .env -``` - -Required settings: -```bash -# Hindsight -HINDSIGHT_API_URL=http://localhost:8888 -HINDSIGHT_BANK_ID=blog-memory - -# Sanity CMS -SANITY_PROJECT_ID=your-project-id -SANITY_DATASET=production -``` - -### 3. Install Dependencies - -```bash -npm install -``` - -### 4. Sync Your Blog Posts - -```bash -npm run sync -``` - -Expected output: -``` -======================================= - Sanity -> Hindsight Blog Sync -======================================= - -Setting up memory bank... -Memory bank "blog-memory" ready - -Fetching posts from Sanity CMS... -Found 10 posts to sync - -Syncing posts to Hindsight... - [1/10] "Why I Chose Qwik"... done - [2/10] "Building AI Agents"... done - ... - -======================================= - Sync Complete -======================================= - Synced: 10 posts -``` - -### 5. Query Your Content - -```bash -npm run query -``` - -## Query Examples - -### Semantic Search - -Find related content using natural language: - -```typescript -import { recallMemory } from './hindsight-client.js'; - -// Find posts about AI agents -const result = await recallMemory('AI agents and automation', { - budget: 'mid', - maxTokens: 2048, -}); - -console.log(`Found ${result.results.length} relevant posts`); -``` - -### Temporal Queries - -Ask about content from specific time periods: - -```typescript -// Posts from January 2025 -const result = await recallMemory('What did I write about in January 2025?', { - queryTimestamp: '2025-01-31T23:59:59Z', -}); -``` - -### Reflect for Insights - -Generate AI-powered analysis of your content: - -```typescript -import { reflectOnMemory } from './hindsight-client.js'; - -// Analyze blog themes -const insights = await reflectOnMemory( - 'What are the main themes of my blog? What topics do I write about most?', - { budget: 'high' } -); - -console.log(insights.text); -``` - -### Related Content Discovery - -Power your "Related Posts" feature: - -```typescript -// Find posts similar to a specific article -const related = await recallMemory( - 'Find posts related to "Why I Chose Qwik for My Personal Website"', - { budget: 'mid' } -); -``` - -## Memory Structure - -Each blog post is stored with rich metadata for optimal recall: - -``` -# Blog Post: {title} - -**Published:** {date} -**URL:** {base_url}/blog/{slug} -**Tags:** {tags} -**Reading Time:** {reading_time} - -## Description -{description} - -## Content -{full_content} -``` - -Key features: -- **document_id**: `post:{slug}` - Enables upsert on re-sync -- **context**: `blog-post` - Categorizes the memory type -- **timestamp**: Post publication date - Enables temporal queries - -## Use Cases - -### 1. AI-Powered Blog Search - -Replace keyword search with semantic understanding: - -```typescript -// Old: keyword matching -const results = posts.filter(p => p.title.includes('React')); - -// New: semantic understanding -const result = await recallMemory('frontend framework tutorials'); -``` - -### 2. Content Recommendation Engine - -Generate personalized recommendations: - -```typescript -const recommendations = await reflectOnMemory( - 'Based on a reader interested in "AI automation", recommend related posts' -); -``` - -### 3. Writing Assistant - -Get topic suggestions based on your existing content: - -```typescript -const suggestions = await reflectOnMemory( - 'What topics should I write about next? What gaps exist in my content?' -); -``` - -### 4. Content Analytics - -Analyze your blog's evolution: - -```typescript -const analysis = await reflectOnMemory( - 'How have my writing topics evolved over the past year?' -); -``` - -## Configuration - -### Environment Variables - -| Variable | Description | Default | -|----------|-------------|---------| -| `HINDSIGHT_API_URL` | Hindsight API endpoint | `http://localhost:8888` | -| `HINDSIGHT_BANK_ID` | Memory bank identifier | `blog-memory` | -| `SANITY_PROJECT_ID` | Your Sanity project ID | (required) | -| `SANITY_DATASET` | Sanity dataset name | `production` | -| `SANITY_API_TOKEN` | Sanity API token (for private datasets) | (none) | -| `SANITY_API_VERSION` | Sanity API version | `2024-01-09` | -| `SITE_URL` | Your blog's base URL | `https://example.com` | - -### Memory Bank Disposition - -The memory bank is configured with disposition traits optimized for blog content: - -```typescript -{ - skepticism: 2, // Trusting - blog content is authoritative - literalism: 4, // Literal - exact content matters - empathy: 3, // Balanced -} -``` - -## Extending for Other CMS Platforms - -This pattern can be adapted for any CMS. The key components: - -### 1. CMS Client - -Replace `sanity-client.ts` with your CMS: - -```typescript -// contentful-client.ts -import { createClient } from 'contentful'; - -export async function getAllPosts(): Promise { - const client = createClient({...}); - const entries = await client.getEntries({ content_type: 'blogPost' }); - return entries.items.map(transformPost); -} -``` - -### 2. Content Transformation - -Ensure your content is formatted for semantic search: - -```typescript -function formatPostContent(post: BlogPost): string { - return `# ${post.title} - -**Published:** ${post.date} -... -${post.content}`; -} -``` - -### 3. Document ID Strategy - -Use a consistent document ID for upsert behavior: - -```typescript -await retainBlogPost(content, { - documentId: `post:${post.slug}`, // Unique, stable identifier - timestamp: post.date, -}); -``` - -## Troubleshooting - -### "Connection refused" error - -Make sure Hindsight is running: -```bash -docker compose up -d -curl http://localhost:8888/health -``` - -### "No posts found" during sync - -Check your Sanity configuration: -```bash -# Verify project ID -echo $SANITY_PROJECT_ID - -# Test GROQ query -npx sanity query '*[_type == "post"][0..2]{title}' -``` - -### Slow recall/reflect responses - -This is normal for the first query as Hindsight builds embeddings. Subsequent queries are faster. Use `budget: 'low'` for faster responses at the cost of recall quality. - -## Resources - -- [Hindsight Documentation](https://hindsight.vectorize.io/) -- [Hindsight GitHub](https://github.com/vectorize-io/hindsight) -- [Sanity CMS Documentation](https://www.sanity.io/docs) -- [Hindsight Cookbook](https://github.com/vectorize-io/hindsight-cookbook) - -## License - -MIT diff --git a/skills/hindsight-docs/references/cookbook/applications/stancetracker.md b/skills/hindsight-docs/references/cookbook/applications/stancetracker.md deleted file mode 100644 index 5d464017..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/stancetracker.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -sidebar_position: 8 ---- - -# Stance Tracker - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/stancetracker) -::: - - -An AI-powered application that tracks political candidates' stances on issues over time using Hindsight memory system and web scraping. - -## Features - -- **Geographic Targeting**: Track stances by country, state/province, and city -- **Multi-Candidate Tracking**: Monitor multiple candidates simultaneously -- **Temporal Analysis**: Historical stance tracking with configurable time ranges -- **Automated Scraping**: Periodic content collection with configurable frequencies (hourly/daily/weekly) -- **Stance Change Detection**: Automatic detection and highlighting of position changes -- **Interactive Timeline**: Visual graph showing stance evolution with reference callouts -- **Source Attribution**: All stances linked to verified sources with excerpts - -## Architecture - -### Memory System (Hindsight Integration) - -This app uses the Hindsight memory system from `github.com/vectorize-io/hindsight`: - -1. **Banks**: Each scraper agent has its own memory bank -2. **Retain**: Stores candidate statements and web scraping results -3. **Recall**: Semantic search to retrieve relevant memories -4. **Reflect**: Generates contextual analysis using stored memories -5. **Temporal Search**: Queries memories within specific time periods - -### Tech Stack - -- **Frontend**: Next.js 16, React, TypeScript, TailwindCSS -- **Visualization**: Recharts for timeline graphs -- **Backend**: Next.js API routes -- **Memory**: Hindsight (from github.com/vectorize-io/hindsight) -- **Database**: JSON file storage (no database required) -- **Web Search**: Tavily API -- **LLM**: OpenAI/Anthropic/Groq (configurable) -- **Scheduling**: node-cron - -## Prerequisites - -1. **Hindsight API** running (from github.com/vectorize-io/hindsight) -2. **API Keys**: - - Tavily API key (for web search) - - LLM provider API key (OpenAI, Anthropic, or Groq) - -## Setup - -### 1. Install Dependencies - -```bash -npm install -``` - -### 2. Configure Environment - -Copy `.env.example` to `.env` and fill in your credentials: - -```bash -cp .env.example .env -``` - -Edit `.env`: - -```env -# Hindsight API (from github.com/vectorize-io/hindsight) -HINDSIGHT_API_URL=http://localhost:8888 - -# Tavily API (for web search) -TAVILY_API_KEY=your_tavily_api_key_here - -# LLM Provider -LLM_PROVIDER=openai # or anthropic, groq -LLM_API_KEY=your_llm_api_key_here -LLM_MODEL=gpt-4-turbo-preview -``` - -### 3. Start Hindsight - -Clone and run Hindsight from github.com/vectorize-io/hindsight: - -```bash -# Clone and run github.com/vectorize-io/hindsight -cd /path/to/hindsight -cargo run --bin hindsight-server -``` - -Verify Hindsight is running at `http://localhost:8888` - -### 4. Run the Application - -```bash -npm run dev -``` - -Visit `http://localhost:3000` - -## Usage - -### Creating a Tracking Session - -1. **Set Location**: Enter country (required), state/province, and city (optional) -2. **Choose Topic**: Specify the issue to track (e.g., "Climate Change Policy") -3. **Add Candidates**: Enter names of candidates/politicians to track -4. **Configure Time Range**: Set historical start/end dates for initial analysis -5. **Set Frequency**: Choose how often to check for updates (hourly/daily/weekly) -6. **Start Tracking**: Click "Start Tracking" to begin - -### Viewing Results - -- **Timeline Graph**: Shows confidence levels of each candidate's stance over time -- **Stance Changes**: Red circles on the graph indicate detected position changes -- **Click Points**: Click any point to see detailed stance information and sources -- **Source Links**: Each stance includes links to original references - -### Managing Sessions - -- **Pause/Resume**: Temporarily stop or restart tracking -- **Run Now**: Trigger an immediate update outside the schedule -- **Status**: View current session status and frequency - -## API Endpoints - -### Sessions - -- `POST /api/sessions` - Create new tracking session -- `GET /api/sessions?id={id}` - Get session details -- `GET /api/sessions` - List all sessions -- `PATCH /api/sessions` - Update session status - -### Stances - -- `POST /api/stances` - Process candidate stance -- `GET /api/stances?sessionId={id}&candidate={name}` - Get stances - -### Scheduler - -- `POST /api/scheduler` - Control session scheduling - - Actions: `start`, `stop`, `run` - -## Hindsight Integration Examples - -### 1. Storing Memories - -```typescript -// Store web scraping results -await hindsightClient.retain(bankId, articleContent, { - context: 'web_search_result', - timestamp: articleDate, - metadata: { url: articleUrl } -}); -``` - -### 2. Semantic Search - -```typescript -// Search for relevant memories -const results = await hindsightClient.recall(bankId, query, { - budget: 'high', - maxTokens: 8192 -}); -``` - -### 3. Temporal Filtering - -```typescript -// Query memories up to a specific point in time -const results = await hindsightClient.recall(bankId, query, { - queryTimestamp: '2024-12-01T00:00:00Z' -}); -``` - -### 4. Contextual Analysis - -```typescript -// Generate analysis using stored memories -const response = await hindsightClient.reflect(bankId, - 'What is the candidate\'s stance on this issue?', - { budget: 'high' } -); -``` - -## Production Deployment - -### Vercel Deployment - -```bash -# Install Vercel CLI -npm i -g vercel - -# Deploy -vercel - -# Set environment variables in Vercel dashboard: -# - HINDSIGHT_API_URL -# - TAVILY_API_KEY -# - LLM_PROVIDER -# - LLM_API_KEY -# - LLM_MODEL -``` - -**Note**: The `data/` directory for JSON storage will be ephemeral on Vercel. For production, consider using a persistent database or object storage. - -## Development - -### Project Structure - -``` -stancetracker/ -├── app/ -│ ├── api/ # API routes -│ ├── globals.css # Global styles -│ ├── layout.tsx # Root layout -│ └── page.tsx # Main page -├── components/ # React components -├── lib/ -│ ├── db/ # JSON database utilities -│ ├── hindsight-client.ts # Hindsight API client -│ ├── llm-client.ts # LLM provider client -│ ├── web-scraper.ts # Tavily web scraper -│ ├── scraper-agent.ts # Content scraper -│ ├── rag-system.ts # Memory retrieval -│ ├── stance-extractor.ts # Stance analysis -│ ├── stance-pipeline.ts # Main pipeline -│ └── scheduler.ts # Job scheduling -└── types/ # TypeScript types -``` - -### Adding New LLM Providers - -Edit `lib/llm-client.ts` and add a new method: - -```typescript -private async newProviderComplete(messages, options) { - // Implementation -} -``` - -## Limitations - -- **Web Search**: Uses Tavily API which has rate limits -- **Source Verification**: Manual verification recommended for critical applications -- **Stance Extraction**: LLM-based, subject to model limitations -- **Storage**: JSON file storage is not suitable for high-scale production use -- **Rate Limits**: Respect API rate limits for Tavily, Hindsight, and LLM providers - -## Future Enhancements - -- [ ] Real-time social media monitoring -- [ ] Speech/video transcription analysis -- [ ] Multi-language support -- [ ] Sentiment analysis integration -- [ ] Comparative analysis dashboard -- [ ] Export to CSV/PDF -- [ ] Email notifications for stance changes -- [ ] Public API for third-party integrations - -## License - -MIT - -## Support - -For issues or questions, please check: -- Hindsight documentation: `github.com/vectorize-io/hindsight/README.md` -- Tavily API docs: https://tavily.com/ -- Project issues: Create an issue in the repository diff --git a/skills/hindsight-docs/references/cookbook/applications/taste-ai.md b/skills/hindsight-docs/references/cookbook/applications/taste-ai.md deleted file mode 100644 index b6883c16..00000000 --- a/skills/hindsight-docs/references/cookbook/applications/taste-ai.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -sidebar_position: 9 ---- - -# Hindsight AI SDK - Personal Chef - - -:::info Complete Application -This is a complete, runnable application demonstrating Hindsight integration. -[**View source on GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/tree/main/applications/taste-ai) -::: - - -A personal food assistant demonstrating three key Hindsight integrations using the [Vercel AI SDK v6](https://sdk.vercel.ai/docs). - -## Architecture: Single Bank with User Tags - -This demo uses a **single Hindsight bank** (`taste-ai`) for all users, with each user's data tagged using `user:${username}`. - -```typescript -// All users share the same bank -const BANK_ID = 'taste-ai'; - -// Each memory is tagged with the user -await hindsightTools.retain.execute({ - bankId: BANK_ID, - content: userData, - tags: [`user:${username}`], -}); -``` - -This architecture enables: -- **Per-user queries**: Filter by `user:alice` to get personalized results -- **Aggregated insights**: Query across all users to find popular recipes or common dietary patterns -- **Simplified management**: One bank to maintain instead of per-user banks - -## Three Hindsight Integrations - -### 1. Meal Suggestions with Memory Recall & Reflection - -Uses `recall` and `reflect` tools with AI SDK's agent-based approach to gather personalized context. - -```typescript -const contextResult = await generateText({ - model: llmModel, - tools: { - recall: hindsightTools.recall, - reflect: hindsightTools.reflect, - }, - toolChoice: 'auto', - prompt: `You are gathering context for personalized ${mealType} recipe suggestions. - -Use the recall tool to search for the user's food preferences, dislikes, and recent meals. -Then use the reflect tool to analyze their dietary patterns and restrictions. - -After gathering context, summarize their preferences and recent eating patterns.`, -}); -``` - -The AI agent autonomously: -- Searches memory for cuisine preferences and dietary restrictions -- Analyzes recent protein consumption for variety -- Identifies foods to avoid - -### 2. Goal Progress Tracking with Mental Models - -Uses mental models to automatically maintain updated insights about user progress. - -```typescript -// Create a mental model that auto-refreshes after new meals -await hindsightTools.createMentalModel.execute({ - bankId: BANK_ID, - mentalModelId: getMentalModelId(username, 'goals'), - name: `${username}'s Goal Progress`, - sourceQuery: `Analyze ${username}'s dietary goals and eating patterns. - Describe their progress towards their stated goals (weight loss, muscle gain, etc.).`, - tags: [`user:${username}`], - autoRefresh: true, // Refreshes automatically after consolidation -}); - -// Query the mental model for current insights -const result = await hindsightTools.queryMentalModel.execute({ - bankId: BANK_ID, - mentalModelId: mentalModelId, -}); -``` - -Mental models automatically: -- Track progress towards dietary goals -- Update after each new meal is logged -- Provide fresh insights without manual refresh - -### 3. Language Enforcement with Directives - -Uses directives to ensure all responses match user's language preference. - -```typescript -await hindsightClient.createDirective(BANK_ID, { - name: `${username}'s Language Preference`, - content: `Always respond in ${language}. All suggestions must be in ${language}.`, - priority: 100, - tags: [`user:${username}`, 'directive:language'], -}); -``` - -Directives are automatically injected when mental models generate insights, ensuring consistent language across all interactions. - -## Running the Demo - -```bash -npm install -npm run dev -``` - -**Requirements:** -- Hindsight server running at `http://localhost:8888` (or set `HINDSIGHT_URL`) -- Node.js 18+ - -## Learn More - -- [Hindsight AI SDK on npm](https://www.npmjs.com/package/@vectorize-io/hindsight-ai-sdk) -- [AI SDK Documentation](https://sdk.vercel.ai/docs) diff --git a/skills/hindsight-docs/references/cookbook/index.md b/skills/hindsight-docs/references/cookbook/index.md deleted file mode 100644 index ba631b27..00000000 --- a/skills/hindsight-docs/references/cookbook/index.md +++ /dev/null @@ -1,144 +0,0 @@ - - -
- -# Cookbook - -Learn how to build with Hindsight through practical examples: - -- **Recipes** - Step-by-step guides and patterns for common use cases -- **Applications** - Complete, runnable applications demonstrating Hindsight integration - - - - - -
diff --git a/skills/hindsight-docs/references/cookbook/recipes/fitness_tracker.md b/skills/hindsight-docs/references/cookbook/recipes/fitness_tracker.md deleted file mode 100644 index a411eede..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/fitness_tracker.md +++ /dev/null @@ -1,306 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Fitness Coach with Hindsight Memory - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/fitness_tracker.ipynb) -::: - - -A personalized fitness assistant that tracks your workouts, diet, recovery, and progress over time to give contextual advice. - -## Features -- Logs workout sessions with exercises and weights -- Tracks meals and dietary preferences -- Monitors recovery and sleep patterns -- Provides personalized training advice - -## Prerequisites -- OpenAI API key -- Hindsight running locally via Docker (see setup below) - -## Start Hindsight Locally - -Before running this notebook, start Hindsight in a terminal: - -```bash -export OPENAI_API_KEY="your-openai-api-key" - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -## 1. Install Dependencies - - -```python -!pip install -q hindsight-client openai nest-asyncio -``` - -## 2. Configure OpenAI API Key - -Enter your OpenAI API key when prompted (used by both Hindsight and the demo). - - -```python -import getpass -import os - -# Set OpenAI API key (used by both Hindsight and the demo) -if not os.getenv("OPENAI_API_KEY"): - os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ") - -print("API key configured!") -``` - -## 3. Initialize Clients - - -```python -import nest_asyncio -nest_asyncio.apply() - -from datetime import datetime -from openai import OpenAI -from hindsight_client import Hindsight - -# Initialize Hindsight client (connects to local Docker instance) -hindsight = Hindsight( - base_url=os.getenv("HINDSIGHT_BASE_URL", "http://localhost:8888"), -) - -openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) - -USER_ID = "fitness-user-demo" - -print("Clients initialized!") -``` - -## 4. Define Helper Functions - - -```python -def log_workout(workout_details: str) -> str: - """Log a workout session with timestamp.""" - today = datetime.now().strftime("%B %d, %Y") - hindsight.retain( - bank_id=USER_ID, - content=f"{today} - WORKOUT LOG: {workout_details}", - metadata={"category": "workout", "date": today}, - ) - return f"Logged workout for {today}: {workout_details}" - - -def log_meal(meal_details: str) -> str: - """Log a meal with timestamp.""" - today = datetime.now().strftime("%B %d, %Y") - hindsight.retain( - bank_id=USER_ID, - content=f"{today} - MEAL LOG: {meal_details}", - metadata={"category": "nutrition", "date": today}, - ) - return f"Logged meal for {today}: {meal_details}" - - -def log_recovery(recovery_details: str) -> str: - """Log recovery information (sleep, soreness, etc.).""" - today = datetime.now().strftime("%B %d, %Y") - hindsight.retain( - bank_id=USER_ID, - content=f"{today} - RECOVERY LOG: {recovery_details}", - metadata={"category": "recovery", "date": today}, - ) - return f"Logged recovery for {today}: {recovery_details}" - - -def store_user_profile(profile_info: str) -> str: - """Store user profile information.""" - hindsight.retain( - bank_id=USER_ID, - content=f"USER PROFILE: {profile_info}", - metadata={"category": "profile"}, - ) - return f"Stored profile info: {profile_info}" - - -def fitness_coach(user_query: str) -> str: - """Get personalized fitness advice based on query and user history.""" - memories = hindsight.recall( - bank_id=USER_ID, - query=f"fitness workout diet recovery goals {user_query}", - budget="high", - ) - - memory_context = "" - if memories and memories.results: - memory_context = "\n".join(f"- {m.text}" for m in memories.results[:10]) - - system_prompt = f"""You are a knowledgeable and supportive fitness coach. -You have access to the user's workout history, diet logs, recovery notes, and personal profile. - -What you know about this user: -{memory_context if memory_context else "No history recorded yet."} - -Provide personalized, actionable advice based on their: -- Training history and progress -- Dietary preferences and restrictions -- Recovery patterns -- Personal goals - -Be encouraging but realistic. Reference their specific history when relevant.""" - - response = openai_client.chat.completions.create( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": user_query}, - ], - temperature=0.7, - max_tokens=600, - ) - - advice = response.choices[0].message.content - - hindsight.retain( - bank_id=USER_ID, - content=f"User asked: {user_query}\nCoach advised: {advice[:200]}...", - metadata={"category": "coaching"}, - ) - - return advice - - -def get_progress_report() -> str: - """Generate a progress report based on workout history.""" - report = hindsight.reflect( - bank_id=USER_ID, - query="""Analyze this user's fitness journey: - 1. How consistent have they been with workouts? - 2. What progress have they made (weight lifted, exercises)? - 3. How is their recovery and sleep? - 4. What dietary patterns do you notice? - 5. What should they focus on next?""", - budget="high", - ) - return report.text if hasattr(report, 'text') else str(report) - -print("Helper functions defined!") -``` - -## 5. Set Up User Profile - - -```python -print("Setting up user profile...") - -profile_data = [ - "Name: Anish, Age: 26, Height: 5'10\", Weight: 72kg", - "Goal: Building lean muscle, started gym 6 months ago", - "Routine: Push-pull-legs split, 5x per week", - "Rest days: Wednesday and Sunday", - "Dietary restriction: Mild lactose intolerance, uses almond milk", - "Health note: Occasional knee pain, avoids deep squats", - "Supplements: Whey protein (lactose-free), magnesium", - "Sleep: Aims for 7+ hours, performance drops under 6 hours", -] - -for info in profile_data: - store_user_profile(info) - print(f" Stored: {info[:50]}...") -``` - -## 6. Log Workout History - - -```python -print("Logging workout history...") - -workouts = [ - "Push day: Bench press 3x8 @ 60kg, overhead press 4x12, tricep dips 3x10. Felt strong.", - "Pull day: Deadlift 3x5 @ 80kg, barbell rows 4x10, bicep curls 3x12. Good session.", - "Leg day: Leg press 4x12, hamstring curls 3x12, glute bridges 3x15. Knee felt okay.", -] - -for workout in workouts: - print(f" {log_workout(workout)[:60]}...") - -print("\nLogging recent meals...") -meals = [ - "Post-workout: Whey shake with almond milk, banana, oats", - "Dinner: Grilled chicken, brown rice, steamed vegetables", - "Snack: Greek yogurt (lactose-free) with berries", -] - -for meal in meals: - print(f" {log_meal(meal)[:60]}...") - -print("\nLogging recovery notes...") -recovery = [ - "Slept 7.5 hours, feeling well rested", - "Some DOMS in legs from yesterday, using turmeric milk", -] - -for note in recovery: - print(f" {log_recovery(note)[:60]}...") -``` - -## 7. Talk to Your Fitness Coach - - -```python -import time - -print("=" * 60) -print(" Talking to your fitness coach...") -print("=" * 60) - -queries = [ - "How much was I lifting for bench press recently?", - "I slept poorly last night (only 5 hours). What should I do for today's workout?", - "Suggest a post-workout meal that works with my dietary restrictions.", - "My knee has been bothering me more. Any exercise modifications?", -] - -for query in queries: - print(f"\nUser: {query}") - print("-" * 40) - response = fitness_coach(query) - print(f"Coach: {response}") - time.sleep(1) -``` - -## 8. Generate Progress Report - - -```python -print("=" * 60) -print(" Progress Report") -print("=" * 60) -print(get_progress_report()) -``` - -## 9. Try Your Own Query - - -```python -your_query = "What exercises should I do today?" # Change this! - -print(f"You: {your_query}") -print("-" * 40) -print(f"Coach: {fitness_coach(your_query)}") -``` - -## 10. Cleanup - - -```python -hindsight.close() -print("Client connection closed.") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/healthcare_assistant.md b/skills/hindsight-docs/references/cookbook/recipes/healthcare_assistant.md deleted file mode 100644 index 995f621b..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/healthcare_assistant.md +++ /dev/null @@ -1,299 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Healthcare Assistant with Hindsight Memory - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/healthcare_assistant.ipynb) -::: - - -A supportive healthcare chatbot that remembers patient history, symptoms, medications, and preferences to provide personalized guidance. - -## Disclaimer - -**This is a demo application and should NOT be used for actual medical advice. Always consult qualified healthcare professionals.** - -## Features -- Tracks symptoms, medications, and allergies -- Maintains patient history across conversations -- Provides health information and wellness tips -- Schedules appointments - -## Prerequisites -- OpenAI API key -- Hindsight running locally via Docker (see setup below) - -## Start Hindsight Locally - -Before running this notebook, start Hindsight in a terminal: - -```bash -export OPENAI_API_KEY="your-openai-api-key" - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -## 1. Install Dependencies - - -```python -!pip install -q hindsight-client openai nest-asyncio -``` - -## 2. Configure OpenAI API Key - -Enter your OpenAI API key when prompted (used by both Hindsight and the demo). - - -```python -import getpass -import os - -# Set OpenAI API key (used by both Hindsight and the demo) -if not os.getenv("OPENAI_API_KEY"): - os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ") - -print("API key configured!") -``` - -## 3. Initialize Clients - - -```python -import nest_asyncio -nest_asyncio.apply() - -from datetime import datetime -import random -from openai import OpenAI -from hindsight_client import Hindsight - -# Initialize Hindsight client (connects to local Docker instance) -hindsight = Hindsight( - base_url=os.getenv("HINDSIGHT_BASE_URL", "http://localhost:8888"), -) - -openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) - -PATIENT_ID = "patient-demo" - -def get_patient_bank_id(patient_id: str) -> str: - return f"patient-{patient_id}" - -print("Clients initialized!") -``` - -## 4. Define Helper Functions - - -```python -def store_patient_info(patient_id: str, info: str, category: str = "general") -> str: - """Store patient information.""" - bank_id = get_patient_bank_id(patient_id) - today = datetime.now().strftime("%B %d, %Y") - - hindsight.retain( - bank_id=bank_id, - content=f"{today} - {category.upper()}: {info}", - metadata={"category": category, "date": today}, - ) - - return f"Recorded {category}: {info}" - - -def get_patient_history(patient_id: str, query: str) -> str: - """Retrieve relevant patient history.""" - bank_id = get_patient_bank_id(patient_id) - - memories = hindsight.recall( - bank_id=bank_id, - query=query, - budget="high", - ) - - if memories and memories.results: - return "\n".join(f"- {m.text}" for m in memories.results[:10]) - return "No relevant history found." - - -def healthcare_chat(patient_id: str, user_message: str) -> str: - """Chat with the healthcare assistant.""" - bank_id = get_patient_bank_id(patient_id) - - history = get_patient_history( - patient_id, - f"symptoms medications allergies conditions {user_message}" - ) - - system_prompt = f"""You are a supportive healthcare assistant chatbot. - -IMPORTANT DISCLAIMERS: -- You are NOT a doctor and cannot provide medical diagnoses -- Always recommend consulting healthcare professionals for serious concerns -- Never prescribe medications or suggest stopping prescribed treatments - -Your role: -- Listen empathetically to patient concerns -- Remember and reference their medical history -- Provide general health information and wellness tips -- Help track symptoms over time -- Remind about medications and appointments -- Suggest when to seek professional care - -Patient History: -{history} - -Guidelines: -- Be warm and supportive -- Ask clarifying questions when needed -- Reference their history when relevant -- Flag any concerning symptoms for professional review""" - - response = openai_client.chat.completions.create( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": user_message}, - ], - temperature=0.7, - max_tokens=600, - ) - - answer = response.choices[0].message.content - - hindsight.retain( - bank_id=bank_id, - content=f"Patient concern: {user_message}\nGuidance provided: {answer[:200]}...", - metadata={"category": "consultation"}, - ) - - return answer - - -def get_health_summary(patient_id: str) -> str: - """Generate a health summary for the patient.""" - bank_id = get_patient_bank_id(patient_id) - - summary = hindsight.reflect( - bank_id=bank_id, - query="""Summarize this patient's health profile: - 1. Known conditions and diagnoses - 2. Current medications - 3. Allergies and sensitivities - 4. Recent symptoms reported - 5. Lifestyle factors mentioned - 6. Any patterns or trends in their health""", - budget="high", - ) - return summary.text if hasattr(summary, 'text') else str(summary) - - -def schedule_appointment(patient_id: str, appointment_type: str, preferred_time: str) -> str: - """Schedule an appointment (demo).""" - confirmation_id = f"APT-{random.randint(10000, 99999)}" - - store_patient_info( - patient_id, - f"Appointment scheduled: {appointment_type} - Preferred time: {preferred_time} - Confirmation: {confirmation_id}", - category="appointment" - ) - - return f"Appointment requested: {appointment_type}\nPreferred time: {preferred_time}\nConfirmation ID: {confirmation_id}\n\nA staff member will confirm the exact time within 24 hours." - -print("Helper functions defined!") -``` - -## 5. Set Up Patient Profile - - -```python -print("Setting up patient profile...") - -patient_info = [ - ("Age: 45, Male, Height: 5'11\", Weight: 185 lbs", "demographics"), - ("Allergy: Penicillin - causes hives", "allergies"), - ("Allergy: Shellfish - causes throat swelling", "allergies"), - ("Current medication: Lisinopril 10mg daily for blood pressure", "medications"), - ("Current medication: Metformin 500mg twice daily for Type 2 diabetes", "medications"), - ("Condition: Diagnosed with Type 2 diabetes in 2020", "conditions"), - ("Condition: Mild hypertension, well-controlled", "conditions"), - ("Family history: Father had heart disease", "family_history"), - ("Lifestyle: Sedentary job, trying to exercise more", "lifestyle"), -] - -for info, category in patient_info: - result = store_patient_info(PATIENT_ID, info, category) - print(f" {result}") -``` - -## 6. Healthcare Chat - - -```python -import time - -print("=" * 60) -print(" Healthcare Chat") -print("=" * 60) - -conversations = [ - "Hi, I've been having headaches for the past few days. Should I be worried?", - "The headaches are mostly in the afternoon. I've also been feeling more tired than usual.", - "I've been checking my blood sugar and it's been a bit higher lately, around 140-150 fasting.", - "Can you remind me what allergies I have? I'm going to a new restaurant.", -] - -for message in conversations: - print(f"\nPatient: {message}") - print("-" * 40) - response = healthcare_chat(PATIENT_ID, message) - print(f"Assistant: {response}") - time.sleep(1) -``` - -## 7. Schedule Appointment - - -```python -print("=" * 60) -print(" Scheduling Appointment") -print("=" * 60) -print(schedule_appointment(PATIENT_ID, "General checkup", "Next Tuesday afternoon")) -``` - -## 8. Health Summary - - -```python -print("=" * 60) -print(" Patient Health Summary") -print("=" * 60) -print(get_health_summary(PATIENT_ID)) -``` - -## 9. Try Your Own Question - - -```python -your_question = "Should I adjust my Metformin dose?" # Change this! - -print(f"You: {your_question}") -print("-" * 40) -print(f"Assistant: {healthcare_chat(PATIENT_ID, your_question)}") -``` - -## 10. Cleanup - - -```python -hindsight.close() -print("Client connection closed.") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/litellm-memory-demo.md b/skills/hindsight-docs/references/cookbook/recipes/litellm-memory-demo.md deleted file mode 100644 index d633f706..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/litellm-memory-demo.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Memory with LiteLLM - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/04-litellm-memory-demo.ipynb) -::: - - -This notebook demonstrates how to add persistent memory to any LLM app using the `hindsight-litellm` package. Memory storage and injection happen automatically via LiteLLM callbacks - no manual memory management needed! - -**Key features demonstrated:** -1. `configure()` + `enable()` - Set up automatic memory integration -2. Automatic storage - Conversations are stored after each LLM call -3. Automatic injection - Relevant memories are injected into prompts - -The `hindsight-litellm` package hooks into LiteLLM's callback system to: -- Store each conversation after successful LLM responses -- Inject relevant memories into the system prompt before LLM calls - -## Prerequisites - -Make sure you have Hindsight running: - -```bash -export OPENAI_API_KEY=your-key - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -- API: http://localhost:8888 -- UI: http://localhost:9999 - -## Installation - - -```python -!pip install hindsight-litellm litellm nest_asyncio python-dotenv -U -q -``` - -## Setup - - -```python -import os -import uuid -import time -import logging -import nest_asyncio -from dotenv import load_dotenv - -# Apply nest_asyncio for Jupyter compatibility -nest_asyncio.apply() - -# Load environment variables -load_dotenv() - -# Configure logging -logging.basicConfig(level=logging.INFO) -logging.getLogger("LiteLLM").setLevel(logging.WARNING) -logging.getLogger("LiteLLM Router").setLevel(logging.WARNING) -logging.getLogger("LiteLLM Proxy").setLevel(logging.WARNING) - -# Import hindsight_litellm -import hindsight_litellm - -# Configuration -HINDSIGHT_API_URL = os.getenv("HINDSIGHT_API_URL", "http://localhost:8888") - -# Check for API key -if not os.getenv("OPENAI_API_KEY"): - print("Warning: OPENAI_API_KEY not set") -``` - -## Configure and Enable Automatic Memory - -This is all you need! After this, all LiteLLM calls will automatically: -- Have relevant memories injected into the prompt -- Store conversations to Hindsight after the response - - -```python -# Generate a unique bank_id for this demo session -bank_id = f"demo-{uuid.uuid4().hex[:8]}" -print(f"Using bank_id: {bank_id}") - -# Configure and enable hindsight -hindsight_litellm.configure( - hindsight_api_url=HINDSIGHT_API_URL, - bank_id=bank_id, - store_conversations=True, # Automatically store conversations - inject_memories=True, # Automatically inject relevant memories - verbose=True, # Enable logging to debug memory operations -) -hindsight_litellm.enable() - -print("Hindsight memory integration enabled!") -``` - -## Conversation 1: User Introduces Themselves - -In this first conversation, the user shares some information about themselves. This will be automatically stored to Hindsight memory. - - -```python -user_message_1 = "Hi! I'm Alex and I work at Google as a software engineer. I love Python and machine learning." -print(f"User: {user_message_1}\n") - -# Use hindsight_litellm.completion() directly -response_1 = hindsight_litellm.completion( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": user_message_1} - ], -) - -assistant_response_1 = response_1.choices[0].message.content -print(f"Assistant: {assistant_response_1}") -print("\n(Conversation automatically stored to Hindsight)") -``` - -## Wait for Memory Processing - -Hindsight needs a few seconds to process and extract facts from the conversation. - - -```python -print("Waiting 12 seconds for memory processing...") -time.sleep(12) -print("Done!") -``` - -## Conversation 2: Test Memory-Augmented Response - -Now we start a fresh conversation and ask what the assistant remembers. The memories from the previous conversation will be automatically injected into the prompt! - - -```python -user_message_2 = "What do you know about me? What programming language should I use for my next project?" -print(f"User: {user_message_2}\n") - -# Memories are automatically injected before this call! -response_2 = hindsight_litellm.completion( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": user_message_2} - ], -) - -print(f"Assistant: {response_2.choices[0].message.content}") -``` - -## Summary - -The assistant should have remembered that Alex: -- Works at Google as a software engineer -- Loves Python and machine learning - -And it should have recommended Python based on that knowledge! - - -```python -print(f"Memories stored in bank: {bank_id}") -print(f"View in UI: http://localhost:9999/banks/{bank_id}") -``` - -## Cleanup - - -```python -hindsight_litellm.cleanup() - -# Optional: delete the bank -import requests -response = requests.delete(f"{HINDSIGHT_API_URL}/v1/default/banks/{bank_id}") -print(f"Deleted bank: {response.json()}") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/movie_recommendation.md b/skills/hindsight-docs/references/cookbook/recipes/movie_recommendation.md deleted file mode 100644 index 1dc3bf4a..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/movie_recommendation.md +++ /dev/null @@ -1,246 +0,0 @@ ---- -sidebar_position: 8 ---- - -# Movie Recommendation Assistant with Hindsight Memory - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/movie_recommendation.ipynb) -::: - - -A personalized movie recommender that remembers your preferences, watch history, and tastes to give better suggestions over time. - -## Features -- Remembers favorite genres, directors, and actors -- Tracks movies you've watched and enjoyed -- Provides contextual recommendations based on mood - -## Prerequisites -- OpenAI API key -- Hindsight running locally via Docker (see setup below) - -## Start Hindsight Locally - -Before running this notebook, start Hindsight in a terminal: - -```bash -export OPENAI_API_KEY="your-openai-api-key" - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -## 1. Install Dependencies - - -```python -!pip install -q hindsight-client openai nest-asyncio -``` - -## 2. Configure OpenAI API Key - -Enter your OpenAI API key when prompted (used by both Hindsight and the demo). - - -```python -import getpass -import os - -# Set OpenAI API key (used by both Hindsight and the demo) -if not os.getenv("OPENAI_API_KEY"): - os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ") - -print("API key configured!") -``` - -## 3. Initialize Clients - - -```python -import nest_asyncio -nest_asyncio.apply() - -from openai import OpenAI -from hindsight_client import Hindsight - -# Initialize Hindsight client (connects to local Docker instance) -hindsight = Hindsight( - base_url=os.getenv("HINDSIGHT_BASE_URL", "http://localhost:8888"), -) - -# Initialize OpenAI client -openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) - -# Unique identifier for this user's memory bank -USER_ID = "movie-fan-demo" - -print("Clients initialized!") -``` - -## 4. Define Helper Functions - -These functions demonstrate the three core Hindsight operations: -- **retain()**: Store memories -- **recall()**: Retrieve relevant memories -- **reflect()**: Synthesize insights from memories - - -```python -def get_recommendation(user_query: str) -> str: - """ - Get a movie recommendation based on user query and remembered preferences. - """ - # Recall relevant memories about this user's movie preferences - memories = hindsight.recall( - bank_id=USER_ID, - query=f"movie preferences tastes genres {user_query}", - budget="mid", - ) - - # Build context from memories - memory_context = "" - if memories and memories.results: - memory_context = "\n".join( - f"- {m.text}" for m in memories.results[:5] - ) - - # Generate recommendation with context - system_prompt = f"""You are a helpful movie recommendation assistant. -You remember the user's preferences and past conversations to give personalized suggestions. - -What you know about this user: -{memory_context if memory_context else "No previous preferences recorded yet."} - -Give thoughtful, personalized recommendations based on their tastes. -If they mention new preferences, acknowledge them.""" - - response = openai_client.chat.completions.create( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": user_query}, - ], - temperature=0.7, - max_tokens=500, - ) - - recommendation = response.choices[0].message.content - - # Store this interaction for future context - hindsight.retain( - bank_id=USER_ID, - content=f"User asked: {user_query}\nRecommendation given: {recommendation}", - metadata={"category": "movie_recommendation"}, - ) - - return recommendation - - -def store_preference(preference: str) -> None: - """Store an explicit user preference.""" - hindsight.retain( - bank_id=USER_ID, - content=f"User preference: {preference}", - metadata={"category": "preference"}, - ) - print(f"Stored preference: {preference}") - - -def get_preference_summary() -> str: - """Get a summary of what we know about the user's movie tastes.""" - summary = hindsight.reflect( - bank_id=USER_ID, - query="Summarize this user's movie preferences, favorite genres, actors they like, and movies they've mentioned enjoying or disliking.", - budget="high", - ) - return summary.text if hasattr(summary, 'text') else str(summary) - -print("Helper functions defined!") -``` - -## 5. Run the Demo - -Watch how the assistant learns and remembers preferences across conversations. - - -```python -import time - -print("=" * 60) -print(" Movie Recommendation Assistant with Memory") -print("=" * 60) -print() - -# Simulate a conversation over time -conversations = [ - "I'm looking for a movie to watch tonight. Any suggestions?", - "I really loved Inception and Interstellar. Christopher Nolan is amazing!", - "Can you suggest something similar to those? I like mind-bending plots.", - "Actually, I'm not in the mood for something heavy. Something lighter?", - "I watched The Grand Budapest Hotel last week and loved it!", - "What should I watch tonight? Remember what I like!", -] - -for i, query in enumerate(conversations, 1): - print(f"\n[Conversation {i}]") - print(f"User: {query}") - print("-" * 40) - - response = get_recommendation(query) - print(f"Assistant: {response}") - print() - - time.sleep(1) -``` - -## 6. View Learned Preferences - -Use `reflect()` to synthesize what Hindsight has learned about your movie tastes. - - -```python -print("=" * 60) -print(" What I've learned about your movie tastes:") -print("=" * 60) -print(get_preference_summary()) -``` - -## 7. Try Your Own Queries - -Experiment with your own movie preferences! - - -```python -# Try your own query! -your_query = "I'm in the mood for a sci-fi thriller" # Change this! - -print(f"You: {your_query}") -print("-" * 40) -print(f"Assistant: {get_recommendation(your_query)}") -``` - -## 8. Cleanup - -Close the Hindsight client connection. - - -```python -hindsight.close() -print("Client connection closed.") -``` - - -```python - -``` - - -```python - -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/per-user-memory.md b/skills/hindsight-docs/references/cookbook/recipes/per-user-memory.md deleted file mode 100644 index 9a7e79b2..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/per-user-memory.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Per-User Memory - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/02-per-user-memory.ipynb) -::: - - -The simplest pattern: give your agent persistent memory for each user. The agent remembers past conversations, user preferences, and context across sessions. - -## The Problem - -Without memory, every conversation starts from scratch: - -``` -Session 1: "I prefer dark mode and use Python" -Session 2: "What's my preferred language?" → Agent doesn't know -``` - -## The Solution: One Bank Per User - -``` -┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ -│ User A Bank │ │ User B Bank │ │ User C Bank │ -│ │ │ │ │ │ -│ - Conversations│ │ - Conversations│ │ - Conversations│ -│ - Preferences │ │ - Preferences │ │ - Preferences │ -│ - Context │ │ - Context │ │ - Context │ -└─────────────────┘ └─────────────────┘ └─────────────────┘ - │ │ │ - 100% isolated 100% isolated 100% isolated -``` - -Each user gets their own memory bank. Complete isolation, simple mental model. - - -```python -!pip install hindsight-client nest_asyncio openai python-dotenv -U -``` - -## 1. Create a Bank When User Signs Up - - -```python -# Jupyter notebooks already run an asyncio event loop. The hindsight client -# uses loop.run_until_complete() internally, but Python doesn't allow nested -# event loops by default. nest_asyncio patches this to allow nesting. -import nest_asyncio -nest_asyncio.apply() - -import os -from dotenv import load_dotenv -from openai import OpenAI as OpenAIClient - -# Load environment variables from .env file -# Copy .env.example to .env and fill in your values -load_dotenv() - -# Configuration (override with env vars if set) -HINDSIGHT_API_URL = os.getenv("HINDSIGHT_API_URL", "http://localhost:8888") -HINDSIGHT_UI_URL = os.getenv("HINDSIGHT_UI_URL", "http://localhost:9999") - -from hindsight_client import Hindsight - -client = Hindsight(base_url=HINDSIGHT_API_URL) -llm = OpenAIClient() # Uses OPENAI_API_KEY from .env - -def on_user_signup(user_id: str): - client.create_bank( - bank_id=f"user-{user_id}", - name=f"Memory for {user_id}" - ) - print(f"View bank: {HINDSIGHT_UI_URL}/banks/user-{user_id}?view=documents") -``` - -## 2. Manage Conversation Sessions - -Use `document_id` to group messages belonging to the same conversation. When you retain with the same `document_id`, Hindsight replaces the previous version (upsert behavior), keeping the memory up-to-date as the conversation evolves. - - -```python -import uuid -import json - -class ConversationSession: - def __init__(self, user_id: str): - self.user_id = user_id - self.session_id = str(uuid.uuid4()) # Unique ID for this conversation - self.messages = [] - - def add_message(self, role: str, content: str): - self.messages.append({"role": role, "content": content}) - - def save(self, client: Hindsight): - """Save the entire conversation. Replaces previous version if session_id exists.""" - # Convert messages to string format for retain - content = "\n".join([f"{m['role']}: {m['content']}" for m in self.messages]) - client.retain( - bank_id=f"user-{self.user_id}", - content=content, - document_id=self.session_id # Same ID = upsert (replace old version) - ) -``` - -## 3. Recall Context Before Responding - - -```python -def get_context(user_id: str, query: str): - result = client.recall( - bank_id=f"user-{user_id}", - query=query - ) - return result.results -``` - -## 4. Complete Agent Loop - - -```python -def format_results(results): - """Format recall results for the prompt.""" - if not results: - return "No relevant memories found." - return "\n".join([f"- {r.text}" for r in results]) - -def format_messages(messages): - """Format conversation messages for the prompt.""" - return "\n".join([f"{m['role']}: {m['content']}" for m in messages]) - -def handle_message(session: ConversationSession, user_message: str): - # 1. Add user message to session - session.add_message("user", user_message) - - # 2. Recall relevant context from past conversations - context = client.recall( - bank_id=f"user-{session.user_id}", - query=user_message - ) - - # 3. Build system prompt with memory - system_prompt = f"""You are a helpful assistant with memory of past conversations. - -## What you remember about this user -{format_results(context.results)} - -Respond helpfully and reference relevant memories when appropriate.""" - - # 4. Generate response using OpenAI - response = llm.chat.completions.create( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": system_prompt}, - *[{"role": m["role"], "content": m["content"]} for m in session.messages] - ] - ) - assistant_response = response.choices[0].message.content - - # 5. Add assistant response to session - session.add_message("assistant", assistant_response) - - # 6. Save the updated conversation (upserts based on session_id) - session.save(client) - - print(f"User: {user_message}") - print(f"Assistant: {assistant_response}\n") - - return assistant_response -``` - -## 5. Starting a New Conversation - - -```python -# Create the user's bank -on_user_signup("alice") - -# Each new conversation gets a new session with a unique ID -session = ConversationSession(user_id="alice") - -# Multiple exchanges in the same conversation -handle_message(session, "Hi! I'm working on a Python project") -handle_message(session, "Can you help me with async/await?") - -# View the stored conversation in the UI. -# Each message updates the same document (via document_id), so you'll see -# the full conversation history in a single document rather than separate entries. -print(f"\nView documents: {HINDSIGHT_UI_URL}/banks/user-alice?view=documents") -``` - -## How Document ID Works - -The `document_id` parameter is key to managing evolving conversations: - -| Scenario | Behavior | -|----------|----------| -| First retain with `document_id="session_123"` | Creates new document | -| Retain again with same `document_id="session_123"` | **Replaces** previous version (upsert) | -| Retain with different `document_id="session_456"` | Creates separate document | -| Retain without `document_id` | Creates new document each time | - -This upsert behavior means: -- You always retain the **full conversation** state -- Facts are re-extracted from the complete conversation -- No duplicate or stale facts from old versions -- Memory stays consistent as conversations evolve - -## What Gets Remembered - -Hindsight automatically extracts and connects: - -- **Facts**: "User prefers Python", "User is building a CLI tool" -- **Entities**: People, projects, technologies mentioned -- **Relationships**: How entities relate to each other -- **Temporal context**: When things happened - -You don't need to manually extract or structure this - just retain the conversations. - -## When to Use This Pattern - -**Good fit:** -- Chatbots and assistants -- Personal AI companions -- Any 1:1 user-to-agent interaction - -**Consider adding shared knowledge if:** -- You have product docs or FAQs to reference -- Multiple users need access to the same information -- See the Support Agent with Shared Knowledge notebook - -## Cleanup - -Delete the banks created during this notebook: - - -```python -import requests - -# Delete the user-alice bank -response = requests.delete(f"{HINDSIGHT_API_URL}/v1/default/banks/user-alice") -print(f"Deleted user-alice: {response.json()}") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/personal_assistant.md b/skills/hindsight-docs/references/cookbook/recipes/personal_assistant.md deleted file mode 100644 index ecc520d6..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/personal_assistant.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -sidebar_position: 9 ---- - -# Personal AI Assistant with Hindsight Memory - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/personal_assistant.ipynb) -::: - - -A general-purpose personal assistant that remembers your preferences, schedule, family, work context, and past conversations. - -## Features -- Remembers family, work, and personal details -- Tracks preferences and habits -- Helps with scheduling and reminders -- Maintains context across conversations - -## Prerequisites -- OpenAI API key -- Hindsight running locally via Docker (see setup below) - -## Start Hindsight Locally - -Before running this notebook, start Hindsight in a terminal: - -```bash -export OPENAI_API_KEY="your-openai-api-key" - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -## 1. Install Dependencies - - -```python -!pip install -q hindsight-client openai nest-asyncio -``` - -## 2. Configure OpenAI API Key - -Enter your OpenAI API key when prompted (used by both Hindsight and the demo). - - -```python -import getpass -import os - -# Set OpenAI API key (used by both Hindsight and the demo) -if not os.getenv("OPENAI_API_KEY"): - os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ") - -print("API key configured!") -``` - -## 3. Initialize Clients - - -```python -import nest_asyncio -nest_asyncio.apply() - -from datetime import datetime -from openai import OpenAI -from hindsight_client import Hindsight - -# Initialize Hindsight client (connects to local Docker instance) -hindsight = Hindsight( - base_url=os.getenv("HINDSIGHT_BASE_URL", "http://localhost:8888"), -) - -openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) - -USER_ID = "assistant-user-demo" - -print("Clients initialized!") -``` - -## 4. Define Helper Functions - - -```python -def remember(info: str, category: str = "general") -> str: - """Store information to remember.""" - today = datetime.now().strftime("%B %d, %Y") - - hindsight.retain( - bank_id=USER_ID, - content=f"{today}: {info}", - metadata={"category": category, "date": today}, - ) - - return f"I'll remember: {info}" - - -def recall_context(query: str) -> str: - """Recall relevant memories for context.""" - memories = hindsight.recall( - bank_id=USER_ID, - query=query, - budget="high", - ) - - if memories and memories.results: - return "\n".join(f"- {m.text}" for m in memories.results[:8]) - return "" - - -def chat(user_message: str) -> str: - """Chat with the personal assistant.""" - context = recall_context(user_message) - - system_prompt = f"""You are a helpful personal AI assistant with long-term memory. -You remember the user's preferences, schedule, family, work context, and past conversations. - -What you remember about this user: -{context if context else "No memories recorded yet."} - -Your capabilities: -- Remember things when asked ("Remember that...", "Don't forget...") -- Recall past information ("What did I tell you about...", "When is...") -- Provide personalized suggestions based on known preferences -- Help with scheduling and reminders -- Have natural conversations while maintaining context - -Be helpful, proactive, and reference relevant memories naturally.""" - - response = openai_client.chat.completions.create( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": user_message}, - ], - temperature=0.7, - max_tokens=500, - ) - - answer = response.choices[0].message.content - - # Check if user is asking to remember something - lower_msg = user_message.lower() - if any(phrase in lower_msg for phrase in ["remember that", "don't forget", "remind me", "note that"]): - hindsight.retain( - bank_id=USER_ID, - content=f"User asked to remember: {user_message}", - metadata={"category": "reminder"}, - ) - - # Store the interaction - hindsight.retain( - bank_id=USER_ID, - content=f"Conversation - User: {user_message[:100]} | Assistant: {answer[:100]}", - metadata={"category": "conversation"}, - ) - - return answer - - -def get_summary(topic: str = None) -> str: - """Get a summary of memories.""" - query = f"Summarize what you know about {topic}" if topic else \ - "Summarize everything you know about this user" - - summary = hindsight.reflect( - bank_id=USER_ID, - query=query, - budget="high", - ) - return summary.text if hasattr(summary, 'text') else str(summary) - -print("Helper functions defined!") -``` - -## 5. Build Context - - -```python -print("Building context...") - -initial_context = [ - ("My name is Alex and I work as a product manager at TechCorp", "personal"), - ("My wife's name is Sarah and we have two kids: Emma (7) and Jack (4)", "family"), - ("I prefer morning meetings and try to keep afternoons for deep work", "preference"), - ("My mom's birthday is March 15th", "event"), - ("I'm trying to read more - currently reading 'Atomic Habits'", "hobby"), - ("I have a weekly team standup every Monday at 10am", "schedule"), - ("I'm allergic to cats", "health"), - ("My favorite coffee is a flat white with oat milk", "preference"), - ("I'm training for a half marathon in April", "goal"), -] - -for info, category in initial_context: - result = remember(info, category) - print(f" {result}") -``` - -## 6. Have a Conversation - - -```python -import time - -print("=" * 60) -print(" Conversation") -print("=" * 60) - -conversations = [ - "Hey, what's my wife's name again?", - "Remember that my Q1 review is next Thursday at 2pm", - "I need a gift idea for my mom's birthday", - "What time is my Monday standup?", - "Can you recommend a coffee order for me?", - "What books am I reading?", -] - -for message in conversations: - print(f"\nAlex: {message}") - print("-" * 40) - response = chat(message) - print(f"Assistant: {response}") - time.sleep(1) -``` - -## 7. View Summary - - -```python -print("=" * 60) -print(" What I Know About You") -print("=" * 60) -print(get_summary()) -``` - - -```python -print("=" * 60) -print(" Your Family") -print("=" * 60) -print(get_summary("family")) -``` - -## 8. Try Your Own Message - - -```python -your_message = "What should I focus on this month with my training?" # Change this! - -print(f"You: {your_message}") -print("-" * 40) -print(f"Assistant: {chat(your_message)}") -``` - -## 9. Cleanup - - -```python -hindsight.close() -print("Client connection closed.") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/personalized_search.md b/skills/hindsight-docs/references/cookbook/recipes/personalized_search.md deleted file mode 100644 index 61ac26f5..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/personalized_search.md +++ /dev/null @@ -1,299 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Personalized Search Agent with Hindsight Memory - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/personalized_search.ipynb) -::: - - -A search assistant that learns your preferences, location, dietary needs, and lifestyle to provide contextually relevant search results. - -## Features -- Learns location, dietary restrictions, and lifestyle -- Personalizes search queries based on context -- Remembers past searches and preferences -- Integrates with Tavily for real web search (optional) - -## Prerequisites -- OpenAI API key -- Hindsight running locally via Docker (see setup below) -- Tavily API key (optional, for real web search) - -## Start Hindsight Locally - -Before running this notebook, start Hindsight in a terminal: - -```bash -export OPENAI_API_KEY="your-openai-api-key" - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -## 1. Install Dependencies - - -```python -# Tavily is optional - demo works with simulated results if not installed -!pip install -q hindsight-client openai tavily-python nest-asyncio -``` - -## 2. Configure API Keys - -Enter your API keys when prompted. Tavily is optional - press Enter to skip for simulated search results. - - -```python -import getpass -import os - -# Set OpenAI API key (used by both Hindsight and the demo) -if not os.getenv("OPENAI_API_KEY"): - os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ") - -# Tavily is optional - for real web search -if not os.getenv("TAVILY_API_KEY"): - tavily_key = getpass.getpass("Enter your Tavily API key (or press Enter to skip): ") - if tavily_key: - os.environ["TAVILY_API_KEY"] = tavily_key - -print("API keys configured!") -``` - -## 3. Initialize Clients - - -```python -import nest_asyncio -nest_asyncio.apply() - -from openai import OpenAI -from hindsight_client import Hindsight - -# Initialize Hindsight client (connects to local Docker instance) -hindsight = Hindsight( - base_url=os.getenv("HINDSIGHT_BASE_URL", "http://localhost:8888"), -) - -openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) - -# Optional: Tavily for real web search -try: - from tavily import TavilyClient - tavily = TavilyClient(api_key=os.getenv("TAVILY_API_KEY")) - HAS_TAVILY = True - print("Tavily configured - using real web search!") -except (ImportError, Exception) as e: - HAS_TAVILY = False - print("Note: Using simulated search results (Tavily not configured)") - -USER_ID = "search-user-demo" - -print("Clients initialized!") -``` - -## 4. Define Helper Functions - - -```python -def store_preference(preference: str) -> str: - """Store a user preference.""" - hindsight.retain( - bank_id=USER_ID, - content=f"User preference: {preference}", - metadata={"category": "preference"}, - ) - return f"Learned: {preference}" - - -def store_interaction(query: str, response: str) -> None: - """Store a search interaction.""" - hindsight.retain( - bank_id=USER_ID, - content=f"Search query: {query}\nResult highlights: {response[:200]}", - metadata={"category": "search_history"}, - ) - - -def get_user_context(query: str) -> str: - """Retrieve relevant user context.""" - memories = hindsight.recall( - bank_id=USER_ID, - query=f"preferences location dietary lifestyle {query}", - budget="mid", - ) - - if memories and memories.results: - return "\n".join(f"- {m.text}" for m in memories.results[:6]) - return "" - - -def personalized_search(query: str) -> str: - """Perform a personalized search.""" - user_context = get_user_context(query) - - enhancement_prompt = f"""Given this user's preferences and the search query, suggest how to enhance the search. - -User preferences: -{user_context if user_context else "No preferences recorded yet."} - -Search query: {query} - -Return a JSON object with: -- "enhanced_query": The improved search query incorporating relevant preferences -- "filters": Any specific filters to apply (e.g., "vegetarian", "within 5 miles") -- "reasoning": Brief explanation of personalizations applied""" - - enhancement = openai_client.chat.completions.create( - model="gpt-4o-mini", - messages=[{"role": "user", "content": enhancement_prompt}], - temperature=0.3, - max_tokens=300, - ) - - enhanced_info = enhancement.choices[0].message.content - - # Perform the search - if HAS_TAVILY: - search_results = tavily.search( - query=query, - search_depth="advanced", - max_results=5, - ) - results_text = "\n".join( - f"- {r['title']}: {r['content'][:150]}..." - for r in search_results.get('results', []) - ) - else: - results_text = f"[Simulated search results for: {query}]" - - response_prompt = f"""Based on the search results and user preferences, provide a personalized summary. - -User preferences: -{user_context if user_context else "No preferences recorded yet."} - -Query: {query} - -Search enhancement applied: -{enhanced_info} - -Search results: -{results_text} - -Provide a helpful, personalized response that takes into account their preferences.""" - - response = openai_client.chat.completions.create( - model="gpt-4o-mini", - messages=[{"role": "user", "content": response_prompt}], - temperature=0.7, - max_tokens=500, - ) - - answer = response.choices[0].message.content - store_interaction(query, answer) - - return answer - - -def get_preference_profile() -> str: - """Get a summary of the user's preference profile.""" - profile = hindsight.reflect( - bank_id=USER_ID, - query="""Summarize what we know about this user: - - Location and neighborhood - - Dietary preferences and restrictions - - Work style and schedule - - Hobbies and interests - - Family situation - - Shopping preferences""", - budget="high", - ) - return profile.text if hasattr(profile, 'text') else str(profile) - -print("Helper functions defined!") -``` - -## 5. Build User Profile - - -```python -print("Learning user preferences...") - -preferences = [ - "Lives in San Francisco, Mission District", - "Works remotely as a software engineer", - "Vegetarian, prefers organic food when possible", - "Has a 5-year-old daughter named Emma", - "Enjoys hiking and outdoor activities on weekends", - "Prefers quiet coffee shops for remote work", - "Lactose intolerant, uses oat milk", - "Interested in sustainable and eco-friendly products", - "Usually free on Tuesday and Thursday afternoons", - "Husband is allergic to nuts", -] - -for pref in preferences: - result = store_preference(pref) - print(f" {result}") -``` - -## 6. Personalized Search Results - - -```python -import time - -print("=" * 60) -print(" Personalized Search Results") -print("=" * 60) - -searches = [ - "Find a good coffee shop for working remotely", - "Restaurant recommendations for a family dinner", - "Birthday gift ideas for a 5-year-old", -] - -for query in searches: - print(f"\nSearch: {query}") - print("-" * 40) - result = personalized_search(query) - print(result) - time.sleep(1) -``` - -## 7. View Preference Profile - - -```python -print("=" * 60) -print(" User Preference Profile") -print("=" * 60) -print(get_preference_profile()) -``` - -## 8. Try Your Own Search - - -```python -your_search = "Best hiking trails near me" # Change this! - -print(f"Search: {your_search}") -print("-" * 40) -print(personalized_search(your_search)) -``` - -## 9. Cleanup - - -```python -hindsight.close() -print("Client connection closed.") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/quickstart.md b/skills/hindsight-docs/references/cookbook/recipes/quickstart.md deleted file mode 100644 index cea1cd77..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/quickstart.md +++ /dev/null @@ -1,162 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Hindsight Quickstart - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/01-quickstart.ipynb) -::: - - -This notebook covers the basics of using Hindsight: -- **Retain**: Store information in memory -- **Recall**: Retrieve memories matching a query -- **Reflect**: Generate insights from memories - -## Prerequisites - -Make sure you have Hindsight running. The easiest way is via Docker: - -```bash -export OPENAI_API_KEY=your-key - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -- API: http://localhost:8888 -- UI: http://localhost:9999 - -## Installation - -Install the Hindsight Python client: - - -```python -!pip install hindsight-client nest_asyncio python-dotenv -U -``` - -## Connect to Hindsight - - -```python -# Jupyter notebooks already run an asyncio event loop. The hindsight client -# uses loop.run_until_complete() internally, but Python doesn't allow nested -# event loops by default. nest_asyncio patches this to allow nesting. -import nest_asyncio -nest_asyncio.apply() - -import os -from dotenv import load_dotenv - -# Load environment variables from .env file -# Copy .env.example to .env and fill in your values -load_dotenv() - -# Configuration (override with env vars if set) -HINDSIGHT_API_URL = os.getenv("HINDSIGHT_API_URL", "http://localhost:8888") -HINDSIGHT_UI_URL = os.getenv("HINDSIGHT_UI_URL", "http://localhost:9999") - -from hindsight_client import Hindsight - -client = Hindsight(base_url=HINDSIGHT_API_URL) -``` - -## Retain: Store Information - -The `retain` operation is used to push new memories into Hindsight. It tells Hindsight to _retain_ the information you pass in. - -Behind the scenes, the retain operation uses an LLM to extract key facts, temporal data, entities, and relationships. - - -```python -# Simple retain -client.retain( - bank_id="my-bank", - content="Alice works at Google as a software engineer" -) - -# View the stored document in the UI: -print(f"View documents: {HINDSIGHT_UI_URL}/banks/my-bank?view=documents") -``` - - -```python -# Retain with context and timestamp -client.retain( - bank_id="my-bank", - content="Alice got promoted to senior engineer", - context="career update", - timestamp="2025-06-15T10:00:00Z" -) -``` - -## Recall: Retrieve Memories - -The `recall` operation retrieves memories matching a query. It performs 4 retrieval strategies in parallel: -- **Semantic**: Vector similarity -- **Keyword**: BM25 exact matching -- **Graph**: Entity/temporal/causal links -- **Temporal**: Time range filtering - - -```python -# Simple recall -results = client.recall(bank_id="my-bank", query="What does Alice do?") - -print("Memories:") -for r in results.results: - print(f" - {r.text}") -``` - - -```python -# Temporal recall -results = client.recall(bank_id="my-bank", query="What happened in June?") - -print("Memories:") -for r in results.results: - print(f" - {r.text}") -``` - -## Reflect: Generate Insights - -The `reflect` operation performs a more thorough analysis of existing memories. This allows the agent to form new connections between memories which are then persisted as opinions and/or observations. - -Example use cases: -- An AI Project Manager reflecting on what risks need to be mitigated -- A Sales Agent reflecting on why certain outreach messages have gotten responses -- A Support Agent reflecting on opportunities where customers have unanswered questions - - -```python -response = client.reflect(bank_id="my-bank", query="What should I know about Alice?") -print(response) -``` - -## Memory Types - -Hindsight organizes memory into four networks to mimic human memory: - -- **World**: Facts about the world ("The stove gets hot") -- **Experiences**: Agent's own experiences ("I touched the stove and it really hurt") -- **Opinion**: Beliefs with confidence scores ("I shouldn't touch the stove again" - .99 confidence) -- **Observation**: Complex mental models derived by reflecting on facts and experiences - -## Cleanup - -Delete the bank created during this notebook: - - -```python -import requests - -response = requests.delete(f"{HINDSIGHT_API_URL}/v1/default/banks/my-bank") -print(f"Deleted my-bank: {response.json()}") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/study_buddy.md b/skills/hindsight-docs/references/cookbook/recipes/study_buddy.md deleted file mode 100644 index 3174c210..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/study_buddy.md +++ /dev/null @@ -1,335 +0,0 @@ ---- -sidebar_position: 11 ---- - -# Study Buddy with Hindsight Memory - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/study_buddy.ipynb) -::: - - -A personalized study assistant that tracks what you've learned, identifies knowledge gaps, and helps with spaced repetition. - -## Features -- Tracks study sessions and topics covered -- Monitors confidence levels per topic -- Identifies knowledge gaps -- Suggests topics for spaced repetition review - -## Prerequisites -- OpenAI API key -- Hindsight running locally via Docker (see setup below) - -## Start Hindsight Locally - -Before running this notebook, start Hindsight in a terminal: - -```bash -export OPENAI_API_KEY="your-openai-api-key" - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -## 1. Install Dependencies - - -```python -!pip install -q hindsight-client openai nest-asyncio -``` - -## 2. Configure OpenAI API Key - -Enter your OpenAI API key when prompted (used by both Hindsight and the demo). - - -```python -import getpass -import os - -# Set OpenAI API key (used by both Hindsight and the demo) -if not os.getenv("OPENAI_API_KEY"): - os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ") - -print("API key configured!") -``` - -## 3. Initialize Clients - - -```python -import nest_asyncio -nest_asyncio.apply() - -from datetime import datetime -from openai import OpenAI -from hindsight_client import Hindsight - -# Initialize Hindsight client (connects to local Docker instance) -hindsight = Hindsight( - base_url=os.getenv("HINDSIGHT_BASE_URL", "http://localhost:8888"), -) - -openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) - -USER_ID = "student-demo" - -print("Clients initialized!") -``` - -## 4. Define Helper Functions - - -```python -def record_study_session(topic: str, notes: str, confidence: str = "medium") -> str: - """Record a study session with topic, notes, and self-assessed confidence.""" - today = datetime.now().strftime("%B %d, %Y") - - content = f"""{today} - STUDY SESSION -Topic: {topic} -Confidence Level: {confidence} -Notes: {notes}""" - - hindsight.retain( - bank_id=USER_ID, - content=content, - metadata={ - "category": "study_session", - "topic": topic, - "confidence": confidence, - "date": today, - }, - ) - - return f"Recorded study session on '{topic}' (confidence: {confidence})" - - -def record_question(topic: str, question: str, understood: bool) -> str: - """Record a question asked during study.""" - today = datetime.now().strftime("%B %d, %Y") - - content = f"""{today} - QUESTION -Topic: {topic} -Question: {question} -Understood: {"Yes" if understood else "No - needs review"}""" - - hindsight.retain( - bank_id=USER_ID, - content=content, - metadata={ - "category": "question", - "topic": topic, - "understood": str(understood), - }, - ) - - return f"Recorded question on '{topic}'" - - -def study_buddy(user_query: str) -> str: - """Interact with the study buddy.""" - memories = hindsight.recall( - bank_id=USER_ID, - query=f"study session topic notes questions {user_query}", - budget="high", - ) - - memory_context = "" - if memories and memories.results: - memory_context = "\n".join(f"- {m.text}" for m in memories.results[:8]) - - system_prompt = f"""You are a helpful study buddy and tutor. -You have access to the student's study history, including: -- Topics they've studied and their notes -- Their self-assessed confidence levels -- Questions they've asked and whether they understood the answers - -Study History: -{memory_context if memory_context else "No study history recorded yet."} - -Your role: -1. Answer questions about topics they're studying -2. Identify knowledge gaps based on their history -3. Suggest topics to review (spaced repetition) -4. Provide encouragement and study tips -5. Connect new concepts to things they've already learned - -Be supportive and pedagogical. Reference their previous learning when relevant.""" - - response = openai_client.chat.completions.create( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": user_query}, - ], - temperature=0.7, - max_tokens=800, - ) - - answer = response.choices[0].message.content - - hindsight.retain( - bank_id=USER_ID, - content=f"Student asked: {user_query}\nExplanation given: {answer[:300]}...", - metadata={"category": "tutoring"}, - ) - - return answer - - -def get_review_suggestions() -> str: - """Get suggestions for topics to review.""" - suggestions = hindsight.reflect( - bank_id=USER_ID, - query="""Analyze this student's study history and suggest: - 1. Topics with low confidence that need more review - 2. Topics studied a while ago that should be revisited - 3. Questions that weren't fully understood - 4. Connections between topics they might have missed - - Prioritize by what would most improve their understanding.""", - budget="high", - ) - return suggestions.text if hasattr(suggestions, 'text') else str(suggestions) - - -def get_knowledge_summary(topic: str = None) -> str: - """Get a summary of what the student knows.""" - query = f"Summarize what this student knows about {topic}" if topic else \ - "Summarize this student's overall knowledge and progress" - - summary = hindsight.reflect( - bank_id=USER_ID, - query=query, - budget="high", - ) - return summary.text if hasattr(summary, 'text') else str(summary) - -print("Helper functions defined!") -``` - -## 5. Record Study Sessions - - -```python -print("Recording study sessions...") - -sessions = [ - { - "topic": "Classical Mechanics - Newton's Laws", - "notes": "Covered F=ma, action-reaction pairs, inertia. Solved problems on inclined planes.", - "confidence": "high", - }, - { - "topic": "Classical Mechanics - Conservation of Momentum", - "notes": "Elastic vs inelastic collisions. Struggled with 2D collision problems.", - "confidence": "low", - }, - { - "topic": "Classical Mechanics - Generalized Coordinates", - "notes": "Introduction to Lagrangian mechanics. Degrees of freedom concept.", - "confidence": "medium", - }, - { - "topic": "Waves - Simple Harmonic Motion", - "notes": "SHM equations, period, frequency. Connected to springs and pendulums.", - "confidence": "high", - }, - { - "topic": "Waves - Frequency Domain", - "notes": "Started Fourier transforms. Math is confusing, need more practice.", - "confidence": "low", - }, -] - -for session in sessions: - result = record_study_session(**session) - print(f" {result}") -``` - -## 6. Record Questions - - -```python -print("Recording questions...") - -questions = [ - ("Conservation of Momentum", "Why is momentum conserved in collisions?", True), - ("Conservation of Momentum", "How do I solve 2D collision problems?", False), - ("Generalized Coordinates", "What's the advantage of Lagrangian over Newtonian?", True), - ("Frequency Domain", "When do I use Fourier transforms vs Laplace?", False), -] - -for topic, question, understood in questions: - result = record_question(topic, question, understood) - print(f" {result}") -``` - -## 7. Interactive Study Session - - -```python -import time - -print("=" * 60) -print(" Study Session") -print("=" * 60) - -queries = [ - "Can you explain generalized coordinates again? I remember we covered it but I'm fuzzy on the details.", - "What topics should I review before my exam next week?", - "I'm still confused about 2D collision problems. Can you walk me through an example?", -] - -for query in queries: - print(f"\nStudent: {query}") - print("-" * 40) - response = study_buddy(query) - print(f"Study Buddy: {response}") - time.sleep(1) -``` - -## 8. Get Review Suggestions - - -```python -print("=" * 60) -print(" Recommended Review Topics") -print("=" * 60) -print(get_review_suggestions()) -``` - -## 9. Knowledge Summary - - -```python -print("=" * 60) -print(" Knowledge Summary") -print("=" * 60) -print(get_knowledge_summary()) -``` - -## 10. Try Your Own Question - - -```python -your_question = "What are my biggest knowledge gaps right now?" # Change this! - -print(f"You: {your_question}") -print("-" * 40) -print(f"Study Buddy: {study_buddy(your_question)}") -``` - -## 11. Cleanup - - -```python -hindsight.close() -print("Client connection closed.") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/support-agent-shared-knowledge.md b/skills/hindsight-docs/references/cookbook/recipes/support-agent-shared-knowledge.md deleted file mode 100644 index 3bf5ba11..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/support-agent-shared-knowledge.md +++ /dev/null @@ -1,315 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Support Agent with Shared Knowledge - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/03-support-agent-shared-knowledge.ipynb) -::: - - -This pattern shows how to build a support agent that combines **per-user memory** with **shared product knowledge** (RAG), giving users personalized support while leveraging a single source of truth for documentation. - -## The Problem - -You're building a support agent that needs to: -- Remember each user's history, preferences, and past issues -- Access shared product documentation -- Keep user data completely isolated from other users - -A naive approach would index product docs into each user's memory bank, but this is expensive and wasteful (N copies for N users). - -## The Solution: Multi-Bank Architecture - -``` -┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ -│ User A Bank │ │ User B Bank │ │ Shared Docs │ -│ │ │ │ │ Bank │ -│ - Conversations│ │ - Conversations│ │ │ -│ - Preferences │ │ - Preferences │ │ - Product docs │ -│ - Past issues │ │ - Past issues │ │ - FAQs │ -│ - Solutions │ │ - Solutions │ │ - Guides │ -└────────┬────────┘ └────────┬────────┘ └────────┬────────┘ - │ │ │ - └───────────────────────┴───────────────────────┘ - │ - Agent queries - multiple banks -``` - -**Key benefits:** -- Product docs indexed once, shared by all users -- User memory is 100% isolated -- Simple mental model, no complex filtering - - -```python -!pip install hindsight-client nest_asyncio openai python-dotenv -U -``` - -## 1. Set Up Memory Banks - -Create three types of banks: - - -```python -# Jupyter notebooks already run an asyncio event loop. The hindsight client -# uses loop.run_until_complete() internally, but Python doesn't allow nested -# event loops by default. nest_asyncio patches this to allow nesting. -import nest_asyncio -nest_asyncio.apply() - -import os -from dotenv import load_dotenv -from openai import OpenAI as OpenAIClient - -# Load environment variables from .env file -# Copy .env.example to .env and fill in your values -load_dotenv() - -# Configuration (override with env vars if set) -HINDSIGHT_API_URL = os.getenv("HINDSIGHT_API_URL", "http://localhost:8888") -HINDSIGHT_UI_URL = os.getenv("HINDSIGHT_UI_URL", "http://localhost:9999") - -from hindsight_client import Hindsight - -client = Hindsight(base_url=HINDSIGHT_API_URL) -llm = OpenAIClient() # Uses OPENAI_API_KEY from .env - -# Shared knowledge bank (created once) -shared_bank = client.create_bank( - bank_id="product-docs", - name="Product Documentation" -) - -# Per-user banks (created when user signs up) -def create_user_bank(user_id: str): - return client.create_bank( - bank_id=f"user-{user_id}", - name=f"Memory for {user_id}" - ) -``` - -## 2. Index Product Documentation - -Index your product docs into the shared bank (do this once, or on doc updates): - - -```python -# Index product documentation - retain each doc separately -client.retain( - bank_id="product-docs", - content="# Pricing Tiers\n\nBasic: $10/mo, Pro: $25/mo, Enterprise: Contact us" -) - -client.retain( - bank_id="product-docs", - content="# Getting Started\n\nTo set up your account, visit the dashboard and click 'New Project'" -) - -# View the stored documents in the UI: -print(f"View documents: {HINDSIGHT_UI_URL}/banks/product-docs?view=documents") -``` - -## 3. Store User Conversations - -After each support interaction, retain it in the user's bank: - - -```python -def save_conversation(user_id: str, messages: list): - # Convert messages to string format - content = "\n".join([f"{m['role']}: {m['content']}" for m in messages]) - client.retain( - bank_id=f"user-{user_id}", - content=content - ) -``` - -## 4. Query Multiple Banks at Support Time - -When handling a user query, retrieve context from both banks: - - -```python -def get_support_context(user_id: str, query: str): - # Get user's personal context - user_context = client.recall( - bank_id=f"user-{user_id}", - query=query - ) - - # Get relevant product documentation - docs_context = client.recall( - bank_id="product-docs", - query=query - ) - - return { - "user_history": user_context.results, - "documentation": docs_context.results - } -``` - -## 5. Build the Agent Prompt - -Combine both contexts in your agent's prompt: - - -```python -def format_results(results): - """Format recall results for the prompt.""" - if not results: - return "No relevant information found." - return "\n".join([f"- {r.text}" for r in results]) - -def build_prompt(query: str, context: dict) -> str: - return f"""You are a helpful support agent. - -## User's History -{format_results(context["user_history"])} - -## Product Documentation -{format_results(context["documentation"])} - -## Current Question -{query} - -Use the user's history to personalize your response and the documentation -for accurate product information. If you find a solution, remember it for -future reference. -""" -``` - -## Promoting Learnings to Shared Knowledge - -When the agent discovers a solution that's not in the docs, you can optionally promote it to a "learnings" bank: - -``` -┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ -│ User A Bank │ │ Shared Docs │ │ Learnings │ -│ │ │ Bank │ │ Bank │ -│ - Conversations│ │ │ │ │ -│ - Preferences │ │ - Product docs │ │ - Verified │ -│ - Past issues │ │ - FAQs │ │ solutions │ -│ - Solutions │ │ - Guides │ │ - Workarounds │ -└────────┬────────┘ └────────┬────────┘ └────────┬────────┘ - │ │ │ - └───────────────────────┴───────────────────────┘ - │ - Agent queries - all three banks -``` - - -```python -# Optional: Create a curated learnings bank -learnings_bank = client.create_bank( - bank_id="support-learnings", - name="Curated Support Learnings" -) - -# After a successful resolution -def promote_learning(insight: str): - client.retain( - bank_id="support-learnings", - content=insight - ) -``` - -## Complete Example - - -```python -def format_results(results): - if not results: - return "No relevant information found." - return "\n".join([f"- {r.text}" for r in results]) - -def handle_support_request(user_id: str, query: str): - # 1. Recall from user's memory - user_recall = client.recall( - bank_id=f"user-{user_id}", - query=query - ) - - # 2. Recall from shared docs - docs_recall = client.recall( - bank_id="product-docs", - query=query - ) - - # 3. Recall from learnings (optional) - learnings_recall = client.recall( - bank_id="support-learnings", - query=query - ) - - # 4. Build system prompt with context - system_prompt = f"""You are a helpful support agent. Use the context below to answer the user's question. - -## User's History -{format_results(user_recall.results)} - -## Product Documentation -{format_results(docs_recall.results)} - -## Known Solutions -{format_results(learnings_recall.results)} - -Provide helpful, accurate responses based on the documentation. Reference the user's history when relevant.""" - - # 5. Generate response using OpenAI - response = llm.chat.completions.create( - model="gpt-4o-mini", - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": query} - ] - ) - assistant_response = response.choices[0].message.content - - # 6. Save the conversation to user's memory - conversation = f"user: {query}\nassistant: {assistant_response}" - client.retain( - bank_id=f"user-{user_id}", - content=conversation - ) - - return assistant_response - -# Test the function -create_user_bank("bob") -print("User: How do I get started?") -result = handle_support_request("bob", "How do I get started?") -print(f"Assistant: {result}") -print(f"\nView user memory: {HINDSIGHT_UI_URL}/banks/user-bob?view=documents") -``` - -## When to Use This Pattern - -**Good fit:** -- Support agents with shared documentation -- Multi-tenant applications with shared reference data -- Any scenario needing user isolation + shared knowledge - -**Consider alternatives if:** -- You need cross-user learning (users benefiting from other users' solutions) -- Entity relationships must span across users and docs - -## Cleanup - -Delete the banks created during this notebook: - - -```python -import requests - -# Delete all banks created in this notebook -for bank_id in ["product-docs", "support-learnings", "user-bob"]: - response = requests.delete(f"{HINDSIGHT_API_URL}/v1/default/banks/{bank_id}") - print(f"Deleted {bank_id}: {response.json()}") -``` diff --git a/skills/hindsight-docs/references/cookbook/recipes/tool-learning-demo.md b/skills/hindsight-docs/references/cookbook/recipes/tool-learning-demo.md deleted file mode 100644 index c2e3b870..00000000 --- a/skills/hindsight-docs/references/cookbook/recipes/tool-learning-demo.md +++ /dev/null @@ -1,372 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Routing Tool Learning - - -:::tip Run this notebook -This recipe is available as an interactive Jupyter notebook. -[**Open in GitHub →**](https://github.com/vectorize-io/hindsight-cookbook/blob/main/notebooks/05-tool-learning-demo.ipynb) -::: - - -This notebook demonstrates how Hindsight helps an LLM learn which tool to use when tool names are ambiguous. Without memory, the LLM might randomly select between similarly-named tools. With Hindsight, it learns from past interactions and consistently makes the correct choice. - -## The Scenario - -We have a task routing system with two tools: -- `route_to_channel_alpha` - Routes to processing channel Alpha -- `route_to_channel_omega` - Routes to processing channel Omega - -The tool names and descriptions are **intentionally vague**. In reality: -- Channel Alpha handles **FINANCIAL/PAYMENT** tasks (refunds, billing, etc.) -- Channel Omega handles **TECHNICAL/SUPPORT** tasks (bugs, features, etc.) - -**Without Hindsight:** The LLM guesses randomly based on vague descriptions -**With Hindsight:** The LLM learns from feedback which channel handles what - -## Prerequisites - -Make sure you have Hindsight running: - -```bash -export OPENAI_API_KEY=your-key - -docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \ - -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \ - -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \ - -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \ - ghcr.io/vectorize-io/hindsight:latest -``` - -## Installation - - -```python -!pip install hindsight-litellm hindsight-client litellm nest_asyncio python-dotenv -U -q -``` - -## Setup - - -```python -import os -import json -import uuid -import time -import logging -import nest_asyncio -from typing import Optional -from dotenv import load_dotenv - -nest_asyncio.apply() -load_dotenv() - -logging.basicConfig(level=logging.INFO) -logging.getLogger("LiteLLM").setLevel(logging.WARNING) -logging.getLogger("LiteLLM Router").setLevel(logging.WARNING) -logging.getLogger("httpx").setLevel(logging.WARNING) - -import litellm -import hindsight_litellm -from hindsight_client import Hindsight - -HINDSIGHT_API_URL = os.getenv("HINDSIGHT_API_URL", "http://localhost:8888") - -if not os.getenv("OPENAI_API_KEY"): - print("Warning: OPENAI_API_KEY not set") -``` - -## Define Tools - -These tool definitions are **intentionally ambiguous** - the descriptions don't reveal which channel handles what type of request. - - -```python -TOOLS = [ - { - "type": "function", - "function": { - "name": "route_to_channel_alpha", - "description": "Routes the customer request to processing channel Alpha. Use this channel for appropriate request types.", - "parameters": { - "type": "object", - "properties": { - "request_summary": { - "type": "string", - "description": "A brief summary of the customer's request" - }, - "priority": { - "type": "string", - "enum": ["low", "medium", "high"], - "description": "Priority level of the request" - } - }, - "required": ["request_summary"] - } - } - }, - { - "type": "function", - "function": { - "name": "route_to_channel_omega", - "description": "Routes the customer request to processing channel Omega. Use this channel for appropriate request types.", - "parameters": { - "type": "object", - "properties": { - "request_summary": { - "type": "string", - "description": "A brief summary of the customer's request" - }, - "priority": { - "type": "string", - "enum": ["low", "medium", "high"], - "description": "Priority level of the request" - } - }, - "required": ["request_summary"] - } - } - } -] -``` - -## Test Scenarios - -A mix of financial and technical requests to test routing accuracy. - - -```python -TEST_SCENARIOS = [ - { - "type": "financial", - "request": "I was charged twice for my subscription last month. I need a refund for the duplicate charge.", - "correct_tool": "route_to_channel_alpha" - }, - { - "type": "technical", - "request": "The app keeps crashing when I try to upload a file larger than 10MB. This bug is blocking my work.", - "correct_tool": "route_to_channel_omega" - }, - { - "type": "financial", - "request": "My invoice shows an incorrect amount. The billing department needs to fix this.", - "correct_tool": "route_to_channel_alpha" - }, - { - "type": "technical", - "request": "I'd like to request a new feature: the ability to export reports as PDF.", - "correct_tool": "route_to_channel_omega" - }, - { - "type": "financial", - "request": "I need to update my payment method and understand why my last payment failed.", - "correct_tool": "route_to_channel_alpha" - }, -] -``` - -## Helper Functions - - -```python -SYSTEM_PROMPT = """You are a customer service routing agent. Your job is to route customer requests to the appropriate processing channel. - -You have access to two routing channels: -- route_to_channel_alpha: Routes to channel Alpha -- route_to_channel_omega: Routes to channel Omega - -Analyze the customer's request and route it to the most appropriate channel. You must call one of the routing functions to process the request. - -Important: Base your routing decision on what you know about each channel's purpose. If you have learned from previous interactions which channel handles specific types of requests, use that knowledge.""" - - -def make_routing_request(user_request: str, use_hindsight: bool, bank_id: Optional[str] = None): - """Make a routing request and return the tool called.""" - messages = [ - {"role": "system", "content": SYSTEM_PROMPT}, - {"role": "user", "content": f"Customer Request: {user_request}"} - ] - - if use_hindsight and bank_id: - response = hindsight_litellm.completion( - model="gpt-4o-mini", - messages=messages, - tools=TOOLS, - tool_choice="required", - temperature=0.0, - ) - else: - response = litellm.completion( - model="gpt-4o-mini", - messages=messages, - tools=TOOLS, - tool_choice="required", - temperature=0.7, - ) - - if response.choices[0].message.tool_calls: - tool_call = response.choices[0].message.tool_calls[0] - return tool_call.function.name - return None - - -def store_feedback(bank_id: str, request: str, correct_tool: str, request_type: str): - """Store feedback about which tool was correct for a request type.""" - client = Hindsight(base_url=HINDSIGHT_API_URL, timeout=60.0) - - feedback_content = f"""ROUTING FEEDBACK: -Request type: {request_type} -Customer request: "{request}" -Correct routing: {correct_tool} - -LEARNED RULE: {request_type.upper()} requests (like refunds, billing, payments, charges, invoices) should ALWAYS be routed to {correct_tool}. -This is important institutional knowledge for routing decisions.""" - - client.retain( - bank_id=bank_id, - content=feedback_content, - context=f"routing:feedback:{request_type}", - metadata={"request_type": request_type, "correct_tool": correct_tool} - ) -``` - -## Phase 1: Without Hindsight (No Memory) - -The LLM has no prior knowledge about which channel handles what. With ambiguous tool descriptions, it may route incorrectly. - - -```python -print("=" * 60) -print("PHASE 1: WITHOUT HINDSIGHT (No Memory)") -print("=" * 60) - -phase1_results = [] -for i, scenario in enumerate(TEST_SCENARIOS[:3], 1): - print(f"\n--- Test {i}: {scenario['type'].upper()} Request ---") - print(f"Request: \"{scenario['request'][:60]}...\"") - - tool_name = make_routing_request(scenario['request'], use_hindsight=False) - - is_correct = tool_name == scenario['correct_tool'] - phase1_results.append(is_correct) - - print(f"LLM chose: {tool_name}") - print(f"Correct tool: {scenario['correct_tool']}") - print(f"Result: {'✓ CORRECT' if is_correct else '✗ INCORRECT'}") - -phase1_accuracy = sum(phase1_results) / len(phase1_results) * 100 -print(f"\n>>> Phase 1 Accuracy: {phase1_accuracy:.0f}% ({sum(phase1_results)}/{len(phase1_results)})") -``` - -## Phase 2: Teaching Phase - -Now we provide feedback about correct routing to build memory. This simulates a human supervisor correcting the AI's routing decisions. - - -```python -bank_id = f"tool-learning-{uuid.uuid4().hex[:8]}" -print(f"Using bank_id: {bank_id}") - -# Configure and enable Hindsight -hindsight_litellm.configure( - hindsight_api_url=HINDSIGHT_API_URL, - bank_id=bank_id, - store_conversations=True, - inject_memories=True, - max_memories=10, - recall_budget="high", - verbose=False, -) -hindsight_litellm.enable() - -print("\nStoring routing feedback...") - -feedback_examples = [ - ("I need a refund for an incorrect charge on my account.", "route_to_channel_alpha", "financial"), - ("There's a bug in the system causing data loss.", "route_to_channel_omega", "technical"), - ("My billing statement has errors that need correction.", "route_to_channel_alpha", "financial"), - ("I want to request a new feature for the dashboard.", "route_to_channel_omega", "technical"), -] - -for request, correct_tool, req_type in feedback_examples: - print(f" Storing: {req_type.upper()} → {correct_tool}") - store_feedback(bank_id, request, correct_tool, req_type) - -print("\nWaiting 15 seconds for Hindsight to process memories...") -time.sleep(15) -print("Done!") -``` - -## Phase 3: With Hindsight (Memory-Augmented) - -The LLM now has access to learned routing knowledge via Hindsight. It should route requests correctly based on past feedback. - - -```python -print("=" * 60) -print("PHASE 3: WITH HINDSIGHT (Memory-Augmented)") -print("=" * 60) - -phase3_results = [] -for i, scenario in enumerate(TEST_SCENARIOS, 1): - print(f"\n--- Test {i}: {scenario['type'].upper()} Request ---") - print(f"Request: \"{scenario['request'][:60]}...\"") - - tool_name = make_routing_request( - scenario['request'], - use_hindsight=True, - bank_id=bank_id - ) - - is_correct = tool_name == scenario['correct_tool'] - phase3_results.append(is_correct) - - print(f"LLM chose: {tool_name}") - print(f"Correct tool: {scenario['correct_tool']}") - print(f"Result: {'✓ CORRECT' if is_correct else '✗ INCORRECT'}") - -phase3_accuracy = sum(phase3_results) / len(phase3_results) * 100 -print(f"\n>>> Phase 3 Accuracy: {phase3_accuracy:.0f}% ({sum(phase3_results)}/{len(phase3_results)})") -``` - -## Summary - - -```python -print("=" * 60) -print("SUMMARY") -print("=" * 60) -print(f"\nPhase 1 (No Memory): {phase1_accuracy:.0f}% accuracy") -print(f"Phase 3 (With Hindsight): {phase3_accuracy:.0f}% accuracy") - -improvement = phase3_accuracy - phase1_accuracy -if improvement > 0: - print(f"\n🎉 Improvement: +{improvement:.0f}% accuracy with Hindsight!") -elif improvement == 0: - print(f"\nNote: Results may vary. Run again to see learning effect.") -else: - print(f"\nNote: Phase 1 got lucky! Run again to see typical behavior.") - -print(f"\nMemories stored in bank: {bank_id}") -print(f"View in UI: http://localhost:9999/banks/{bank_id}") - -print("\n" + "=" * 60) -print("KEY INSIGHT") -print("=" * 60) -print("Hindsight allows the LLM to learn from experience which tool") -print("to use, even when tool names/descriptions are ambiguous.") -``` - -## Cleanup - - -```python -hindsight_litellm.cleanup() - -# Optional: delete the bank -import requests -response = requests.delete(f"{HINDSIGHT_API_URL}/v1/default/banks/{bank_id}") -print(f"Deleted bank: {response.json()}") -``` diff --git a/skills/hindsight-docs/references/developer/api/documents.md b/skills/hindsight-docs/references/developer/api/documents.md index b9d28177..c6d16d03 100644 --- a/skills/hindsight-docs/references/developer/api/documents.md +++ b/skills/hindsight-docs/references/developer/api/documents.md @@ -132,7 +132,6 @@ Retrieve a document's original text and metadata. This is useful for expanding d ### Python ```python -import asyncio from hindsight_client_api import ApiClient, Configuration from hindsight_client_api.api import DocumentsApi @@ -158,8 +157,6 @@ asyncio.run(get_document_example()) ### Node.js ```javascript -const apiClient = createClient(createConfig({ baseUrl: 'http://localhost:8888' })); - // Get document to expand context from recall results const { data: doc, error } = await sdk.getDocument({ client: apiClient, @@ -228,6 +225,124 @@ hindsight document delete my-bank meeting-2024-03-15 :::warning Deleting a document permanently removes all memories extracted from it. This action cannot be undone. +## List Documents + +List documents in a bank with optional filtering by ID and tags. + +### Python + +```python +from hindsight_client_api import ApiClient, Configuration +from hindsight_client_api.api import DocumentsApi + +async def list_documents_example(): + config = Configuration(host="http://localhost:8888") + api_client = ApiClient(config) + api = DocumentsApi(api_client) + + # List all documents + result = await api.list_documents(bank_id="my-bank") + print(f"Total documents: {result.total}") + + # Filter by document ID substring + result = await api.list_documents(bank_id="my-bank", q="report") + + # Filter by tags — only docs tagged with "team-a" (untagged excluded) + result = await api.list_documents( + bank_id="my-bank", + tags=["team-a"], + tags_match="any_strict", + ) + + # Combine ID search and tags + result = await api.list_documents( + bank_id="my-bank", + q="meeting", + tags=["team-a", "team-b"], + tags_match="all_strict", # must have both tags + ) + + # Paginate + result = await api.list_documents(bank_id="my-bank", limit=20, offset=40) + print(f"Page items: {len(result.items)}") + +import asyncio +asyncio.run(list_documents_example()) +``` + +### Node.js + +```javascript +const apiClient = createClient(createConfig({ baseUrl: 'http://localhost:8888' })); + +// List all documents +const { data: allDocs } = await sdk.listDocuments({ + client: apiClient, + path: { bank_id: 'my-bank' } +}); +console.log(`Total documents: ${allDocs.total}`); + +// Filter by document ID substring +const { data: reportDocs } = await sdk.listDocuments({ + client: apiClient, + path: { bank_id: 'my-bank' }, + query: { q: 'report' } +}); + +// Filter by tags — only docs tagged with "team-a" (untagged excluded) +const { data: taggedDocs } = await sdk.listDocuments({ + client: apiClient, + path: { bank_id: 'my-bank' }, + query: { tags: ['team-a'], tags_match: 'any_strict' } +}); + +// Combine ID search and tags +const { data: filtered } = await sdk.listDocuments({ + client: apiClient, + path: { bank_id: 'my-bank' }, + query: { q: 'meeting', tags: ['team-a', 'team-b'], tags_match: 'all_strict' } +}); + +// Paginate +const { data: page } = await sdk.listDocuments({ + client: apiClient, + path: { bank_id: 'my-bank' }, + query: { limit: 20, offset: 40 } +}); +console.log(`Page items: ${page.items.length}`); +``` + +### CLI + +```bash +# List all documents +hindsight document list my-bank + +# Filter by ID substring +hindsight document list my-bank --q report + +# Filter by tags +hindsight document list my-bank --tags team-a --tags team-b +``` + +### Filtering Options + +| Parameter | Description | +|---|---| +| `q` | Case-insensitive substring match on document ID. `report` matches `report-2024`, `annual-report`, etc. | +| `tags` | Filter by document tags. Accepts multiple values. | +| `tags_match` | How to match tags (default: `any_strict`). See below. | +| `limit` / `offset` | Pagination. Default limit is 100. | + +**`tags_match` modes:** + +| Mode | Behaviour | +|---|---| +| `any_strict` *(default)* | Document must have **at least one** of the specified tags. Untagged docs excluded. | +| `any` | Same as `any_strict` but also includes untagged documents. | +| `all_strict` | Document must have **all** specified tags. Untagged docs excluded. | +| `all` | Same as `all_strict` but also includes untagged documents. | + ## Document Response Format ```json diff --git a/skills/hindsight-docs/references/developer/api/memory-banks.md b/skills/hindsight-docs/references/developer/api/memory-banks.md index 1b86011e..01060055 100644 --- a/skills/hindsight-docs/references/developer/api/memory-banks.md +++ b/skills/hindsight-docs/references/developer/api/memory-banks.md @@ -73,6 +73,73 @@ Only active when `retain_extraction_mode` is `custom`. Replaces the built-in ext See [Retain configuration](/developer/configuration#retain) for environment variable names and defaults. +### entity_labels {#entity-labels} + +Defines a controlled vocabulary of `key:value` classification labels extracted at retain time and stored as entities. Because labels become entities, they automatically link memories in the knowledge graph (two memories with `pedagogy:scaffolding` are linked), improve semantic and BM25 retrieval, and optionally filter memories via the standard `tags`/`tags_match` API when `tag: true` is set on a group. + +Each entry in `entity_labels` is a **label group** — one classification dimension: + +```json +{ + "entity_labels": [ + { + "key": "engagement", + "description": "Student engagement level during the session", + "type": "value", + "optional": true, + "values": [ + { "value": "active", "description": "Student is actively participating" }, + { "value": "passive", "description": "Student is listening but not participating" } + ] + }, + { + "key": "pedagogy", + "description": "Teaching strategies used", + "type": "multi-values", + "values": [ + { "value": "scaffolding", "description": "Breaking complex tasks into smaller steps" }, + { "value": "direct_instruction", "description": "Explicit explanation by the teacher" }, + { "value": "socratic_questioning", "description": "Guiding through questions rather than answers" } + ] + } + ] +} +``` + +| Field | Default | Description | +|-------|---------|-------------| +| `key` | — | Label group identifier. Becomes the prefix in `key:value` entities. | +| `description` | `""` | Shown to the LLM to guide label assignment. | +| `type` | `"value"` | `"value"` → pick one enum value; `"multi-values"` → pick multiple; `"text"` → free-form string. | +| `values` | `[]` | Allowed values for `"value"` and `"multi-values"` types. Ignored for `"text"`. | +| `optional` | `true` | When `true` the LLM may skip the label if not applicable. When `false` the LLM must always assign a value. Has no effect on `"multi-values"` groups (always optional). | +| `tag` | `false` | When `true`, extracted `key:value` labels are also written as tags on the memory unit, enabling filtering via `tags`/`tags_match` in recall/reflect. | + +**Enum groups** (`type: "value"` or `type: "multi-values"`): the LLM picks from the predefined `values` list; anything outside the list is silently dropped. Vocabulary stays stable and graph links stay tight. Use `"multi-values"` when a fact can belong to several values at once. + +**Free-text groups** (`type: "text"`): the LLM writes any string. Use the `description` field to provide examples and guidance. Graph clustering is less reliable than with enum groups because the model may phrase the same concept differently across sessions. + +```json +{ + "key": "topic", + "description": "Specific subject being discussed. Examples: algebra, quadratic equations, geometry.", + "type": "text", + "optional": true, + "values": [] +} +``` + +### entities_allow_free_form + +By default, entity labels are extracted **alongside** regular named entities (people, places, concepts). Set to `false` to disable free-form extraction so only label entities are stored: + +```json +{ + "entity_labels": [...], + "entities_allow_free_form": false +} +``` + ### enable_observations {#observations-configuration} Toggles automatic observation consolidation on or off. Defaults to `true` when the observations feature is enabled on the server. diff --git a/skills/hindsight-docs/references/developer/api/retain.md b/skills/hindsight-docs/references/developer/api/retain.md index d27fc738..84d095fa 100644 --- a/skills/hindsight-docs/references/developer/api/retain.md +++ b/skills/hindsight-docs/references/developer/api/retain.md @@ -97,9 +97,15 @@ The raw text to store. This is the only required field. Hindsight chunks the con ### timestamp -When the event described in the content actually occurred. Accepts any ISO 8601 string (e.g., `"2024-01-15T10:30:00Z"`). If omitted, defaults to the current time at ingestion. +When the event described in the content actually occurred. Three forms are accepted: -The timestamp is injected verbatim into the LLM fact-extraction prompt so the model can resolve relative temporal references in the content — for example, if the content says "last Monday", the model uses the provided timestamp as the anchor to pin down the actual date. It also enables temporal recall queries like "What happened last spring?" to work correctly. +| Value | Behaviour | +|-------|-----------| +| Omitted / `null` | Defaults to the current time at ingestion. | +| ISO 8601 string (e.g. `"2024-01-15T10:30:00Z"`) | Uses the provided datetime. | +| `"unset"` | Stores the content **without any timestamp**. Use this for timeless material such as reference documents, books, or fictional content where no real event time exists. | + +The timestamp is injected into the LLM fact-extraction prompt so the model can resolve relative temporal references in the content — for example, if the content says "last Monday", the model uses the provided timestamp as the anchor to pin down the actual date. When `"unset"` is passed the prompt shows `Event Date: Unknown`, allowing the model to correctly return `N/A` for the `when` field of every extracted fact. Providing a real timestamp also enables temporal recall queries like "What happened last spring?" to work correctly. ### context @@ -160,6 +166,64 @@ Use consistent naming patterns to keep tag filtering predictable. Common convent See [Recall API](./recall#tags) for filtering by tags during retrieval. +### observation_scopes + +Controls which [observations](../observations) this memory contributes to during consolidation. Each scope runs an independent pass, creating or updating observations tagged with only that scope's tags. + +:::info Scope isolation +During consolidation, Hindsight uses `all_strict` matching to find existing observations to update — only observations whose tags exactly match the current scope are considered. This keeps scopes isolated: a memory consolidated under `["student:alice"]` will never bleed into an observation tagged `["student:alice", "teacher:bob"]`. +The examples below use a lesson transcript retained with `tags: ["student:alice", "teacher:bob", "session-id:s1"]`. + +#### combined *(default)* + +One consolidation pass using all tags together. The resulting observation is tagged with the full set. + +- Observations created: `["student:alice", "teacher:bob", "session-id:s1"]` +- ✗ *"What does Alice struggle with across all her sessions?"* — no match, because no observation was ever built for `student:alice` alone +- ✗ *"How does Bob teach?"* — no match for `teacher:bob` alone +- ✓ *"What happened in session s1 with Alice and Bob?"* — exact match + +**Use when** the memory is meaningful only as a whole and you never need to query any single tag in isolation. + +#### per_tag + +One consolidation pass per individual tag. Each tag gets its own isolated observation that grows with every new memory sharing that tag. + +- Observations created: `["student:alice"]` · `["teacher:bob"]` · `["session-id:s1"]` +- ✓ *"What does Alice struggle with across all her sessions?"* +- ✓ *"How does Bob teach?"* +- ✓ *"What happened in session s1?"* +- ✗ *"How does Alice perform specifically with Bob?"* — no observation for the `["student:alice", "teacher:bob"]` combination +- ✗ *"How does Bob teach in online sessions?"* — no observation for `["teacher:bob", "session-id:s1"]` + +**Use when** content involves multiple tags that each represent an independent subject — the most common choice for multi-party content like conversations, lessons, or support sessions. + +#### all_combinations + +One pass per subset of tags — singles, pairs, triples, and so on. For 3 tags that is 7 passes. + +- Observations created: all `"per_tag"` scopes above, plus `["student:alice", "teacher:bob"]` · `["student:alice", "session-id:s1"]` · `["teacher:bob", "session-id:s1"]` · `["student:alice", "teacher:bob", "session-id:s1"]` +- ✓ All questions from `"per_tag"` above +- ✓ *"How does Alice perform specifically with Bob?"* — matched by `["student:alice", "teacher:bob"]` + +**Use when** you need observations at every granularity — per tag, per pair, per group. + +#### custom + +Pass an explicit list of tag sets. Each inner list is one scope. + +```json +[["student:alice"], ["teacher:bob"], ["teacher:bob", "session-id:s1"]] +``` + +- Observations created: exactly those three scopes — nothing more +- ✓ *"What does Alice struggle with?"* +- ✓ *"How does Bob teach?"* +- ✓ *"How does Bob teach in session s1 specifically?"* +- ✗ *"What happened in session s1 regardless of teacher?"* — `["session-id:s1"]` alone was not included + +**Use when** you know exactly which combinations are meaningful and want to avoid unnecessary passes. + ### Response The synchronous retain response includes: diff --git a/skills/hindsight-docs/references/developer/configuration.md b/skills/hindsight-docs/references/developer/configuration.md index cb5aea1b..4e642092 100644 --- a/skills/hindsight-docs/references/developer/configuration.md +++ b/skills/hindsight-docs/references/developer/configuration.md @@ -553,6 +553,8 @@ Controls the retain (memory ingestion) pipeline. | `HINDSIGHT_API_RETAIN_BATCH_ENABLED` | Use LLM Batch API for fact extraction (50% cost savings, only with async operations) | `false` | | `HINDSIGHT_API_RETAIN_BATCH_POLL_INTERVAL_SECONDS` | Batch API polling interval in seconds | `60` | +> **Entity labels** (`entity_labels`) and **free-form entity extraction** (`entities_allow_free_form`) are configured per bank via the [bank config API](/developer/api/memory-banks#retain-configuration), not as global environment variables — each bank can have its own controlled vocabulary. See [Entity Labels](/developer/retain#entity-labels) for details. + #### Customizing retain: when to use what There are three levels of customization for the retain pipeline. Start with the simplest that covers your needs: @@ -780,6 +782,7 @@ export HINDSIGHT_API_OBSERVATIONS_MISSION="Observations are recurring patterns i | Variable | Description | Default | |----------|-------------|---------| | `HINDSIGHT_API_REFLECT_MAX_ITERATIONS` | Max tool call iterations before forcing a response | `10` | +| `HINDSIGHT_API_REFLECT_MAX_CONTEXT_TOKENS` | Max accumulated context tokens in the reflect loop before forcing final synthesis. Prevents `context_length_exceeded` errors on large banks. Lower this if your LLM has a context window smaller than 128K. | `100000` | | `HINDSIGHT_API_REFLECT_MISSION` | Global reflect mission (identity and reasoning framing). Overridden per bank via config API. | - | #### Disposition diff --git a/skills/hindsight-docs/references/developer/extensions.md b/skills/hindsight-docs/references/developer/extensions.md index 3264fe2e..ba8ef011 100644 --- a/skills/hindsight-docs/references/developer/extensions.md +++ b/skills/hindsight-docs/references/developer/extensions.md @@ -40,6 +40,10 @@ For other multi-tenant setups with separate schemas per tenant (e.g., custom JWT Adds custom HTTP endpoints under the `/ext/` path prefix. Useful for adding domain-specific APIs that integrate with Hindsight's memory engine. +Provides two router methods: +- `get_router(memory)` — returns a FastAPI router mounted at `/ext/` +- `get_root_router(memory)` — returns a FastAPI router mounted at the application root (for well-known endpoints or other paths that must be at specific locations). Returns `None` by default. + **No built-in implementation** - implement your own to add custom endpoints. ```bash @@ -117,6 +121,7 @@ class JwtTenantExtension(TenantExtension): async def authenticate(self, context: RequestContext) -> TenantContext: token = context.api_key if not token: + # Optional headers dict is forwarded in HTTP/MCP error responses raise AuthenticationError("Bearer token required") try: @@ -129,6 +134,15 @@ class JwtTenantExtension(TenantExtension): raise AuthenticationError(str(e)) ``` +`AuthenticationError` accepts an optional `headers` dict that is forwarded in both HTTP and MCP error responses. This is useful for returning custom headers like `WWW-Authenticate`: + +```python +raise AuthenticationError( + "Authorization required", + headers={"WWW-Authenticate": 'Bearer realm="example"'}, +) +``` + ### Example: Custom HttpExtension ```python @@ -151,9 +165,20 @@ class MyHttpExtension(HttpExtension): return {"status": "ok"} return router + + def get_root_router(self, memory: MemoryEngine) -> APIRouter | None: + """Optional: mount routes at the application root (not under /ext/).""" + router = APIRouter() + + @router.get("/.well-known/my-metadata") + async def metadata(): + return {"version": "1.0"} + + return router ``` -Routes are available at `/ext/hello`, `/ext/custom/{bank_id}/action`, etc. +Routes from `get_router` are available at `/ext/hello`, `/ext/custom/{bank_id}/action`, etc. +Routes from `get_root_router` are mounted at the app root (e.g., `/.well-known/my-metadata`). ### Example: Custom OperationValidatorExtension diff --git a/skills/hindsight-docs/references/developer/models.md b/skills/hindsight-docs/references/developer/models.md index 339bf6c5..59667ada 100644 --- a/skills/hindsight-docs/references/developer/models.md +++ b/skills/hindsight-docs/references/developer/models.md @@ -26,6 +26,12 @@ Hindsight works with any provider that exposes an OpenAI-compatible API (e.g., A See [Configuration](./configuration#llm-provider) for setup examples. ::: +### Benchmarks + +Not sure which model to use? The **[Model Leaderboard](https://benchmarks.hindsight.vectorize.io/)** benchmarks models across accuracy, speed, cost, and reliability for retain, reflect, and observation consolidation so you can pick the right trade-off for your use case. + +[![Model Leaderboard](/img/leaderboard.png)](https://benchmarks.hindsight.vectorize.io/) + ### Tested Models The following models have been tested and verified to work correctly with Hindsight: diff --git a/skills/hindsight-docs/references/developer/observations.md b/skills/hindsight-docs/references/developer/observations.md index 281a0d85..5a02d3f4 100644 --- a/skills/hindsight-docs/references/developer/observations.md +++ b/skills/hindsight-docs/references/developer/observations.md @@ -139,6 +139,14 @@ This ensures responses stay accurate even as the underlying data changes. --- +## Observation Scopes + +By default, observations are scoped to all of a memory's tags combined. The `observation_scopes` retain parameter lets you control this — building separate observations per tag, per combination, or with a custom list of scopes. This is key when a single memory carries multiple tags and you want each tag to accumulate its own observations independently. + +See [`observation_scopes` in the Retain API](./api/retain#observation_scopes) for the full explanation and options. + +--- + ## Observations Mission You can define exactly what this bank should synthesise by setting an **observations mission** (`observations_mission`). This replaces the built-in durable-knowledge rules with your own instructions, letting you control what shape observations take. diff --git a/skills/hindsight-docs/references/developer/retain.md b/skills/hindsight-docs/references/developer/retain.md index fc85d5e0..4966ef6f 100644 --- a/skills/hindsight-docs/references/developer/retain.md +++ b/skills/hindsight-docs/references/developer/retain.md @@ -90,6 +90,12 @@ The same entity mentioned different ways gets unified: If "Alice" appears with "Google" and "Stanford" multiple times, a new "Alice" mentioning those is likely the same person. Hindsight uses co-occurrence patterns to disambiguate common names. +### Entity Labels + +You can define a controlled vocabulary of `key:value` classification labels (e.g. `pedagogy:scaffolding`, `engagement:active`) that are extracted at retain time and stored as entities. Because labels become entities, they automatically link related memories in the knowledge graph and improve both semantic and keyword retrieval. Labels can optionally also write to the memory unit's tags, enabling standard tag-based filtering during recall and reflect. + +See [entity_labels in the bank config](/developer/api/memory-banks#entity-labels) for full configuration details. + --- ## Building Connections diff --git a/skills/hindsight-docs/references/sdks/integrations/chat.md b/skills/hindsight-docs/references/sdks/integrations/chat.md index 8b024f52..a35b3b18 100644 --- a/skills/hindsight-docs/references/sdks/integrations/chat.md +++ b/skills/hindsight-docs/references/sdks/integrations/chat.md @@ -4,7 +4,7 @@ sidebar_position: 5 # Vercel Chat SDK -The `@vectorize-io/hindsight-chat` package gives your [Vercel Chat SDK](https://github.com/vercel/chat) bots persistent, per-user memory with a single handler wrapper. Works with Slack, Discord, Teams, Google Chat, GitHub, and Linear. +We built `@vectorize-io/hindsight-chat` to give [Vercel Chat SDK](https://github.com/vercel/chat) bots persistent, per-user memory with a single handler wrapper. The integration works across Slack, Discord, Teams, Google Chat, GitHub, and Linear — no custom plumbing required. ## Installation @@ -60,7 +60,7 @@ chat.onNewMention( ### `withHindsightChat(options, handler)` -Returns a standard Chat SDK handler `(thread, message) => Promise`. +`withHindsightChat` wraps your existing Chat SDK handler and injects memory context automatically. It returns a standard handler `(thread, message) => Promise` so it drops in without changing your handler signature. #### Options @@ -80,7 +80,7 @@ Returns a standard Chat SDK handler `(thread, message) => Promise`. ### Context (`ctx`) -The third argument passed to your handler: +We inject a third `ctx` argument into your handler that exposes the full Hindsight memory API scoped to the current user's bank: | Property/Method | Description | |----------------|-------------| @@ -160,4 +160,4 @@ chat.onNewMention( ## Error Handling -Memory failures never break your bot. Auto-recall and auto-retain errors are logged as warnings and the handler continues with empty memories. Manual `ctx.retain()`, `ctx.recall()`, and `ctx.reflect()` calls propagate errors normally so you can handle them as needed. +We designed the integration so that memory failures never break your bot. Auto-recall and auto-retain errors are caught internally, logged as warnings, and the handler continues with empty memories. Manual `ctx.retain()`, `ctx.recall()`, and `ctx.reflect()` calls propagate errors normally so you can handle them as needed. diff --git a/skills/hindsight-docs/references/sdks/integrations/pydantic-ai.md b/skills/hindsight-docs/references/sdks/integrations/pydantic-ai.md new file mode 100644 index 00000000..8f6e6baa --- /dev/null +++ b/skills/hindsight-docs/references/sdks/integrations/pydantic-ai.md @@ -0,0 +1,184 @@ +--- +sidebar_position: 6 +--- + +# Pydantic AI + +Persistent memory tools for [Pydantic AI](https://ai.pydantic.dev/) agents via Hindsight. Give your agents long-term memory with retain, recall, and reflect — all async-native with no thread-pool hacks. + +## Features + +- **Async-Native Tools** — Uses Pydantic AI's async tool interface directly (`aretain`, `arecall`, `areflect`) +- **Memory Instructions** — Auto-inject relevant memories into every agent run via `instructions=[...]` +- **Three Memory Tools** — Retain (store), Recall (search), Reflect (synthesize) — include any combination +- **Simple Configuration** — Configure once globally, or pass a client directly +- **Lightweight** — Depends on `pydantic-ai-slim` to avoid pulling in all model providers + +## Installation + +```bash +pip install hindsight-pydantic-ai +``` + +## Quick Start + +```python +from hindsight_client import Hindsight +from hindsight_pydantic_ai import create_hindsight_tools, memory_instructions +from pydantic_ai import Agent + +client = Hindsight(base_url="http://localhost:8888") + +agent = Agent( + "openai:gpt-4o", + tools=create_hindsight_tools(client=client, bank_id="user-123"), + instructions=[memory_instructions(client=client, bank_id="user-123")], +) + +result = await agent.run("What do you remember about my preferences?") +print(result.output) +``` + +The agent now has three tools it can call: + +- **`hindsight_retain`** — Store information to long-term memory +- **`hindsight_recall`** — Search long-term memory for relevant facts +- **`hindsight_reflect`** — Synthesize a reasoned answer from memories + +The `memory_instructions` callable automatically recalls relevant memories and injects them into the system prompt on every run. + +## Tools Only (No Auto-Injection) + +If you want the agent to decide when to use memory rather than always injecting context: + +```python +agent = Agent( + "openai:gpt-4o", + tools=create_hindsight_tools(client=client, bank_id="user-123"), +) +``` + +## Instructions Only (No Tools) + +If you just want memories auto-injected without giving the agent explicit memory tools: + +```python +agent = Agent( + "openai:gpt-4o", + instructions=[memory_instructions(client=client, bank_id="user-123")], +) +``` + +## Selecting Tools + +Include only the tools you need: + +```python +tools = create_hindsight_tools( + client=client, + bank_id="user-123", + include_retain=True, + include_recall=True, + include_reflect=False, # Omit reflect +) +``` + +## Global Configuration + +Instead of passing a client to every call, configure once: + +```python +from hindsight_pydantic_ai import configure, create_hindsight_tools + +configure( + hindsight_api_url="http://localhost:8888", + api_key="your-api-key", # Or set HINDSIGHT_API_KEY env var + budget="mid", # Recall budget: low/mid/high + max_tokens=4096, # Max tokens for recall results + tags=["env:prod"], # Tags for stored memories + recall_tags=["scope:global"], # Tags to filter recall + recall_tags_match="any", # Tag match mode: any/all/any_strict/all_strict +) + +# Now create tools without passing client — uses global config +tools = create_hindsight_tools(bank_id="user-123") +``` + +## Per-Tool Overrides + +Constructor arguments override global configuration: + +```python +tools = create_hindsight_tools( + bank_id="user-123", + budget="high", # Override global budget + max_tokens=8192, # Override global max_tokens + tags=["session:abc"], # Override global tags +) +``` + +## Memory Instructions Options + +Customize what memories get injected and how: + +```python +instructions_fn = memory_instructions( + client=client, + bank_id="user-123", + query="relevant context about the user", # What to search for + budget="low", # Keep it fast + max_results=5, # Limit injected memories + max_tokens=4096, # Max recall tokens + prefix="Relevant memories:\n", # Text before the memory list + tags=["scope:global"], # Filter by tags + tags_match="any", # Tag match mode +) +``` + +## API Reference + +### `create_hindsight_tools()` + +| Parameter | Default | Description | +|---|---|---| +| `bank_id` | *required* | Hindsight memory bank ID | +| `client` | `None` | Pre-configured Hindsight client | +| `hindsight_api_url` | `None` | API URL (used if no client provided) | +| `api_key` | `None` | API key (used if no client provided) | +| `budget` | `"mid"` | Recall/reflect budget level (low/mid/high) | +| `max_tokens` | `4096` | Maximum tokens for recall results | +| `tags` | `None` | Tags applied when storing memories | +| `recall_tags` | `None` | Tags to filter when searching | +| `recall_tags_match` | `"any"` | Tag matching mode | +| `include_retain` | `True` | Include the retain (store) tool | +| `include_recall` | `True` | Include the recall (search) tool | +| `include_reflect` | `True` | Include the reflect (synthesize) tool | + +### `memory_instructions()` + +| Parameter | Default | Description | +|---|---|---| +| `bank_id` | *required* | Hindsight memory bank ID | +| `client` | `None` | Pre-configured Hindsight client | +| `hindsight_api_url` | `None` | API URL (used if no client provided) | +| `api_key` | `None` | API key (used if no client provided) | +| `query` | `"relevant context about the user"` | Recall query for memory injection | +| `budget` | `"low"` | Recall budget level | +| `max_results` | `5` | Maximum memories to inject | +| `max_tokens` | `4096` | Maximum tokens for recall results | +| `prefix` | `"Relevant memories:\n"` | Text prepended before memory list | +| `tags` | `None` | Tags to filter recall results | +| `tags_match` | `"any"` | Tag matching mode | + +### `configure()` + +| Parameter | Default | Description | +|---|---|---| +| `hindsight_api_url` | Production API | Hindsight API URL | +| `api_key` | `HINDSIGHT_API_KEY` env | API key for authentication | +| `budget` | `"mid"` | Default recall budget level | +| `max_tokens` | `4096` | Default max tokens for recall | +| `tags` | `None` | Default tags for retain operations | +| `recall_tags` | `None` | Default tags to filter recall | +| `recall_tags_match` | `"any"` | Default tag matching mode | +| `verbose` | `False` | Enable verbose logging | diff --git a/uv.lock b/uv.lock index e317cf03..234f4e1b 100644 --- a/uv.lock +++ b/uv.lock @@ -1422,7 +1422,7 @@ wheels = [ [[package]] name = "hindsight-all" -version = "0.4.14" +version = "0.4.15" source = { editable = "hindsight" } dependencies = [ { name = "hindsight-api" }, @@ -1448,7 +1448,7 @@ provides-extras = ["test"] [[package]] name = "hindsight-api" -version = "0.4.14" +version = "0.4.15" source = { editable = "hindsight-api" } dependencies = [ { name = "aiohttp" }, @@ -1596,7 +1596,7 @@ dev = [ [[package]] name = "hindsight-client" -version = "0.4.14" +version = "0.4.15" source = { editable = "hindsight-clients/python" } dependencies = [ { name = "aiohttp" }, @@ -1630,7 +1630,7 @@ provides-extras = ["test"] [[package]] name = "hindsight-dev" -version = "0.4.14" +version = "0.4.15" source = { editable = "hindsight-dev" } dependencies = [ { name = "hindsight-api" }, @@ -1678,7 +1678,7 @@ dev = [ [[package]] name = "hindsight-embed" -version = "0.4.14" +version = "0.4.15" source = { editable = "hindsight-embed" } dependencies = [ { name = "httpx" },