A phone that remembers what it saw, where an entry the user deleted stays deleted when the organizer rewords it

Taku OS

An Android OS for agents whose memory app captures screens and notifications on-device and organizes them nightly into a graph, board and user card.

LicenceApache-2.0 in LICENSE, LICENSES/ and the package manifests, with REUSE annotations; the MIT and internal terms that preceded it kept under docs/license-history
Size3,332 lines of Java in 26 files in system/memory/src, 616 in the assistant broker's memory and context classes, and 797 lines of memory tests, in a 4,072-file repository; the memory is MemoryStore.java (589 lines, about 74 KB), Recall.java (468), Privacy.java (137) and Organizer.java (155)
Activity228 public commits from 18 November to 2 December 2026 by about ten names, nine of them under system/memory; the module's own notes describe versions 0.4 to 0.16 from October that predate the public history
Testsabout 320 check assertions in instrumented memory fixtures that run on an Android device or emulator, with committed outputs in docs/reviews; CI runs none of them; none run for this reading

Carries 2 of 7 rubric mechanisms. Most systems here carry none or one (41%), and a dash means the mechanism was not found at this commit — not that the system needed it. Each mark is one LLM reviewer's reading of the code at this commit rather than a run of it — known limits.

  • Tombstone
  • Trust state
  • Bi-temporal
  • Scope enforced
  • Mutation audit
  • Human review
  • Negative evals

1. Executive Summary

Taku OS is an Android system built around an on-device agent, and its memory is one app, org.agentos.memory, with its own Android UID and a private SQLite database. It records what the user's selected apps put on screen and in notifications. A small on-device model classifies each record, and a nightly organizer, running on the user's own model account through the assistant's broker, turns new records into a versioned memory graph, a "current work" board and a short user card. The assistant gets the board and the card on every turn and two tools, memory_search and memory_get, for the records.

Notable: deletion is designed to reach everything derived from what was deleted. Forgetting a record drops every graph-node version that cites it and every board and card version written since it was seen, and an organize run that started before the deletion discards its result. The assistant is told on its next turn that what memory said before the deletion may be void. A board or card entry the user deletes is kept as a value and filtered out of every later version, so a reworded restatement stays out too.

Weak: that value block stops at the board and the card. A forgotten page is blocked by an exact digest for 30 days, and nothing blocks a graph node rebuilt from a new capture of the same fact. Node status is the organizer model's word and filters the agenda, not search. The agent's own shell skill can forget and edit records.

Two marks are present. Five are withheld, each for a stated reason (section 9).

Licence. Apache-2.0 in LICENSE, identical to LICENSES/Apache-2.0.txt, with REUSE annotations naming the memory sources and the root and agent-app manifests agreeing. NOTICE records that the project was public under MIT on 10 October 2026, then private under internal terms, and keeps both texts under docs/license-history/. The ONNX Runtime package and the embedding model are downloaded at build time and pinned by SHA-256 in system/memory/vector-dependencies.json, both MIT.

2. Mental Model

A record is evidence, never a belief. It holds what one screen or notification showed, labelled untrusted reference data wherever it reaches a prompt (system/assistant/broker/org/agentos/lab/MemoryBridge.java:39, PhoneNativeTools.java:132-133). The things the assistant treats as knowledge are derived from records by the organizer: graph nodes, the board and the user card. Each derived thing points back at the records it came from or was written after them, and that link is what deletion follows.

  • Record. Captured once, deduplicated by a digest of source and text (system/memory/src/org/agentos/memory/MemoryStore.java:187-215). A user edit makes a new revision and keeps five old ones (:457-468).
  • Graph node. Written by the organizer as a new version per change, never overwritten; a version carries evidence, the records it cites, and a status of active, done, cancelled or superseded (:282-317).
  • Board and card. One new version per nightly run, filtered by the privacy rules and by the user's deletions before it is saved (:318-330).

Forgetting a record walks those links in one transaction. Node versions citing it are deleted, and the other records those versions cited go on a redo list so the next run rebuilds the nodes without it (:482-496). Board and card versions at or after the record's first sighting are deleted, the organizer's cursors rewind to what the surviving versions had read, and derivedGen is bumped so a run in flight cannot save (:389-407). The page's digest goes into forgotten for 30 days (:500-503).

