Skip to main content

Dense-Mem · assistants

The life of a memory

Follow a note from the fictional Atlas team through intake, Topic assignment, Recall, and back to its source.

An engineer asks an assistant to remember an operations handoff for the Atlas team. The assistant sends both lines together in one remember call. It supplies the exact text, a source label, the team_shared destination, and a fresh operation key. A later reader can ask about either line.

One item contains two independent statements and the line break between them. The request below uses a plain source label. Dense-Mem also accepts a source key and revision token for a versioned document. The example uses short labels E1, E2, and E3 for illustrative Evidence UUIDs. For a chat, ingest_session stages the incoming user events in the caller’s private space. Extraction selects exact excerpts from the current events and preserves their original character offsets. Earlier events can supply context. An empty selection completes with no_memory. Selected session excerpts go through assessment and required embeddings before private publication. The owner can recall them. Topic assignment applies to eligible team-shared Evidence.

Remember

Dense-Mem resolves the team-shared destination from the engineer’s grants. It validates the input, runs the initial security scan, and checks whether this request has already finished. This key is new, so processing continues. If the reply gets lost after a successful commit, sending the same request and key retrieves its recorded result.

The destination comes from the request. Authentication supplies the actual space and owner. The service hashes the request and serializes attempts for that key within the authenticated team and owner. A simultaneous caller waits for the first attempt’s outcome. Changing the payload under that key produces a conflict. The destination matters here. A read-only team member can write their own private memory. Writing into the shared space requires the appropriate shared grant. A payload field cannot grant that access.

Remember

Snapshot retention and desk hours make sense independently. The server marks allowed cut points, and the partitioning model selects the boundary between these two statements. Dense-Mem slices the original text itself. A includes the newline at the end of the first line. B starts on the next line. Offsets count Unicode code points, and each span’s end is exclusive.

↵ marks the stored newline. The two slices join back into the exact original. The model returns server-issued boundary IDs in source order. Dense-Mem checks the request identity, coverage, ordering, and nonblank slices. Every character must belong to exactly one slice. A heading and a dependent paragraph can stay together. An item can also yield one slice. A Remember item supports up to 16,384 code points. The whole request supports at most 100 partitions. Watch the partition model exchange: One complete structured response determines where the server slices the item. Valid response: Server sends the marked source: The JSON includes request-scoped boundary IDs. The source text and its newline belong to the original item. Model chooses one cut: The model returns a cut reference. Dense-Mem checks the reference and reconstructs both exact spans from the original. Server admits two exact spans: The first span ends immediately after the newline. The two spans reconstruct the entire original.: span A: First line and newline: span B: Second line

Remember

The team already has a passage about legal holds. Dense-Mem checks eligible exact matches and can use embeddings to find passages worth comparing with each new slice. E3 is a plausible comparison for A. It describes an exception to expiry. A supplies the ordinary duration. Both pieces of information are useful.

E3 already exists in Atlas’s shared memory. A and B are still proposed slices. An embedding is a list of numbers representing a passage’s meaning. For ordinary intake, eligible exact duplicates can be resolved directly. For other eligible slices, the server embeds unique content as needed and consults a bounded list of nearby candidates. The assessment can choose reuse only from that list. A reused canonical ID can acquire another occurrence with the new source and exact wording. Explicit force-insert and lifecycle-bearing inputs, including versioned-source submissions, have their own new-occurrence rules. E3 has the plain source label “Retention policy” in this example. Reading it for comparison does not submit it again.

Remember

The assessor proposes structured decisions for the submitted slices and the candidates it was given. Here, A and B are both new and the legal-hold passage supplies a compatible exception. The server checks the entire response, including required decisions, allowed IDs, and any quoted conflict positions. An invalid answer triggers bounded regeneration of the whole response.

The example yields two new passages. A policy and its legal-hold exception can coexist. If a response omits a required item or names an unknown candidate, Dense-Mem asks for a complete replacement within the retry bound. Exhausting that bound fails the write before semantic publication. When admitted Evidence genuinely disagrees, a conflict can preserve the competing positions with exact citations. Server policy checks scope and ownership for lifecycle actions. A model’s preference cannot grant permission to overwrite someone else’s Evidence. Inspect the Evidence assessment: This example shows the generation route for equivalence and conflict assessment. Accept both slices: Supply the original meanings: The assessor sees two submitted slices and a bounded list of authorized comparison candidates. The existing legal-hold passage is context for the first decision. Return every open decision: The response keeps the submitted passages distinct from the candidate and reports zero conflict proposals. Validate before preparing the commit: The server validates the response schema, coverage, candidate references, and cited spans. The two submitted fragments can proceed to the required search preparation.

