|
memory: one search across facts, raw history and sketches
Compression removes messages from the model's window, not from the conversation: every compression path now writes the turns it demotes into `memory_chunks` — verbatim, append-only, with the turn range, timestamps and breadcrumb keys (the summarizer's `KEYS:` line plus a deterministic extractor, which also covers the hard-truncate fallback that never sees a summarizer). `memory_search` is the single read path over the three stores: curated facts first, then raw excerpts by relevance, then the current session's sketches. Every hit carries provenance (source, session, turn range, timestamp), and a raw excerpt that a newer curated fact overrides is labelled outdated rather than hidden — "we changed our mind, the old value was X" is often the question. The agent also gets up to two relevant excerpts injected per turn once the context holds a summary, deduped across turns. Fixes found by running the pilot against a real database: - `search_facts` returns ISO-string timestamps while chunks return datetimes; the freshness comparison raised TypeError and took the whole search down. - an existing `memory_chunks` table created without pgvector never gained the `embedding` column (CREATE TABLE IF NOT EXISTS does not alter), and the INSERT failed on it; the DDL now adds the column, and a database without pgvector writes text-only rows found through FTS. |
|---|
|
|
| docs/agent.md |
|---|
| docs/config.md |
|---|
| docs/mechanics.md |
|---|
| docs/memory.md |
|---|
| docs/navi_code.md |
|---|
| docs/profiles.md |
|---|
| docs/sessions.md |
|---|
| docs/store.md |
|---|
| docs/tools.md |
|---|
| navi/core/agent.py |
|---|
| navi/core/compressor.py |
|---|
| navi/core/container.py |
|---|
| navi/core/context_builder.py |
|---|
| navi/core/orchestrator.py |
|---|
| navi/core/pg_session_store.py |
|---|
| navi/core/registry.py |
|---|
| navi/memory/_chunks.py 0 → 100644 |
|---|
| navi/memory/_ddl.py |
|---|
| navi/memory/breadcrumbs.py 0 → 100644 |
|---|
| navi/memory/search.py 0 → 100644 |
|---|
| navi/memory/store.py |
|---|
| navi/profiles/assistant/config.json |
|---|
| navi/profiles/designer_3d/config.json |
|---|
| navi/profiles/developer/config.json |
|---|
| navi/profiles/discuss/config.json |
|---|
| navi/profiles/modeler_3d/config.json |
|---|
| navi/profiles/navi_code/config.json |
|---|
| navi/profiles/server_admin/config.json |
|---|
| navi/settings_model.py |
|---|
| navi/store/__init__.py |
|---|
| navi/tools/__init__.py |
|---|
| navi/tools/memory_search.py 0 → 100644 |
|---|
| navi/workers/base.py |
|---|
| navi/workers/compressor.py |
|---|
| tests/unit/core/test_agent.py |
|---|
| tests/unit/core/test_compression_breadcrumbs.py 0 → 100644 |
|---|
| tests/unit/core/test_memory_recall.py 0 → 100644 |
|---|
| tests/unit/memory/test_breadcrumbs.py 0 → 100644 |
|---|
| tests/unit/memory/test_chunks.py 0 → 100644 |
|---|
| tests/unit/memory/test_memory_ddl.py |
|---|
| tests/unit/memory/test_memory_search.py 0 → 100644 |
|---|
| tests/unit/tools/test_memory_search_tool.py 0 → 100644 |
|---|