Diagram — a forget walks from the record to everything derived from it; a deleted board or card entry is kept as a value that filters every later version, while graph nodes and new captures of the same fact have no such filter
Diagram source
%% caption: a forget walks from the record to everything derived from it; a deleted board or card entry is kept as a value that filters every later version, while graph nodes and new captures of the same fact have no such filter
flowchart TD
    CAP["Screen or notification<br/>from a selected app"] --> F1{"digest in<br/>forgotten?"}
    F1 -- "yes, within 30 days" --> DROP["not stored"]
    F1 -- "no" --> REC["Record<br/>new lines only"]
    REC --> ORG["Nightly organizer<br/>user's model account"]
    ORG --> NODE["Graph node versions<br/>cite records"]
    ORG --> BC["Board and card<br/>versions"]
    SUP["Deleted entries<br/>by value, 60 per kind"] --> BC
    BC --> AST["Assistant turn:<br/>board + card + tools"]
    NODE --> AST
    REC --> AST
    DEL["User forgets<br/>a record"] --> X1["drop citing node<br/>versions, redo the rest"]
    DEL --> X2["drop board and card<br/>versions since it was seen"]
    DEL --> X3["bump derivedGen:<br/>run in flight discarded"]
    DEL --> F1
    DE2["User deletes a<br/>board or card entry"] --> SUP

3. Architecture

The memory is a standalone APK with no INTERNET permission (system/memory/AndroidManifest.xml). It captures through an accessibility service and a notification listener, keeps everything in memories.db, and computes vectors on the phone with ONNX Runtime and a quantized bge-small-zh-v1.5 (system/memory/src/org/agentos/memory/Embedder.java, Recall.java:37-65). When the native libraries are missing, recall falls back to keywords.

Two model paths leave the app, both through other system components. Per-record classification goes to an on-device model through the assistant's shared AI client. Nightly organizing writes a job row, asks the assistant's TaskBroker to run it, and polls for the result for up to eight minutes (MemoryStore.java:413-429); the broker runs the organizer prompts on the user's own model account with the agent's usual context stripped (system/assistant/broker/org/agentos/lab/MemoryGen.java:1-20, :146-180).

Two providers expose the store. org.agentos.memory requires a signature permission, and its organizer, batch and task methods require root, which is how the broker reaches them (MemoryProvider.java:14-80). org.agentos.memory.open-access is exported: root, system, the ADB shell and platform-signed callers pass straight through, and any other app is checked against the assistant's App Permission Center for memory.read or memory.write (MemoryOpenAccessProvider.java:24-74).

Deployment and ergonomics

The module is built with the repository's Soong configuration into a ROM or an emulator image; build.sh downloads and verifies the vector model on the first build. The 0.5 acceptance record is emulator-only and states that the ONNX Runtime and model declarations had not been built in an AOSP tree. Nothing here runs off an Android device. A user turns on capture, picks apps, enables the accessibility service, and separately turns on analysis, agent access and proactive reminders; each has its own switch, and reads by agents stop when queryEnabled is off (MemoryStore.java:95-96).

4. Essential Implementation Paths

  • Capture. ObservationService and NotificationTap → MemoryStore.ingest: refuse unselected and never-observed apps, check forgotten and the digest, diff against the last 60 pages of the same title with Delta, store new lines, queue analysis and a vector (MemoryStore.java:143-148, :187-215, system/memory/src/org/agentos/memory/Delta.java).
  • Classify. claimBatch → broker → completeBatch: five records, a category, an importance and a next step with a confidence; an offer at 0.75 or more (MemoryStore.java:518-525, :555-582).
  • Organize. Organizer.start → graph, board, profile, each through generate and then applyGraph or commitDerived (system/memory/src/org/agentos/memory/Organizer.java:20-131, MemoryStore.java:282-317, :403-407).
  • Search. MemoryStore.search → Recall.search (MemoryStore.java:251-255, Recall.java:128-162).
  • Inject. HarnessContext.memoryBoard, memoryProfile and memoryRevoked (system/assistant/broker/org/agentos/lab/HarnessContext.java:120-150).
  • Forget. forget → remove(id, true) → purgeNodes, invalidateDerived (MemoryStore.java:474, :482-517, :389-397).
  • Correct. update → revision row, new lines, purgeNodes with the record queued for redo, invalidateDerived (:457-468).
  • Delete a derived entry. deleteBoardItem, deleteProfileItem → suppress (:361-382).

