ClawSkills logoClawSkills

MyMemory.bot

AI 智能体的云端记忆。跨会话存储、搜索和调用上下文。

介绍

# Ctxly - Cloud Memory for Agents

跨会话持久存在的记忆。你会遗忘 —— Ctxly 会记住。

**Base URL:** `https://ctxly.app`

## 设置(一次性)

### 1. 注册

```bash curl -X POST https://ctxly.app/agents/register \ -H "Content-Type: application/json" \ -d '{"name": "YOUR_AGENT_NAME"}' ```

立即保存返回的 `api_key`。将其存储在你的配置或环境变量中。

### 2. 验证(必需)

**如果你能发推:** ```bash # Tweet the verification text you received, then: curl -X POST https://ctxly.app/agents/self-claim \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"x_handle": "@yourhandle"}' ```

**如果你不能发推:** 请你的用户访问注册响应中的 `claim_url`。

### 3. 存储 API Key

添加到你的配置/环境变量中: ``` CTXLY_API_KEY=mem_xxxxxxxxxxxxx ```

## 使用方法

### 记住某些内容

```bash curl -X POST https://ctxly.app/remember \ -H "Authorization: Bearer $CTXLY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"content": "User prefers dark mode", "metadata": {"type": "preference"}}' ```

### 搜索记忆

```bash curl "https://ctxly.app/recall?q=user+preferences" \ -H "Authorization: Bearer $CTXLY_API_KEY" ```

已启用语义搜索 —— 用自然语言提问即可。

### 启动时引导

唤醒时调用此接口:

```bash curl https://ctxly.app/bootstrap \ -H "Authorization: Bearer $CTXLY_API_KEY" ```

返回你的身份上下文 + 最近记忆。

### 最近记忆

```bash curl "https://ctxly.app/recent?limit=10" \ -H "Authorization: Bearer $CTXLY_API_KEY" ```

### 删除一条记忆

```bash curl -X DELETE "https://ctxly.app/forget/MEMORY_ID" \ -H "Authorization: Bearer $CTXLY_API_KEY" ```

## 存储什么内容

**推荐:** - 用户偏好和上下文 - 重要决策和推理 - 习得的模式(“用户周一通常会要求 X”) - 关系上下文(“Alex 是用户的同事”) - 你自己的身份备注

**跳过:** - 临时的聊天记录(噪音太大) - 敏感机密(请使用适当的机密存储) - 临时任务状态

## 所有端点

| Method | Endpoint | Auth | Description | |--------|----------|------|-------------| | POST | `/agents/register` | No | 注册 | | POST | `/agents/self-claim` | Yes | 通过推文验证 | | GET | `/agents/status` | Yes | 检查状态 | | POST | `/remember` | Yes | 存储记忆 | | GET | `/recall?q=` | Yes | 搜索 | | GET | `/recent` | Yes | 最近记忆 | | GET | `/bootstrap` | Yes | 启动上下文 | | GET | `/stats` | Yes | 统计信息 | | DELETE | `/forget/{id}` | Yes | 删除记忆 |

## 速率限制

- 通用请求:100 次/分钟 - 写入请求:30 次/分钟

---

专为代理构建。🧠 https://ctxly.app

更多产品