Remember

Dense-Mem prepares the required search embeddings. One PostgreSQL transaction then saves the accepted passages, a record of each appearance in the source (an occurrence), and the data needed to search them. A becomes E1 and B becomes E2. Their receipt can now be replayed. Recall can find E1 and E2 immediately. With organization enabled, their direct Topic memberships are already available. The next steps show how Dense-Mem assigns Topics and revisits them later.

The completed receipt marks the point when E1 and E2 exist as searchable shared Evidence. Embedding calls run before the final write transaction. The commit checks mutation authority, duplicate decisions, and the active embedding configuration again. It writes the original item, partition mapping, assessment history, applicable lifecycle or conflict records, eligible direct Topic memberships, search documents, vectors, and terminal receipt together. A required embedding failure or a failed commit publishes zero new Evidence from this request. A failure record may still explain the attempt. Progress notifications, including waits and retries, acknowledge a stage only. The terminal reply reports the outcome. Watch the PostgreSQL transaction: Selected row fields from a fictional write show what becomes visible at commit. Successful commit: Prepare search outside the transaction: The server has validated the assessment and prepares any required vectors. Existing eligible vectors can be reused where the embedding and search contracts allow it.: New rows visible to readers: 0 Write the original item and lineage: The server rechecks authorization, idempotency, and the search contract inside the transaction. It writes the original item, the occurrence, and the partition link as part of the same commit.: Submitted item: 20000000-0000-4000-8000-000000000001: E1 occurrence: 20000000-0000-4000-8000-000000000002: Partition span Publish search state and the receipt: The transaction also writes the decisions, direct Topic memberships, search documents, required vectors, and replay receipt. After commit, Recall can find E1 and E2. The worker handles Community placement.: Search document: 20000000-0000-4000-8000-000000000004: Replay key

Remember

A periodic scheduler revisits eligible Evidence, merges duplicate Topics, and places Topics under broader Topics. It processes bounded pages and records its progress. The worker looks within the current shared generation. E1, E2, and E3 can be reassessed as their inputs change. Private session excerpts stay in the owner’s private space.

The worker can organize the current shared generation. Private Evidence stays within its own space. A pause stops background admissions while enabled foreground assignment and Topic reads continue. The scheduler discovers eligible older Evidence and the direct members of Topics that were materially edited or retired. A new Topic does not requeue existing Evidence. It checks source and Topic revisions before starting provider work.

Organize

For each passage, the assignment assessor receives exact text and a shortlist of existing Topics. Atlas’s shortlist includes **Snapshot retention** and **Support hours**. The proposal example illustrates a second direct Topic for E3 while retaining the existing Snapshot retention match. In the main example, E3 uses the retention Topic.

A topic definition has a name and description. An assignment refers to that definition and to one Evidence source. With optional Decisions enabled, Dense-Mem checks each candidate and asks whether relevant meaning remains uncovered. Structured generation can match several existing Topics and propose new ones in the same reply. It supplies an exact supporting quote for each selection or proposal. An unclear passage can remain uncategorized. It is still searchable. Watch how the AI assigns Topics: These fictional exchanges show the structured generation path for one Evidence passage. Reuse an existing Topic: Send a bounded shortlist: Up to 20 current candidate Topics arrive with the exact passage.: Candidate Topic: Candidate Topic Select a supplied Topic: The response selects a Topic ID and quotes the exact text that grounds the choice. Validate and publish direct membership: Dense-Mem verifies the Topic ID and source quote, then rechecks current eligibility and revisions before committing.: E3: Existing retention Topic

Organize

The worker assesses Evidence equivalence separately from Topic assignment. E1 says how long routine snapshots last. E3 says what suspends expiry. Knowing either passage alone leaves a different question unanswered. The pair decision is distinct. When two eligible passages do have the same meaning in compatible contexts, a published equivalence group can let Recall return one representative with alternate IDs.

