@sovant/sdk 1.0.2 → 1.0.3
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.
- package/README.md +84 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,30 +1,103 @@
|
|
|
1
1
|
# Sovant TypeScript SDK
|
|
2
|
+
|
|
3
|
+
**AI Infrastructure: Memory-as-a-Service for AI systems.**
|
|
4
|
+
The official TypeScript/JavaScript client for the Sovant Memory API.
|
|
5
|
+
|
|
2
6
|
[](https://www.npmjs.com/package/@sovant/sdk)
|
|
7
|
+
[](https://sovant.ai/docs)
|
|
8
|
+
[](https://github.com/sovant-ai/sovant)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## What is Sovant?
|
|
13
|
+
|
|
14
|
+
Sovant is an **AI infrastructure company** providing the **memory layer for AI systems**.
|
|
15
|
+
Our platform makes it simple to persist, search, and manage conversational and contextual data securely across sessions, channels, and applications.
|
|
16
|
+
|
|
17
|
+
- **Problem:** Most AI systems forget everything once a session ends. This causes compliance risks, knowledge loss, and poor user experience.
|
|
18
|
+
- **Solution:** Sovant provides a **Memory-as-a-Service API** — a single SDK and API key that lets you store, retrieve, and search memories with audit-ready controls.
|
|
19
|
+
- **Target audience:** Developers, startups, and enterprises building AI agents, copilots, or compliance-driven apps who need context persistence.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
3
24
|
|
|
4
|
-
## Install
|
|
5
25
|
```bash
|
|
6
|
-
npm
|
|
26
|
+
npm install @sovant/sdk
|
|
27
|
+
# or
|
|
28
|
+
yarn add @sovant/sdk
|
|
29
|
+
# or
|
|
30
|
+
pnpm add @sovant/sdk
|
|
7
31
|
```
|
|
8
32
|
|
|
9
|
-
##
|
|
33
|
+
## 60-Second Quickstart
|
|
34
|
+
|
|
10
35
|
```typescript
|
|
11
36
|
import { Sovant } from "@sovant/sdk";
|
|
12
37
|
|
|
13
38
|
const sv = new Sovant({ apiKey: process.env.SOVANT_API_KEY! });
|
|
14
39
|
|
|
40
|
+
// Create a memory
|
|
15
41
|
await sv.memory.create({
|
|
16
|
-
data: { note: "
|
|
17
|
-
type: "preference"
|
|
18
|
-
ttl: "30d"
|
|
42
|
+
data: { note: "User prefers morning meetings" },
|
|
43
|
+
type: "preference"
|
|
19
44
|
});
|
|
20
45
|
|
|
21
|
-
|
|
22
|
-
|
|
46
|
+
// Search memories
|
|
47
|
+
const results = await sv.memory.search({
|
|
48
|
+
query: "meeting preferences",
|
|
23
49
|
topK: 3
|
|
24
50
|
});
|
|
25
51
|
|
|
26
|
-
console.log(
|
|
52
|
+
console.log(results);
|
|
27
53
|
```
|
|
28
54
|
|
|
29
|
-
##
|
|
30
|
-
|
|
55
|
+
## Features
|
|
56
|
+
|
|
57
|
+
- **Memory CRUD** — create, retrieve, update, delete memories
|
|
58
|
+
- **Semantic Search** — query memories with filters and topK ranking
|
|
59
|
+
- **Threads** — link related memories via thread_id (REST API)
|
|
60
|
+
- **Batch Operations (Beta)** — atomic multi-operation support
|
|
61
|
+
- **Compliance-ready** — audit trails, PDPA/GDPR-friendly by design
|
|
62
|
+
- **SDKs** — official TypeScript and Python SDKs, with REST API reference
|
|
63
|
+
|
|
64
|
+
## SDKs and Documentation
|
|
65
|
+
|
|
66
|
+
- [TypeScript SDK Documentation](https://sovant.ai/docs/sdk/typescript)
|
|
67
|
+
- [Python SDK on PyPI](https://pypi.org/project/sovant/)
|
|
68
|
+
- [REST API Reference](https://sovant.ai/docs/api)
|
|
69
|
+
- [Full Documentation](https://sovant.ai/docs)
|
|
70
|
+
|
|
71
|
+
## API Overview
|
|
72
|
+
|
|
73
|
+
### Endpoints Summary
|
|
74
|
+
- `POST /api/v1/memory` — Create memory
|
|
75
|
+
- `GET /api/v1/memory` — List memories
|
|
76
|
+
- `GET /api/v1/memories/{id}` — Get memory by ID
|
|
77
|
+
- `PATCH|PUT /api/v1/memories/{id}` — Update memory
|
|
78
|
+
- `DELETE /api/v1/memories/{id}` — Delete memory
|
|
79
|
+
- `GET /api/v1/memory/search` — Search memories
|
|
80
|
+
- `POST /api/v1/memory/batch` — Batch operations (Beta)
|
|
81
|
+
|
|
82
|
+
## Field Mapping Note
|
|
83
|
+
|
|
84
|
+
- **SDK level:** accepts `data`
|
|
85
|
+
- **API level:** expects `content`
|
|
86
|
+
- SDK automatically converts `data` → `content`.
|
|
87
|
+
- `subject` is deprecated (ignored by API). Use `thread_id`, `tags`, or `metadata` for grouping.
|
|
88
|
+
|
|
89
|
+
## Status of Advanced Features
|
|
90
|
+
|
|
91
|
+
- **Batch API:** Available, marked Beta.
|
|
92
|
+
- **Threads:** Fully supported via REST API.
|
|
93
|
+
- **Webhooks, personalization, multi-channel sync:** Coming soon.
|
|
94
|
+
|
|
95
|
+
## Versioning & Changelog
|
|
96
|
+
|
|
97
|
+
- **Stable release:** 1.0.3
|
|
98
|
+
- Earlier build 1.0.0 was experimental and is deprecated.
|
|
99
|
+
- See [CHANGELOG.md](./CHANGELOG.md) for details.
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
MIT © Sovant AI
|