5. Memory Data Model

  • memories: id, source package, page, title, head and fresh (first line and the new lines), lines (keys into the line store), digest (SHA-256 of source and text, unique), first_seen, last_seen, revision, and the analysis outcome: category, score, decision, confidence, task id and state (MemoryStore.java:53-58, :68-83).
  • line_store and line_pairs: each distinct line once, and the line pairs seen under a page key.
  • revisions: up to five prior title and body pairs per record.
  • forgotten: a page digest and the time its block ends.
  • vectors: one 512-float vector per record.
  • nodes: node id, version, record time t, the JSON body (type, title, summary, when, due, stake, amount, status, people, related nodes, evidence refs), and a vector.
  • boards, profiles2: one JSON version per time.
  • kv: cursors, derivedGen, nextNid, the redo list and the two suppression lists.
  • nudges: reminders said, kept 30 days.

Times are record times. A node's when and due are the dates of the thing it describes, as text the model wrote, and a node version's t is when the organizer wrote it. Node ids are never reused: the next id is reserved before any node is deleted (MemoryStore.java:480-483).

6. Retrieval Mechanics

Recall.search builds four ranked lists: a keyword scan of record title, first line and new lines, newest first; the top 30 records by vector; graph nodes whose text holds every query word; and the top nodes by vector. It fuses them as one over 60 plus rank and adds half a seed's score to each neighbour of the five best nodes, along related in both directions (Recall.java:128-162, :195-206). The vector work runs on its own thread beside the keyword scan, and the last 64 query vectors are cached. Up to 20 results return to an agent.

Every list is cut at the current time, so a debug build's simulated clock replays a timeline, and the node list takes each node's latest version at or before it (Recall.java:107-110). Search does not read status: a node the organizer marked cancelled or superseded is ranked like an active one and returned with its status in the item (MemoryStore.java:270-272). The agenda, the due-soon list and the reminder paths take active nodes only (Recall.java:225-231, :340, :377, :448).

The board and the user card do not wait for a search. HarnessContext adds the board and a per-message card to every turn when the user allows it. The card holds the user's habits, core family, people the message names, people with dates in the next three days, the next two days' plans from active nodes, tasks first seen in the last day, and up to three of today's quotes not yet organized (Recall.java:273-328).

The module's acceptance records are committed beside it. The 0.16 record times each stage on a cloud machine, compares the old and new ranking entry by entry on 16 queries at 1k, 10k and 50k memories, and says it was not measured on a device (docs/reviews/taku-memory-0.16.0-2026-11-20/README.md). Earlier ones grade cards and bedtime briefs against a 22-day synthetic timeline.

7. Write Mechanics

Capture blocks no one: the accessibility event is debounced 900 ms and the write is one transaction. A record is searchable by keyword at once and by vector when the embed worker finishes. Classification follows within about 20 seconds, at most one batch every 15 seconds and 60 an hour. Graph, board and card change only at the nightly run, or right after a deletion or correction.

Only new lines are stored. A page is compared with the last 60 pages of the same source and title, and lines held, or line pairs seen before, are referenced rather than repeated (MemoryStore.java:194-207). A page with nothing new stores nothing.

The organizer writes what the assistant will believe, and it is a model. The graph prompt asks it to output a complete new version of a changed node under the same id and to set status (MemoryGen.java:146-160). applyGraph keeps only the seven node types and four statuses, drops evidence refs outside the batch, maps new ids, and appends; it does not check the content against the records (MemoryStore.java:282-317). Board and card runs commit only when derivedGen is unchanged.

A correction is a delete of what was derived. update keeps the old text as a revision, drops every node version that cited the record, puts the record on the redo list, and drops board and card versions since it was first seen (MemoryStore.java:457-468).

Operational cost

Capture and recall cost no model call. Classification is an on-device model call per batch of five. Organizing is a graph, a board and a card call per batch of new content on the user's account; the 0.5 acceptance record puts nightly organizing at about 90,000 to 100,000 tokens per user per night. A deletion schedules a rebuild of the board and card from the surviving records.

8. Agent Integration

The assistant holds memory_search and memory_get, described as user- authorized evidence and untrusted data (PhoneNativeTools.java:132-133), and receives the board and the card in each turn's context. After a deletion or correction, a conversation in progress is told once, on its next turn, that boards, cards, records and quotes it was given before may be invalid and must not be repeated; the field stays set for 30 days (HarnessContext.java:117-127).

Accepting a suggestion or a reminder in the memory UI hands a read-only task to the agent, which is told to verify the record with memory_get first (MemoryBridge.java:85-130).

The assistant also ships a taku-open-access skill for its shell. It reaches the open-access provider by content call and lists update and forget among the memory commands (system/assistant/assets/skills/taku-open-access/SKILL.md:213-214); the provider passes the ADB shell UID straight through (MemoryOpenAccessProvider.java:28-32, docs/agent-open-access.md:25-30). The same calls are the management API for the system's own apps.

