@vectorize-io/hindsight-client 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +66 -34
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,57 +1,89 @@
1
- # @hindsight/client
1
+ # Hindsight TypeScript Client
2
2
 
3
- TypeScript client for Hindsight - Semantic memory system with personality-driven thinking.
4
-
5
- **Auto-generated from OpenAPI spec** - provides type-safe access to all Hindsight API endpoints.
3
+ TypeScript client library for the Hindsight API.
6
4
 
7
5
  ## Installation
8
6
 
9
7
  ```bash
10
- npm install @hindsight/client
8
+ npm install @vectorize-io/hindsight-client
11
9
  # or
12
- yarn add @hindsight/client
10
+ yarn add @vectorize-io/hindsight-client
13
11
  ```
14
12
 
15
- ## Quick Start
13
+ ## Usage
16
14
 
17
15
  ```typescript
18
- import { OpenAPI, MemoryStorageService, ReasoningService } from '@hindsight/client';
16
+ import { HindsightClient } from '@vectorize-io/hindsight-client';
19
17
 
20
- // Configure API base URL
21
- OpenAPI.BASE = 'http://localhost:8888';
18
+ const client = new HindsightClient({ baseUrl: 'http://localhost:8888' });
22
19
 
23
- // Store memory
24
- await MemoryStorageService.putApiPutPost({
25
- agent_id: 'user123',
26
- content: 'Alice loves machine learning'
27
- });
20
+ // Retain information
21
+ await client.retain('my-bank', 'Alice works at Google in Mountain View.');
22
+
23
+ // Recall memories
24
+ const results = await client.recall('my-bank', 'Where does Alice work?');
25
+
26
+ // Reflect and get an opinion
27
+ const response = await client.reflect('my-bank', 'What do you think about Alice\'s career?');
28
+ ```
29
+
30
+ ## API Reference
31
+
32
+ ### `retain(bankId, content, options?)`
28
33
 
29
- // Think (generate answer with personality)
30
- const response = await ReasoningService.thinkApiThinkPost({
31
- agent_id: 'user123',
32
- query: 'What does Alice think about AI?',
33
- thinking_budget: 50
34
+ Store a single memory.
35
+
36
+ ```typescript
37
+ await client.retain('my-bank', 'User prefers dark mode', {
38
+ timestamp: new Date(),
39
+ context: 'Settings conversation',
40
+ metadata: { source: 'chat' }
34
41
  });
42
+ ```
35
43
 
36
- console.log(response.text);
44
+ ### `retainBatch(bankId, items, options?)`
45
+
46
+ Store multiple memories in batch.
47
+
48
+ ```typescript
49
+ await client.retainBatch('my-bank', [
50
+ { content: 'Alice loves hiking' },
51
+ { content: 'Alice visited Paris last summer' }
52
+ ], { async: true });
37
53
  ```
38
54
 
39
- ## Available Services
55
+ ### `recall(bankId, query, options?)`
40
56
 
41
- - `MemoryStorageService` - Store and retrieve facts
42
- - `SearchService` - Semantic and temporal search
43
- - `ReasoningService` - Personality-driven thinking
44
- - `VisualizationService` - Memory graphs and statistics
45
- - `ManagementService` - Agent profiles and configuration
46
- - `DocumentsService` - Document tracking
57
+ Recall memories matching a query.
47
58
 
48
- All services are fully typed with TypeScript interfaces.
59
+ ```typescript
60
+ const results = await client.recall('my-bank', 'What are Alice\'s hobbies?', {
61
+ budget: 'mid'
62
+ });
63
+ ```
64
+
65
+ ### `reflect(bankId, query, options?)`
66
+
67
+ Generate a contextual answer using the bank's identity and memories.
68
+
69
+ ```typescript
70
+ const response = await client.reflect('my-bank', 'What should I do this weekend?', {
71
+ budget: 'low'
72
+ });
73
+ console.log(response.text);
74
+ ```
75
+
76
+ ### `createBank(bankId, options)`
49
77
 
50
- ## Development
78
+ Create or update a memory bank with personality.
51
79
 
52
- Auto-generated from `openapi.json`. See [RELEASE.md](../../RELEASE.md) for regeneration instructions.
80
+ ```typescript
81
+ await client.createBank('my-bank', {
82
+ name: 'My Assistant',
83
+ background: 'A helpful assistant that remembers everything.'
84
+ });
85
+ ```
53
86
 
54
- ## Links
87
+ ## Documentation
55
88
 
56
- - [GitHub Repository](https://github.com/vectorize-io/hindsight)
57
- - [Full Documentation](https://github.com/vectorize-io/hindsight/blob/main/README.md)
89
+ For full documentation, visit [hindsight](https://github.com/vectorize-io/hindsight).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorize-io/hindsight-client",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "TypeScript client for Hindsight - Semantic memory system with personality-driven thinking",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",