Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 70 additions & 2 deletions docs/site/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ npm install @memobase/memobase
deno add jsr:@memobase/memobase
```

```bash go
go get github.com/memodb-io/memobase/src/client/memobase-go@latest
```

```bash http
# Skip to next step
```
Expand Down Expand Up @@ -60,6 +64,15 @@ import { MemoBaseClient, Blob, BlobType } from '@memobase/memobase';

const client = new MemoBaseClient(process.env['MEMOBASE_PROJECT_URL'], process.env['MEMOBASE_API_KEY'])
```

```go Go
import (
"github.com/memodb-io/memobase/src/client/memobase-go/core"
)
projectURL := "YOUR_PROJECT_URL"
apiKey := "YOUR_API_KEY"
client, err := core.NewMemoBaseClient(projectURL, apiKey)
```
</CodeGroup>
</Accordion>
<Accordion title="Test connection">
Expand All @@ -71,6 +84,10 @@ assert client.ping()
```typescript Node
const ping = await client.ping()
```
```go Go
ok := client.Ping()
```

```bash cURL
curl -H "Authorization: Bearer $PROJECT_TOKEN" "$PROJECT_URL/api/v1/healthcheck"
```
Expand All @@ -94,6 +111,10 @@ uid = client.add_user({"ANY": "DATA"})
```typescript Node
const userId = await client.addUser({ANY: "DATA"})
```
```go Go
userid := uuid.New()
userId, err := client.AddUser(map[string]interface{}{"ANY": "DATA"}, userid.String())
```
```bash cURL
curl -X POST "$PROJECT_URL/api/v1/users" \
-H "Authorization: Bearer $PROJECT_TOKEN" \
Expand All @@ -116,6 +137,9 @@ client.update_user(uid, {"ANY": "NEW_DATA"})
```typescript Node
await client.updateUser(userId, {ANY: "NEW_DATA"})
```
```go Go
client.UpdateUser(userId, map[string]interface{}{"ANY": "NEW_DATA"})
```
```bash cURL
curl -X PUT "$PROJECT_URL/api/v1/users/{uid}" \
-H "Authorization: Bearer $PROJECT_TOKEN" \
Expand Down Expand Up @@ -146,6 +170,10 @@ u = client.get_user(uid)
const user = await client.getUser(userId)
```

```go Go
user, err := client.GetUser(userId)
```

```bash cURL
curl -X GET "$PROJECT_URL/api/v1/users/{uid}" \
-H "Authorization: Bearer $PROJECT_TOKEN"
Expand Down Expand Up @@ -176,6 +204,10 @@ client.delete_user(uid)
await client.deleteUser(userId)
```

```go Go
client.DeleteUser(userId)
```

```bash cURL
curl -X DELETE "$PROJECT_URL/api/v1/users/{uid}" \
-H "Authorization: Bearer $PROJECT_TOKEN"
Expand Down Expand Up @@ -220,6 +252,26 @@ const blobId = await user.insert(Blob.parse({
}))
```

```go Go
chatBlob := &blob.ChatBlob{
BaseBlob: blob.BaseBlob{
Type: blob.ChatType,
},
Messages: []blob.OpenAICompatibleMessage{
{
Role: "user",
Content: "Hello, I am Jinjia!",
},
{
Role: "assistant",
Content: "Hi there! How can I help you today?",
},
},
}

blobID, err := user.Insert(chatBlob)
```

```bash cURL
curl -X POST "$PROJECT_URL/api/v1/blobs/insert/{uid}" \
-H "Authorization: Bearer $PROJECT_TOKEN" \
Expand All @@ -244,6 +296,10 @@ b = u.get(bid)
const blob = await user.get(blobId)
```

```go Go
blob, err := user.Get(blobId)
```

```bash cURL
curl -X GET "$PROJECT_URL/api/v1/blobs/{uid}/{bid}" \
-H "Authorization: Bearer $PROJECT_TOKEN"
Expand All @@ -269,7 +325,7 @@ curl -X GET "$PROJECT_URL/api/v1/blobs/{uid}/{bid}" \
</CodeGroup>
</Accordion>