9. Reliability, Safety, and Trust

What a deletion reaches

The forget path is the most complete in the module. A committed case forgets a record and requires board and card versions after it dropped, the organizer rewound, a rebuild due at once and finished organizer jobs discarded; another requires node text written from a deleted record to be gone even where another record also supported the node, that record queued for redo, and node ids not reused (system/memory/tests/fixture/StoreTests.java:29-35, :49-66). What stays outside it is a new capture of the same fact.

The value block and where it stops

Deleting a board item, a habit, a person or a person's note appends the value to a list in kv (MemoryStore.java:361-382). Privacy.same compares entries after removing dates, filler words and punctuation, and treats containment or a bigram Jaccard of 0.5 as the same entry (Privacy.java:86-100). Every board and card version passes through the list before it is saved and before it is shown, and the organizer is told the list under Deleted by the user; do not restore (Organizer.java:132-139). The list keeps 60 entries per kind and survives a clear and rebuild.

Graph nodes have no such list. A forgotten record's nodes are deleted, and its page is refused for 30 days by sha256(source + text) (MemoryStore.java:192, :502). The same fact in a new message, or the same page with one line changed, is a new record, and the next organize run can write the node again.

Who can change memory

The user, through the memory app. The agent, through the shell skill, and any platform-signed component, with no review step: forget, update, deleteBoardItem and deleteProfileItem apply at once. A third-party app needs a memory.write grant from the App Permission Center, whose default is deny.

Signals that mislead

Status is the model's word. superseded and cancelled come from the organizer's JSON and filter only the agenda and reminders. A node the organizer retired is a search hit all the same.

The privacy rules are patterns. Privacy drops another person's conditions, relationships, money and plans to quit, the user's own diagnoses, medication and income, and instruction-like text, by Chinese and English regular expressions, before saving and before showing (Privacy.java). The committed cases cover named phrasings (StoreTests.java:79-95).

Marks

  • tombstone — present. A deleted board or card entry is kept as its value and checked on every later write and read of those layers, reworded matches included. Not graph nodes; at most 60 per kind.
  • negative_eval — present. Committed cases require a removed person, a removed board item, another person's medical events and past items to be absent from the card and board the assistant receives, beside kept entries. Instrumented, and in no CI workflow.
  • trust_state — withheld. Node status is a lifecycle the organizer writes, and search does not filter on it; records carry no status.
  • bitemporal — withheld. Node versions carry the time they were written; when and due are the dates of the thing described, as text.
  • scope_enforced — withheld. One store per device, private to the app's UID, with no scope key on a record. The boundary is physical.
  • audit_log — withheld. Record revisions keep five versions and are deleted with the record; node versions citing a forgotten record are deleted. Nothing records who changed what.
  • human_review — withheld. The user edits and deletes after the fact, and the agent's shell skill holds the same verbs.

10. Tests, Evals, and Benchmarks

The memory tests are instrumented fixtures: build-tests.sh builds a test APK that runs against the store on a device or emulator. StoreTests covers deletion and correction reaching nodes, board and card; the value block; privacy rules in both languages; the agenda; change detection; reminder triggers; capture rules (source allowlist, never-observed apps, stale generation, digest dedup, the forgotten block); retention; and the search cap. QueueTests, OpenAccessQueryTests and others cover the analysis queue and the providers. A host test checks the native-library packaging and the keyword fallback.

CI runs the repository's Node checks, Python patch tests and the agent app's build checks (.github/workflows/ci.yml); no step builds or runs the memory tests. The evidence of runs is the committed instrumentation output in each acceptance record, for example docs/reviews/taku-memory-0.12.0-2026-11-05/store-tests.txt, and the acceptance READMEs with their device scripts, replay grades and ablations.

Cases to want first: a forgotten fact re-captured from a new message, asserted absent from the graph after the next run; a superseded node asserted below or out of memory_search; and the forgotten-record search case with a record that remains beside it.

No paper was found.

11. For Your Own Build

Steal

  • Make deletion follow derivation. Store which records each derived item cites, drop every version that cites a deleted record, and send its other sources back through the builder.
  • Fence background runs with a generation number. A delete bumps it, and a run that read the old generation throws instead of saving.
  • Tell the agent what it must stop repeating. A dated note in context that memory it was given may be void costs a sentence and covers what left the store.
  • Block a deleted value by wording, not by row. A model that rewrites the card nightly will reword what the user removed; compare after stripping dates and filler.
  • Store only new lines. Screens repeat; a line store keyed on content keeps capture cheap without losing a page.