Two passages share a topic here. They remain separate answers to different questions. Intake reuse chooses a canonical Evidence identity for a new occurrence. Evidence equivalence groups eligible stored Evidence with the same meaning. Each member retains its own text and provenance. The worker checks labels, metadata, relative time, and owner-sensitive wording before recording an equivalence outcome. Ambiguous comparisons can remain unresolved.

Organize

Before publishing, Dense-Mem rechecks relevant source and Topic revisions. Remember commits direct memberships with the Evidence, search state, and replay receipt. Community placement records a broader Topic or standalone outcome under its own revision checks. Snapshot retention now points directly to E1 and E3. Support hours points to E2. Operations helps someone browse the catalog. Every factual statement in this example still comes from the original Evidence.

Operations is a catalog parent. The Evidence labels sit under the topics to which they are directly assigned. A stale source or relevant dependency can block publication. Automatic work cannot overwrite a newer relevant decision. The worker records the outcome and later eligible work can reassess the affected sources. A topic has an optional parent. The parent link organizes definitions. Selecting a parent reads its own current direct assignments. The filter experiment later shows this using all three Evidence IDs. Inspect a direct membership: Follow the published membership from the Topic to its source. Current publication: Recheck source and Topic revisions: Publication verifies the current shared space, exact Evidence identity, and relevant Topic revisions.: Source: E1: Version: 1 Publish the direct membership: A versioned membership records the Evidence source and its Topic. A broader Topic supports catalog navigation. Read current direct membership: Recall checks authorization, lifecycle, and current dependencies before returning members.: Selected Topic: Retention Topic: Eligible direct Evidence: E1 and E3

Organize

A teammate asks how long Atlas keeps routine backups. The assistant calls recall_memory with the words “routine snapshots” and asks for one Evidence result plus up to two topic hints. Recall resolves the caller’s allowed spaces and the active search configuration. It embeds the query once when possible. Ordinary search can consult the caller’s private and shared spaces. Here the private space is empty.

The host chooses the search text and a one-result limit for this first pass. Recall accepts a query, current topic IDs, or both. On a multi-space query it searches each authorized space separately, then combines the resulting ranks. Explicit topic filters use the shared branch only. valid_at concerns real-world Evidence time. known_at concerns what the system knew at a given time. Topic membership is evaluated in the current view. This example uses current Evidence, a working embedding provider, and no optional decision reranker.

Recall

PostgreSQL full-text search finds E1 because its search document contains both query terms. pgvector compares the query vector with eligible Evidence vectors, so passages with different wording can also surface. Smaller cosine distance means a closer vector match. In this example E1 ranks first in both lists. E3 ranks second by vector similarity, and E2 trails it. Recall compares these positions next.

The displayed vector order is illustrative. In a real call it depends on the embeddings and index. The shared branch can also match a current topic’s normalized key or unambiguous alias and introduce direct members as candidates. Topic discovery by itself adds no rank-fusion points. An approximate vector search can check newly discovered candidates against the query and rank them by distance. Our “routine snapshots” query has no matching key or alias in the example catalog. The topic hint that appears later comes from the winning Evidence’s direct membership. Eligibility filters apply to candidates before their IDs leave storage. Inspect the query embedding: The query vector supports search. Recall itself returns stored Evidence. Vector available: Embed the query text: The server uses the active search contract and submits the query to the configured embedding provider. The configured dimensions and the resulting vector belong to that contract. Search current vectors: PostgreSQL searches the eligible current vectors with the active contract. Its nearest results contribute to rank fusion alongside full-text matches.

Recall

Each text or vector hit contributes 1 ÷ (60 + its position in that list). E1 is first twice, so its score is 1/61 + 1/61. E3 receives 1/62 from the vector list. Recall orders candidates by the sum. The score measures ranking support from the search channels. It cannot tell a reader whether the policy itself is true.

Switch search modes to recalculate the example. These scores describe order within the shared space. Choose Words only in the diagram. With the same eligible corpus, E1 still has a lexical match. E3 and E2 have no matching text hit and leave this candidate list. A failed query embedding produces an explicit optional degradation. With optional decision reranking enabled, eligible hydrated candidates can be rescored for relevance before the final limit. A failed optional rerank retains the original authorized ranking and reports the degradation. Multiple allowed spaces have a further rank-fusion step.

