@pyxmate/memory 0.19.0 → 0.19.1
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/package.json
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pyx-memory
|
|
3
3
|
description: >
|
|
4
|
-
Persistent memory system for AI agents
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
the
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
Persistent memory system for AI agents — store and retrieve knowledge across
|
|
5
|
+
conversations via pyx-memory. Use this skill whenever you need to remember
|
|
6
|
+
something for later, recall what was discussed or decided in a prior session,
|
|
7
|
+
search stored memory before assuming, store a decision or bug-fix root cause,
|
|
8
|
+
or ingest files, documents, or images into long-term memory. Also use it for
|
|
9
|
+
the lifecycle and wiki primitives: building a per-entity profile or "wiki
|
|
10
|
+
page" (summarizeEntity / getEntitySynthesis — an amortized "tell me about
|
|
11
|
+
X / give me a profile of this customer" synthesis that is computed once and
|
|
12
|
+
reused); browsing a chronological feed of what was added and when (memory
|
|
13
|
+
log — "what has the agent learned", "what's new since last week"); linting
|
|
14
|
+
memory health (orphaned graph nodes, stale syntheses, dedup candidates); and
|
|
15
|
+
consolidation, decay, or session summarization. Use it for any integration
|
|
16
|
+
work with the pyx-memory SDK, MemoryClient, or HTTP API — including
|
|
17
|
+
multi-tenant isolation, fine-grained ReBAC (namespaces, principals, authz
|
|
18
|
+
tuples, AuthzPlan), sensitivity classification, encryption at rest, and
|
|
19
|
+
confidence/abstention scoring. Trigger this skill even when the user does
|
|
20
|
+
not say "pyx-memory" by name: phrases like "remember this", "what did we
|
|
21
|
+
decide", "recall earlier context", "store this decision", "search memory",
|
|
22
|
+
"give me a profile of <person/customer>", "summarize everything we know
|
|
23
|
+
about X", "what has the agent learned", or "set up per-agent / per-tenant
|
|
24
|
+
memory isolation" all indicate this skill should be used. When in doubt
|
|
25
|
+
about whether a request involves agent memory, prefer using this skill.
|
|
21
26
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash(curl *)
|
|
22
27
|
argument-hint: "[store|search|ingest] <content or query>"
|
|
23
28
|
---
|
|
@@ -46,7 +46,7 @@ const client = new MemoryClient('http://localhost:7822', process.env.MEMORY_API_
|
|
|
46
46
|
| POST | `/api/memory/graph/query` | Traverse (JSON: `{ nodeId, depth? }`) |
|
|
47
47
|
| POST | `/api/memory/graph/clear` | Clear all graph nodes and edges (admin) |
|
|
48
48
|
|
|
49
|
-
## Lifecycle (
|
|
49
|
+
## Lifecycle (13 endpoints)
|
|
50
50
|
|
|
51
51
|
| Method | Endpoint | Description |
|
|
52
52
|
|--------|----------|-------------|
|
|
@@ -59,6 +59,10 @@ const client = new MemoryClient('http://localhost:7822', process.env.MEMORY_API_
|
|
|
59
59
|
| GET | `/api/memory/consolidation-log` | Audit trail |
|
|
60
60
|
| GET | `/api/memory/query-as-of?asOf=...` | Bi-temporal point-in-time query (asOf, type, agentId, source, limit) |
|
|
61
61
|
| GET | `/api/memory/query-by-event-time?startTime=...&endTime=...` | Bi-temporal event time range query (startTime, endTime, type, agentId, source, limit) |
|
|
62
|
+
| GET | `/api/memory/lint` | Read-only memory-wide lint report — graph orphans, decay candidates, stale syntheses, dedup candidates (v0.18.0) |
|
|
63
|
+
| GET | `/api/memory/log?since=...` | Chronological feed (Karpathy `log.md`). Cursor-style via `since` created_at lower bound; also `limit`, `type`, `agentId`, `source`. Returns `{ entries, count, since? }` (v0.18.1) |
|
|
64
|
+
| POST | `/api/memory/synthesis/entity` | Synthesize a per-entity profile (Karpathy "wiki page"). JSON: `{ name }`. LLM-driven; stores a pinned `_kind:'entity-summary'` entry with `_search_visibility:'on-demand'`. Returns the entry, 201 (v0.19.0) |
|
|
65
|
+
| GET | `/api/memory/synthesis/entity?name=...` | Fetch a previously-synthesized entity profile. Returns `{ entry }` (`null` if none) (v0.19.0) |
|
|
62
66
|
|
|
63
67
|
## ReBAC Admin (11 endpoints)
|
|
64
68
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Contents
|
|
4
4
|
- Type Cheat Sheet
|
|
5
5
|
- MemoryInterface (9 methods)
|
|
6
|
-
- ExtendedMemoryInterface (
|
|
6
|
+
- ExtendedMemoryInterface (10 lifecycle methods)
|
|
7
7
|
- MemoryClient Constructor and Concrete Methods
|
|
8
8
|
- DashboardClient
|
|
9
9
|
- MemorySearchResult, MemoryEntry, MemorySearchParams
|
|
@@ -62,7 +62,7 @@ interface MemoryInterface {
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
## ExtendedMemoryInterface (adds
|
|
65
|
+
## ExtendedMemoryInterface (adds 10 lifecycle methods)
|
|
66
66
|
|
|
67
67
|
```typescript
|
|
68
68
|
interface ExtendedMemoryInterface extends MemoryInterface {
|
|
@@ -72,9 +72,34 @@ interface ExtendedMemoryInterface extends MemoryInterface {
|
|
|
72
72
|
runDecay(): Promise<number>;
|
|
73
73
|
reindex(): Promise<void>;
|
|
74
74
|
deleteBySource(source: string): Promise<number>;
|
|
75
|
+
// v0.18.0 — read-only memory-wide lint report (graph orphans, decay
|
|
76
|
+
// candidates, stale syntheses, content-hash dedup candidates).
|
|
77
|
+
lint(options?: { limit?: number }): Promise<WikiLintReport>;
|
|
78
|
+
// v0.18.1 — chronological feed (Karpathy log.md primitive). Cursor-style
|
|
79
|
+
// via `since` (created_at lower bound). No totalCount.
|
|
80
|
+
log(filters?: MemoryLogFilters): Promise<MemoryEntry[]>;
|
|
81
|
+
// v0.19.0 — entity synthesis (Karpathy "wiki page" primitive).
|
|
82
|
+
// summarizeEntity is LLM-driven and caller-triggered; it stores a pinned
|
|
83
|
+
// `_kind:'entity-summary'` entry with `_search_visibility:'on-demand'`
|
|
84
|
+
// (excluded from search). getEntitySynthesis is the O(1) read path.
|
|
85
|
+
summarizeEntity(name: string): Promise<MemoryEntry>;
|
|
86
|
+
getEntitySynthesis(name: string): Promise<MemoryEntry | null>;
|
|
75
87
|
}
|
|
76
88
|
```
|
|
77
89
|
|
|
90
|
+
`MemoryLogFilters` = `{ since?: string; limit?: number; type?: MemoryType; agentId?: string; source?: string }`.
|
|
91
|
+
|
|
92
|
+
### Reserved metadata conventions
|
|
93
|
+
|
|
94
|
+
Some `metadata` keys carry behavior, not just data:
|
|
95
|
+
|
|
96
|
+
| Key | Value | Effect |
|
|
97
|
+
|-----|-------|--------|
|
|
98
|
+
| `_search_visibility` | `'on-demand'` | Entry is excluded from every RAG engine's retrieval pool (v0.18.2 hook). Still reachable via `get` / `list` / `log` and deterministic-id fetch. Field absent ⇒ visible. |
|
|
99
|
+
| `_kind` | `'entity-summary'` | Marks an entity synthesis. `Memory.lint` flags stale ones; the `synthesis:` id prefix is reserved for entries carrying this. |
|
|
100
|
+
| `_sourceEntryIds` | `string[]` | Provenance — the entries a synthesis was built from. |
|
|
101
|
+
| `_maxEventTime` | ISO string \| null | Staleness contract — `lint` flags the synthesis when a source's eventTime later exceeds this. |
|
|
102
|
+
|
|
78
103
|
## MemoryClient Constructor and Concrete Methods
|
|
79
104
|
|
|
80
105
|
```typescript
|
|
@@ -100,7 +125,7 @@ Graph queries and file ingestion are available without `@pyx-memory/core`.
|
|
|
100
125
|
|
|
101
126
|
```typescript
|
|
102
127
|
class MemoryClient implements ExtendedMemoryInterface {
|
|
103
|
-
// ... all
|
|
128
|
+
// ... all 19 interface methods (9 base + 10 lifecycle) ...
|
|
104
129
|
|
|
105
130
|
// Graph operations (call pyx-memory server's graph endpoints)
|
|
106
131
|
graphNodes(): Promise<GraphNode[]>;
|