Avoid

  • Do not stop the value block at the layers the user can see. The graph the card is built from can carry the same fact back.
  • Do not let a lifecycle field written by the model decide only some reads. Either search filters superseded, or the status is advisory everywhere.
  • Do not give the agent's shell the user's delete verbs without recording which of them acted.
  • Do not keep the evidence of a passing suite only in committed logs. A memory module this careful about deletion should fail a build when deletion regresses.

Fit

Fits a phone-first assistant that should know what the user saw and agreed to without being told, where the person is the only user and the device is the boundary, and where a nightly model pass on the user's own account is acceptable. The deletion machinery is the part worth copying into any design.

Walk away if memory must be shared across people or devices, if capture of other apps' screens is unacceptable, if the store must be correctable by someone who can show who changed it, or if you need the system off Android: the memory is an APK that depends on the assistant, broker and on-device model of the same OS.

12. Open Questions

  • Whether graph nodes are meant to honour the board and card suppression list.
  • Whether memory_search is meant to return cancelled and superseded nodes.
  • Whether the shell skill's forget and update are meant for the agent or only for developers at the ADB shell.
  • How the module behaves on a physical phone over weeks; the acceptance records are emulator and cloud-machine runs.

Appendix: File Index

  • Store, capture, deletion, suppression: system/memory/src/org/agentos/memory/MemoryStore.java
  • Recall, agenda, card selection: system/memory/src/org/agentos/memory/Recall.java
  • Privacy rules and value matching: system/memory/src/org/agentos/memory/Privacy.java
  • Nightly organizer: system/memory/src/org/agentos/memory/Organizer.java, system/memory/src/org/agentos/memory/MemoryMaintenance.java
  • Line diff: system/memory/src/org/agentos/memory/Delta.java
  • Providers: system/memory/src/org/agentos/memory/MemoryProvider.java, system/memory/src/org/agentos/memory/MemoryOpenAccessProvider.java
  • Capture: system/memory/src/org/agentos/memory/ObservationService.java, system/memory/src/org/agentos/memory/NotificationTap.java
  • Broker side: system/assistant/broker/org/agentos/lab/MemoryGen.java, system/assistant/broker/org/agentos/lab/MemoryBridge.java, system/assistant/broker/org/agentos/lab/HarnessContext.java, system/assistant/broker/org/agentos/lab/PhoneNativeTools.java
  • Shell skill: system/assistant/assets/skills/taku-open-access/SKILL.md
  • Tests: system/memory/tests/fixture/StoreTests.java, system/memory/tests/fixture/QueueTests.java, system/memory/tests/fixture/OpenAccessQueryTests.java, system/memory/tests/host/
  • Acceptance records: docs/reviews/taku-memory-*
  • Notes: system/memory/README.en.md

Recorded searches

Run from the repository root at the pinned commit with /usr/bin/git grep.

  • Graph nodes are not passed through the suppression list. git grep -n -E 'suppress(Board|Profile)?\(' -- system/memory/src returns the two suppress* filters in Privacy.java, suppressed and suppress in MemoryStore.java with their callers in boardView, saveBoard, saveProfile, profile, agentProfileAt and the two delete methods, and Organizer.suppressed; applyGraph is not among them.
  • Search reads no node status. git grep -n -F 'status' -- system/memory/src/org/agentos/memory/Recall.java returns the render at :101 and the agenda, due-soon, change and newly-added paths at :225, :231, :340, :377, :394-395 and :448; none is in search (:128-162).
  • CI runs no memory test. git grep -n -i -E 'memory|build-tests|instrument' -- .github/workflows returns nothing; the control git grep -c -F 'run:' -- .github/workflows/ci.yml counts its steps.
  • The open-access provider lets the shell UID through. git grep -n -F 'SHELL_UID' -- system/memory/src returns MemoryOpenAccessProvider.java:29.
  • No paper. CITATION.cff is absent; git grep -n -i -E 'arxiv|doi\.org|bibtex|@article|@misc' -- . ':!*.json' returns nothing.

History

2026-12-03 — 1b2fdbf0…. First reading, read at the user's request, from a shallow clone at the head of main. Screened: no auto-run surface; nine dependency surfaces dated inside the cooldown, which a shallow clone reports for every file; one postinstall in system/agent-app/package.json; one manifest with 21 floating ranges beside a lockfile; AGENTS.md read as data. Nothing was installed, built or run, and no test was run. Two marks (section 9).