{/* <Accordion title="Delete">
<Accordion title="Delete">
<CodeGroup>

```python Python
Expand All @@ -280,6 +336,10 @@ u.delete(bid)
await user.delete(blobId)
```

```go Go
err := user.Delete(blobId)
```

```bash cURL
curl -X DELETE "$PROJECT_URL/api/v1/blobs/{uid}/{bid}" \
-H "Authorization: Bearer $PROJECT_TOKEN"
Expand All @@ -289,7 +349,7 @@ curl -X DELETE "$PROJECT_URL/api/v1/blobs/{uid}/{bid}" \
{"data":null,"errno":0,"errmsg":""}
```
</CodeGroup>
</Accordion> */}
</Accordion>
</AccordionGroup>

### Memory Operations
Expand All @@ -307,6 +367,10 @@ u.flush()
await user.flush(BlobType.Enum.chat)
```

```go Go
err := user.Flush(blob.ChatType)
```

```bash cURL
curl -X POST "$PROJECT_URL/api/v1/users/buffer/{uid}/chat" \
-H "Authorization: Bearer $PROJECT_TOKEN"
Expand All @@ -331,6 +395,10 @@ u.profile()
const profiles = await user.profile()
```

```go Go
profiles, err := user.Profile()
```

```bash cURL
curl -X GET "$PROJECT_URL/api/v1/users/profile/{uid}" \
-H "Authorization: Bearer $PROJECT_TOKEN"
Expand Down
11 changes: 8 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
<img alt="Shows the Memobase logo" src="./assets/images/logo.png" width="80%">
</picture>
</a>
<h1>Memobase</h1>
<p>
<img src="https://img.shields.io/badge/python->=3.11-blue">
<a href="https://pypi.org/project/memobase/">
<img src="https://img.shields.io/pypi/v/memobase.svg">
</a>
<a href="https://www.npmjs.com/package/@memobase/memobase">
<img src="https://img.shields.io/npm/v/@memobase/memobase.svg?logo=npm&&logoColor=fff&style=flat&colorA=2C2C2C&colorB=28CF8D">
<img src="https://img.shields.io/npm/v/@memobase/memobase.svg?logo=npm&logoColor=fff&style=flat&labelColor=2C2C2C&color=28CF8D">
</a>
<a href="https://jsr.io/@memobase/memobase">
<img src="https://img.shields.io/jsr/v/@memobase/memobase.svg?logo=jsr&&logoColor=fff&style=flat&colorA=2C2C2C&colorB=28CF8D" />
<img src="https://img.shields.io/jsr/v/@memobase/memobase.svg?logo=jsr&logoColor=fff&style=flat&labelColor=2C2C2C&color=28CF8D" />
</a>
<a href="https://pkg.go.dev/github.com/memodb-io/memobase/src/client/memobase-go">
<img src="https://img.shields.io/badge/go-reference-blue?logo=go&logoColor=fff&style=flat&labelColor=2C2C2C&color=28CF8D" />
</a>
<a href="https://github.com/memodb-io/memobase/actions/workflows/publish.yaml">
<img src="https://github.com/memodb-io/memobase/actions/workflows/publish.yaml/badge.svg">
Expand All @@ -31,6 +35,7 @@




Memobase is a **user profile-based memory system** designed to bring long-term user memory to your Generative AI (GenAI) applications. Whether you're building virtual companions, educational tools, or personalized assistants, Memobase empowers your AI to **remember**, **understand**, and **evolve** with your users.


Expand Down Expand Up @@ -74,7 +79,7 @@ Memobase can provide you structured user profiles of users, check out the [resul

- **🎯 Memory for User, not Agent**: Define and control exactly what user information your AI captures.
- **🔄 Scalable Profiling**: User profiles evolve naturally through conversation with controllable memory size.
- **🔌 Easy Integration**: Minimal code changes to integrate with your existing LLM stack with API, Python/Node SDK.
- **🔌 Easy Integration**: Minimal code changes to integrate with your existing LLM stack with API, [Python](https://pypi.org/project/memobase/)/[Node](./src/client/memobase-ts/readme.md)/[Go](./src/client/memobase-go/readme.md) SDK.
- **⚡️ Batch Processing**: Industry-leading speeds via non-embedding system and session buffer. Fast & Cheap.
- **🚀 Production Ready**: Battle-tested by our partners in production.

Expand Down
Loading