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
15 changes: 0 additions & 15 deletions .changeset/eve-extension-0490-rebuild.md

This file was deleted.

45 changes: 0 additions & 45 deletions .changeset/eve-redis-memory-slots.md

This file was deleted.

38 changes: 0 additions & 38 deletions .changeset/sdk-memory-metadata.md

This file was deleted.

8 changes: 8 additions & 0 deletions examples/ai-sdk-demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ai-sdk-demo

## 0.1.4

### Patch Changes

- Updated dependencies [0117c2e]
- @upstash/agentkit-sdk@0.9.0
- @upstash/agentkit-ai-sdk@0.9.0

## 0.1.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-sdk-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ai-sdk-demo",
"version": "0.1.3",
"version": "0.1.4",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
7 changes: 7 additions & 0 deletions examples/eve-demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# eve-demo

## 0.0.10

### Patch Changes

- Updated dependencies [0117c2e]
- @upstash/agentkit-eve@0.9.0

## 0.0.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/eve-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eve-demo",
"version": "0.0.9",
"version": "0.0.10",
"private": true,
"type": "module",
"imports": {
Expand Down
7 changes: 7 additions & 0 deletions examples/eve-extension-demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# eve-extension-demo

## 0.0.8

### Patch Changes

- Updated dependencies [35e3d69]
- @upstash/agentkit-eve-extension@0.9.0

## 0.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/eve-extension-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eve-extension-demo",
"version": "0.0.7",
"version": "0.0.8",
"private": true,
"type": "module",
"imports": {
Expand Down
7 changes: 7 additions & 0 deletions packages/ai-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @upstash/agentkit-ai-sdk

## 0.9.0

### Patch Changes

- Updated dependencies [0117c2e]
- @upstash/agentkit-sdk@0.9.0

## 0.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upstash/agentkit-ai-sdk",
"version": "0.6.0",
"version": "0.9.0",
"description": "Upstash AgentKit adapter for the Vercel AI SDK: chat history, memory tools, Redis-Search tools, rate limiting, and cached tools.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated by scripts/sync-version.mjs (run by `pnpm ci:version`) — do not edit by hand.
export const VERSION = "0.6.0";
export const VERSION = "0.9.0";
21 changes: 21 additions & 0 deletions packages/eve-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @upstash/agentkit-eve-extension

## 0.9.0

### Minor Changes

- 35e3d69: fix!: rebuild against eve 0.49.0 and raise the `eve` peer floor to `>=0.48.0`

No source changed. The extension's `dist` is rebuilt with eve 0.49.0, which re-stamps the manifest's
tool contract 21 → 24 (every other contribution contract is unchanged). eve 0.48.0 is the first
release accepting tool 24, so the `eve` peer moves `">=0.47.0"` → `">=0.48.0"`.

No 0.47.x works, including 0.47.7 — the tool contract moved twice in three releases (22 → 23 in
0.47.7, 23 → 24 in 0.48.0). On an unsupported eve the mount contributes nothing and `eve build`
fails with `Selected module binding "extensions/agentkit.ts" has no compile or runtime usage.`

This supersedes the unreleased 0.47.6 rebuild (tool 22, floor `>=0.47.5`), which never shipped.

### Patch Changes

- Updated dependencies [0117c2e]
- @upstash/agentkit-sdk@0.9.0

## 0.8.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/eve-extension/extension/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated by scripts/sync-version.mjs (run by `pnpm ci:version`) — do not edit by hand.
export const VERSION = "0.8.0";
export const VERSION = "0.9.0";
2 changes: 1 addition & 1 deletion packages/eve-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upstash/agentkit-eve-extension",
"version": "0.8.0",
"version": "0.9.0",
"description": "Upstash AgentKit as an eve extension: long-term memory tools, Redis Search tools, and searchable durable chat history on Upstash Redis — mounted with one file.",
"license": "MIT",
"repository": {
Expand Down
52 changes: 52 additions & 0 deletions packages/eve/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# @upstash/agentkit-eve

## 0.9.0

### Minor Changes

- 0117c2e: feat(eve): add `@upstash/agentkit-eve/memory` — Upstash Redis behind eve's memory slots

A new subpath with two integrations for eve's [memory](https://eve.dev/docs/memory) feature
(`agent/memory/<slot>.ts`), because eve exposes two different seams:

- **`redisDocuments()`** — a `MemoryDocumentBackend` for eve's built-in `fileMemory()`, replacing its
Vercel Blob storage: `fileMemory({ backend: redisDocuments() })`. Without a `backend`,
`fileMemory()` only resolves storage under `eve dev` and on Vercel with a Blob store attached.
- **`redisMemory()`** — a full `MemoryProvider` over the SDK's `AgentMemory`: ranked BM25 recall at
`turn.started` / `compaction.completed`, capture at `turn.completed`, and the tools
`<slot>__save_memory`, `<slot>__search_memory`, `<slot>__read_session` and `<slot>__forget_memory`,
bound to the slot's locked scope. Where `fileMemory()` replays one curated document, this recalls
the top-K memories relevant to the current turn and needs no tool call to remember anything.

Both are additive: `defineMemoryRecallTool` / `defineMemorySaveTool` are unchanged and remain the
right choice for model-driven memory with no slot.

**Requirements.** The subpath imports `eve/memory` and `eve/memory/file` (added in eve 0.45.1 and
0.45.2), so it needs **eve ≥ 0.45.2** — the package's `eve` peer stays `>=0.32.0` because the root
and `./sandbox` entry points still work further back. The `@upstash/redis` peer floor moves to
**`>=1.38.4`**, whose read-your-writes fix `redisDocuments()` relies on.

**`redisMemory()` options:** `rememberMessages` (default `true`, meaning `"fromUser"`; also `"all"`,
`"fromModel"`, `false`), `maxRecallCharacters` (4000), `maxMemoryCharacters` (2048), plus `topK`,
`minScore`, `prefix`, `indexName`.

Three behaviours worth knowing before you configure it:

- **Automatic recall injects saved facts only.** Captured messages share the store but not the
ranking, and are reached on demand through `search_memory` / `read_session`. Otherwise a stored
_"What do you remember?"_ outranks real facts on the next identical question.
- **`forget_memory` redacts rather than deletes.** The text is erased and the entry marked deleted,
so it can never be recalled or searched again, but `read_session` renders it as `[redacted]` — a
silent gap invites re-deriving the very thing that was removed.
- **`"all"` and `"fromModel"` do not get `forget_memory`.** Those modes store the assistant's
replies, and a reply confirming a deletion quotes the text it deleted — so erasing something would
write a fresh copy of it. They contribute `save_memory`, `search_memory` and `read_session` only.

Everything the slot keeps lives in one keyspace of its own (`agentkit:memorySlot`) with `sessionId`,
`source` and `deleted` indexed, so there is no separate transcript store to fall out of sync.
Recalled memories are tagged `session=<id>`, and `read_session` replays that session in order.

### Patch Changes

- Updated dependencies [0117c2e]
- @upstash/agentkit-sdk@0.9.0
- @upstash/agentkit-ai-sdk@0.9.0

## 0.8.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/eve/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upstash/agentkit-eve",
"version": "0.8.0",
"version": "0.9.0",
"description": "Upstash AgentKit adapter for the Vercel Eve agent framework: memory tools, an Upstash Redis memory backend and provider for eve memory slots, Redis-Search tools, a rate-limit gate, an Upstash Box sandbox backend, and cached tools.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eve/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated by scripts/sync-version.mjs (run by `pnpm ci:version`) — do not edit by hand.
export const VERSION = "0.8.0";
export const VERSION = "0.9.0";
39 changes: 39 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# @upstash/agentkit-sdk

## 0.9.0

### Minor Changes

- 0117c2e: feat(sdk): typed indexed metadata on `AgentMemory`, plus `get`/`list`/`count`

`AgentMemory` accepts a `metadataSchema` of Upstash Search field builders, whose values are supplied
per record as `metadata` and can then be filtered on:

```ts
const memory = new AgentMemory({
redis,
prefix: "myapp:memory", // ← its own prefix; see below
metadataSchema: { source: s.string().noTokenize(), deleted: s.boolean() },
});

await memory.add({ text: "…", userId: "u1", metadata: { source: "agent", deleted: false } });
await memory.recall({ userId: "u1", query: "…", filter: { source: { $eq: "agent" } } });
```

The schema types everything: `metadata` and each `filter` are derived from it, so a wrong operand
type or an undeclared field is a compile error rather than a query that quietly matches nothing. To
narrow a derived type, pass it as a second argument, constrained to the schema:
`new AgentMemory<typeof schema, { source: "agent" | "userMessage" }>(…)`.

Also new: `list({ userId, filter, limit })` (filter-first, unranked), `count({ userId, filter })`,
and `get({ userId, id })` — a direct-key read, for when you have an id and a bounded search page
could hide it.

**Give an extended store its own `prefix`.** A stricter schema pointed at a keyspace that already
holds records written without those fields makes them permanently unreachable: Upstash Search does
not match a missing field against `{$eq: …}` and has no `$ne`. Omitting `metadataSchema` leaves the
store exactly as it was.

**Behaviour change:** `recall()` no longer falls back to "everything for the user" when a `query`
matches nothing; it returns nothing, since the fallback made a miss indistinguishable from a hit.
Omitting the query is still how you ask for the whole set. This reaches every caller of `recall`,
including the memory tools in `@upstash/agentkit-ai-sdk`, `@upstash/agentkit-eve` and the extension.

## 0.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upstash/agentkit-sdk",
"version": "0.6.0",
"version": "0.9.0",
"description": "Core, framework-agnostic primitives for AI agents on Upstash Redis: chat history, long-term memory, schema-driven search tools (RAG), tool caching, and rate limiting.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated by scripts/sync-version.mjs (run by `pnpm ci:version`) — do not edit by hand.
export const VERSION = "0.6.0";
export const VERSION = "0.9.0";