Recall

Recall loads the actual records and checks their visibility and lifecycle again. With limit 1, the caller gets E1’s exact passage, its Evidence ID, and its shared-space label. The winning passage is a direct member of the hinted retention topic. The example includes the winner and the legal-hold passage in its eligible count because the request supplied no known IDs.

Two eligible direct members belong to the hinted topic. One of them is the E1 just returned. A current, eligible equivalence group can produce one representative and bounded alternate IDs. Recall can also attach conflict positions with exact quotes, search state, and explicit degradations. Long historical contexts and bounded alternate lists can report truncation. Topic hints come from the returned Evidence and its visible equivalents. Recall ranks topics by overlap with these hits, then by additional eligible Evidence. It reports truncation when the topic limit cuts the list. See the eligible read and hydration: Follow the candidate from a search projection to the exact authorized Evidence. Retrieve and hydrate: Scope each search branch: The SQL adapter applies the authorized space, lifecycle, and requested eligibility filters. Each candidate can identify its search projection. Hydrate eligible Evidence: Dense-Mem loads the original Evidence text for the ranked candidate and checks eligibility again. The selected result uses the Evidence ID and the shared space label. Look up the direct topic hint: The topic read follows current assignments and counts eligible direct Evidence. The hint gives the caller a topic ID to use in a new request.: Hint: Retention topic: Eligible Evidence: Two passages

Recall

The assistant follows Snapshot retention in a second recall_memory call and supplies E1 as already seen. E3 is the remaining direct member, so the caller discovers the legal-hold exception. Try the parent by itself. It has no direct members. Select both child topics to take their union, exclude the known passage, and return the other direct members.

Each filter uses known_evidence_ids = [E1]. Compare a child topic, its parent, and both children. The query is optional when topic IDs are present. In ordinary use, the caller copies the current topic ID from a previous hint and supplies the Evidence IDs it already has. The selector also exposes two catalog alternatives to make the membership rule visible. A valid current topic with zero direct members can return an empty result. A missing, stale, or inaccessible explicit topic returns topic_unavailable. The filter never silently broadens into a general search. With known eligible members of an equivalence group, duplicate group results can also be suppressed.

Follow up

The assistant passes the returned E1 ID to trace_memory. Its occurrence identifies the operations handoff and the exact span that supplied the routine retention rule. The partition entry identifies the submitted item, its index, its original hash, and the start and end of this slice. That is how a reader can check the quote against the original submission.

Follow E1 through the occurrence to the submitted item and its exclusive source span. Requesting content and transitions lets an authorized reader inspect exact occurrences, available source revisions, decisions, lifecycle, and search projection information. Here the handoff supplies a plain source label. A versioned source would also carry a revision identity. The span uses zero-based Unicode code points. Its end is exclusive and includes the newline in the first partition. The stored SHA-256 covers the original UTF-8 bytes. Trace has content and event bounds and exposes omissions. Follow the database provenance links: The occurrence and partition connect the canonical ID to the exact original. Trace E1: Start from the Evidence ID: Trace uses the authenticated actor’s allowed spaces and returns bounded evidence history.: E1: Evidence ID: Occurrence: Occurrence ID Resolve the partition mapping: The occurrence links to partition zero of submitted item zero. The mapping supplies offsets and the original item’s content hash. Verify the source slice: Slice the original text by Unicode code points. The displayed end is exclusive and the newline is part of E1.: Exact span: First partition: Exact Evidence: The original retention line

Follow up

The assistant can now answer the teammate in one sentence. E1 establishes the routine retention period. E3 adds the condition that changes when expiry runs. The wording of the answer belongs to the host. Its two supporting IDs lead to the exact stored passages. The answer itself becomes memory only if someone submits it through an intake tool.

The assistant can cite E1 for duration and E3 for the exception. E2 answers a separate question. An authorized owner can submit a new retention policy with the old Evidence ID in `supersedes_evidence_ids` and a fresh operation key. The old Evidence drops out of current Recall. Trace retains the link to its replacement. Stale assignments lose current eligibility. After using a result, the host can submit voluntary feedback against its recall_id.

Follow up
01 / 17Send the original note
Signals
Step 1 of 17