# Data: workspace, memory, files, data pool and knowledge

Where tables, memory, files, data pools and knowledge live, who sees and deletes them, and which store fits which data.

A Soot works with four kinds of durable information: structured tables, what it has learned (memory), files, and the workspace's shared documents. This document explains where each kind lives, who can see it, who can delete it, and why they are kept apart. If everything goes into one place (the prompt, or a single shared "memory"), nobody knows whose data is whose, access cannot be revoked, and one wrong answer repeats in every Soot until someone fixes each copy.

## Overall model

Two storage tiers, plus a lookup layer on top.

```text
              Level (who can reach it without a grant)
         ┌───────────────────────────────────────────────┐
workspace│ tables · memory · files · task   Lead + operator write; internal Soots read
team:<id>│ tables · memory · files · task   team members and Lead, full access
soot:<id>│ tables · memory · files · task   that Soot itself and Lead, full access
pack:<id>│ a Pack's own tables              that Pack only, via a one-time token
         └───────────────────────────────────────────────┘
optional:  data pool (PostgreSQL, Pack data-pool) ── shared workspace documents across machines
              └─ pool "projects" ◀── runtime syncs from /llms.txt ◀── Knowledge
```

- The workspace is built into the runtime, nothing to install. Only runs of the operator tenant have the workspace tools; public runs, live chat, the widget and the SDK do not.
- The data pool is an optional Pack backed by a separate service. Use it when many Soots on many machines must read the same copy.
- A level is a data scope. A run inside a team works at the team's level. Lead's chat works at `workspace` and at its own Soot level; Lead belongs to no team, and it enters a team level on the user's behalf.

## Access

Anything beyond the defaults in the table above is a grant in `deployment.json`, under `access`: `{subject, scope, kinds, level}`. `subject` is `soot:<id>` or `team:<id>`, `kinds` is any of `data`, `memory`, `files`, and `level` is `read` or `write`. Grants change through the `access.grant` and `access.revoke` actions, with a revision and a receipt like every other action. A Pack's access to credentials or host environment variables is a separate matter (`grants.packs`, `soot grant`).

A grant usually comes about like this. A tool refuses the Soot, and the Soot calls `report_blocker` to ask for access; Nest shows a **Cấp quyền** ("Grant access") button; or Lead grants it itself through `nest-lead_manage`. Lead's policy: a read grant for an internal Soot or a team is Lead's call. A write grant, or any grant for a Soot that website visitors talk to, waits for the user in **Cần bạn** ("Needs you").

Discovering scope: `GET /v1/workspace` tells you which levels the host has, what each level contains and the current `access` entries. The `data` tool (op `tables`) and the `storage` tool (op `levels`) let a Soot see for itself what it can reach.

## Tables, files, tasks

Tables are typed and live in one SQL store per host: embedded SQLite at `<data_dir>/workspace.db` by default, or PostgreSQL for the whole host through `data_store`. The model does not write SQL. The `data` tool has named ops (`create_table`, `insert`, `query`, `search`, `update`...) and the runtime compiles them to parameterized SQL. `search` is fuzzy, ignores Vietnamese diacritics, and runs on a trigram index. The "project pool" store that connected to a project database has been removed; `soot migrate pools-to-workspace` copies its tables into the workspace.

A table that holds a visitor's rows marks one text column `principal: true` (a flag in the `data` tool's schema, which survives `alter_table`). Erasing a principal erases those rows too, through the same eraser as Pack tables. When a chat has a verified principal, `insert` fills `"<tenant>:<sub>"` into this column by itself; the `data` tool exists only for the operator tenant, so in practice that is a paired channel chat. A principal column cannot be dropped while the table still has rows, because a row that loses the column can no longer be found for erasure. A table with a text column that holds email addresses or phone numbers (the runtime samples a few rows and never reads the column names, so a name in any language reads the same) but no principal column becomes a `table_principal` item in **Cần bạn**: add a visitor column, or answer "holds no visitor data" (`POST /v1/workspace/tables/{name}/principal?scope=`).

Files are one directory per level under `<data_dir>/storage/`, opened with `os.Root` so no path can escape. Users add any file from Nest, including from the message box: a document dragged into a chat is saved in `Tệp từ chat/` ("Files from chat") of the level being chatted in, and the message carries the path in its structured `files` field (`POST /v1/conversations/{id}/messages`, `[{"scope","path"}]`, at most 8), never in the person's words. An older Nest still writes a "Tệp đính kèm…" pointer line into the message; the runtime reads that line only when a message has no `files`, a compatibility alias removed once Nest sends the field. Before the run starts the runtime copies those files into the conversation's scratch under `attachments/` (only in the owner's own conversations). A model never edits storage in place: the `storage` tool (it replaced `files`, with no alias) copies between storage and the scratch, where `read`, `write` and `bash` work. `pull {scope, path, to?, force?}` copies a file or a folder (up to 500 files, 100 MiB) into the scratch, by default to `storage/<level>/<path>`, and records its hash in `.soot/pulled.json`; it respects the scratch quota and never replaces a copy the model changed (`local_changes`) unless `force`. Pulling one text file of up to 64 KiB answers with its content as `read` shows it (numbered lines, `content_hash`) and tells the file tools the model has seen the whole file, so `edit` or `write` changes it without a `read` first. `push {from, scope?, path?, base?}` is the one write path: the host reads the scratch file through `os.Root` (a symlink out of the scratch is refused), checks the `files:write` grant (`scope_forbidden`), the `ui/` and `tools/` folder rules (`folder_reserved`) and the level limits (25 MiB per object, 2 GiB and 20000 files per level), writes atomically, updates the search index and keeps the last 5 replaced contents under a hidden `.versions/` folder of the level. A push of identical content changes nothing, so a retry is safe; a stored file that changed since `base` (the hash given, which may also be the `content_hash` `read` gave for the copy, `"new"`, or the one recorded by `pull`) answers `stale_revision` with `base_hash` and `current_hash` and writes nothing; with no `base` and no pull, a push only creates: a stored file the Soot never pulled answers `not_pulled` with its `current_hash` (as `write` refuses a file never read), and passing that hash as `base` replaces it on purpose; a read-only run (eval, dry run) gets a preview. `status` says, for each pulled file, `unchanged`, `modified_locally`, `changed_in_storage`, `both`, `missing_locally`, `missing_in_storage` or `no_access`. Errors are `{code, message, recovery}`. There is no delete, move or mkdir for models; people do that in Nest. A Soot is offered `storage` only when it selects `read`, and a `files` grant straight to a Soot without it is refused (`storage_needs_read`). Each level has a trigram index in the `soot_files` table over the name, the path and up to 64 KiB of extracted text; every write, move and delete updates it, and an older level is indexed the first time someone searches. The `search` op of `storage` and `GET /v1/workspace/files/search?scope=&q=` search fuzzily, ignoring diacritics, by name and by content. Artifacts are a different thing: the `artifacts` Pack keeps a content-addressed store (references like `art_<hash>`) for Pack output that needs hashing, is immutable and is sent elsewhere; the model never touches the real path.

Tasks live in the same SQL store: assignee (Soot, team or person), status and an append-only log. Assigning a task does not start it. **Start** sends exactly one run into the task's own conversation through the same admission gate as schedules, with no queue and no retry; only the Soot or the user changes the status. The first time a run of a task completes, the runtime saves the final answer to `Task results/<task name>/<YYYY-MM-DD HH.mm>.md` in the Files of the task's level (team, then Soot, then workspace) and writes a `result_saved{run,scope,path}` event to the log; Nest shows a link that opens that file. Tasks tied to a goal, and recurring tasks, are covered in [workspace.md](https://trysoot.com/docs/workspace/index.md).

## Sessions by source

Every conversation records a `source` of `{kind, ref, label}`; `kind` is `nest`, `schedule`, `widget`, `sdk`, `channel`, `task` or `event`. The operator can see every session through `GET /v1/sessions?source=` (read-only: widget and SDK sessions are viewed in Nest, not answered there). The source also decides notifications: work the user started themselves notifies when it finishes; schedules, the website, the SDK and chat channels notify only when the user is needed.

Next to a session, `GET /v1/sessions/{id}/memory` returns what the Soot keeps: `{conversation: {entries, total}, principal: null | {entries, total}}`. This is visitor data, so only a person can read it (`PersonOnly`, a scoped key gets 403); if the memory store fails it returns 503 `memory_unavailable`, and Nest writes "Chưa đọc được" ("Cannot read yet"), never treating it as empty. `principal` is `null` when the visitor is not verified.

## Memory

Memory is what a Soot has learned and distilled, kept separate from conversation history. The tools (`learn`, `memory_recall`, `memory_edit`) and the consolidation worker come from AgentCore in `2ai` ([runtime.md](https://trysoot.com/docs/runtime/index.md)); Soot supplies the scoped Go/Bolt store (`internal/core/agentstate`) and the host's identity rules. No embedding service and no periodic sweeper is needed.

Ownership rule: the host derives every target from the authenticated identity; the model picks an alias and never sets tenant, user or scope itself. Read access does not imply the right to edit, delete or publish.

| Target | Who sees it | Who writes it |
| --- | --- | --- |
| `conversation` | The current conversation | The current run |
| `user` | One authenticated person, shared across all conversations and Soots | An authenticated run, not an internal note |
| `soot` | What that Soot has learned, across all users | The Soot itself |
| `team` | Team members (with `team.brief` from the template) | Team members |
| `workspace` | The whole tenant internally; not in live chat or the public web | The operator, or a `memory` write grant |
| `workspace_public` | Visitors too (live chat, public web) | Only with an explicit publish permission; visitors cannot publish |

Three consequences:

- Public transports have only conversation memory and do not read user profiles. Multi-group context has only `current`, so evidence from different groups is never mixed in an export.
- A public fact must be written on purpose; the model does not turn internal memory into public memory by itself.
- Only the operator tenant writes directly to a shared bank. Other tenants (SDK, member key) have many people behind them, so what they store is a proposal: only the author sees it until the operator approves it in **Dữ liệu, Trí nhớ, Chờ duyệt** (Data, Memory, Pending review). Only a person can approve (`PersonOnly`); Lead and Soots cannot approve on their own.

Each entry has a kind: `fact`, `preference`, `procedure` and `learning` live until edited or deleted; `context` lives 24 hours; `episode` and `outcome` live 90 days. A stable `key` (`staging.endpoint`) allows reliable conflict detection; semantic contradictions without a key still depend on the model. The source is assigned by the host from the conversation and run: it proves where the evidence came from, not that it is true.

Consolidation: a successful root run puts credential-redacted evidence into a queue; a worker consolidates at most four short changes into the run's own writable bank, in one transaction that checks a snapshot. Failed runs, child runs and the public web do not create consolidation, and a read-only shared bank is not consolidated automatically. There is no path that promotes conversation memory to a shared bank on its own. The queue is durable on disk, and a restart does not rerun the main work. Eval runs do not create consolidation; old eval memory is cleaned with `soot conversations prune-memory --origin eval [--before] [--dry-run]` (`POST /v1/conversations/prune-memory`), safe to call again.

For visitor chats (live chat or a session with internal notes, not an eval), the host routes each entry at commit time; the model cannot choose this path:

- A verified visitor's `preference` and `fact` go into that principal's `user` bank, so the visitor is remembered next time; an anonymous visitor's stay in the conversation bank.
- A `procedure` becomes a proposal in the Soot's **visitor lessons** lane (`VisitorLessons`, kept in the same bank as the operator's), with author `consolidation`. Emails, phone numbers and URLs with tokens are masked before writing. Duplicate lessons (same `key`, same fingerprint, or ≥0.6 word overlap) merge and count the conversations they were seen in. Seen in ≥2 conversations within 14 days, a lesson becomes `needs_attention` and a `memory_lesson` item in **Cần bạn**. Visitors do not see a pending proposal; after the operator approves it, every visitor chat of that Soot can read it (read-only).

`GET /v1/workspace/memory-proposals` also returns `seen_conversations`, `needs_attention` and `bank_tenant` (approve and reject send `tenant` with this value), and can be filtered with `?recurring=true`.

Each entry counts `recalled_count` and `last_recalled`: only when the entry is actually put into a run's context, not counting a `memory_recall` search; written once per run. `GET /v1/workspace/health?scope=` gathers one level: the number of entries, entries used in the last 30 days, entries never used, entries unused for 90 days, pending and recurring proposals, the number and size of files, the number of tables and tables missing a visitor column. A part that cannot be read is `null` and is named in `unavailable`, never 0. Nest shows it in the **Sức khỏe** ("Health") tab.

### Who can delete

| To delete | How |
| --- | --- |
| One entry | `memory_edit erase` (when the user asks) or Nest, the Trí nhớ (Memory) tab |
| One person | `DELETE /v1/principals/{tenant}/{sub}` |
| By age | The tenant's `retention.days` |

Erasing one entry deletes the row, the index, the revisions and the pending evidence in that scope (so a running consolidation cannot restore it), then marks it to block relearning. It does not delete conversation records, backups or other phrasings of the same fact; an explicit `learn` afterwards can still keep it.

A principal is an end user with a stable `(tenant, sub)`, from an asserted or paired channel sender (principal-token). Their `user` bank is one bank per `(tenant, sub)`, shared across all of the tenant's conversations, bindings and Soots; an anonymous visitor has only the conversation bank. Erasing a principal runs every registered eraser (`principal.RegisterEraser`): conversations (messages, runs, conversation memory, tool working directories), question samples in knowledge gaps, the `user` bank, traces, Pack tables with a `principal` column, and page receipts. Running runs are stopped first; effects with an unknown outcome must be handled in Nest before erasure continues. The list of things to erase is stored beforehand, so calling again after a mid-way failure still covers everything. Retention runs through the same path every day for principals who have been silent longer than `retention.days`; anonymous visitors have no principal and are not swept.

## Data pool

When many Soots on many machines need the same document store (handbooks, support policy, brand documents), that data lives in a data pool: the `data-pool` Pack from Soot Forge (`../soot-forge/packs/data-pool`), running on PostgreSQL 16+ with `pg_trgm`, entirely optional.

```text
Soot (laptop)   Soot (VM)   Nest "Dữ liệu"
     └─ binding ─┴────────────┘  (Nest uses its own DATA_POOL_UI credential)
                ▼
       data-pool service ──▶ PostgreSQL
       owns pools, grants, documents, receipts, activity
```

Two things are easy to confuse. Installing the Pack does not grant access, create PostgreSQL or import data: the operator runs PostgreSQL and the service, then attaches a binding. Selecting the Pack only exposes the tools; access to each pool is still a grant in the service, checked before every operation.

Authoritative data lives in the service, so Nest, the CLI and agents see the same state. Documents have a stable ID, source, tags, hash and revision; pools can be nested, and permissions are independent of the tree. Search is fuzzy, ignores diacritics, and is based on a GIN index.

Read and write modes follow how the Pack is selected: `data-pool:read` for read tools (marketing, support), `data-pool` for read, write and manage (the data manager), and `data-pool-console` for Nest's operator UI. There are two ways to attach a binding. Shared: the deployment declares one `data_pool` block, every Soot except those in `except` gets the tools, and the service derives the operations from the Soot's role. Per Soot: a `DATA_POOL` credential for each Soot, and a per-Soot declaration wins. Any process that can read the binding file can act as any Soot in that machine's allowlist, so never include a public or untrusted Soot; a Soot that uses `public_web` must be in `except`. For configuration details see `soot schema deployment` and the Pack's README.

The service alone knows which identities are admitted, so the runtime calls `data-pool_pools {limit:1}` with the identity of each shared-binding Soot: at startup, on apply, then every 15 minutes. A Soot that is refused (`soot.unadmitted`) does not get the `data-pool_*` tools and has a `pool_unadmitted` item in **Cần bạn**; if the service cannot be reached, the current state is kept.

Nest's **Dữ liệu** ("Data") area (`desktop/src/modules/data/`) has a level tree and the tabs Bảng (Tables), Trí nhớ (Memory), Tệp (Files), Quyền (Access) and Sức khỏe (Health) for each level; the data pool's page is the Pack's own page, opened in a frame. Users create and delete pools, browse and search documents, add text or import a public URL, edit with a revision check (a conflict keeps the draft), and view effective permissions and bounded activity. A write returns a final receipt, and resending the same request ID replays it instead of writing twice. A source having been read does not prove that a later answer used it.

## Knowledge

A Soot answering questions about a project needs the project's facts: features, plans, prices, limits. Copy them into a skill or mission and they are right for one week; the price changes in the project, the copy does not, and every Soot holding the copy answers wrong. The principle: project facts flow from the project, not from the prompt.

```text
project pages            source                     workspace            Soot
/llms.txt + pages  ──▶  knowledge.sources  ─sync─▶  pool "projects"  ─▶  knowledge_search
(kept by the project    (which site, which pool,    (chunks with source  knowledge_read
 team)                   how often)                  + timestamp)         (cites the source)
```

The skill holds behavior (how to close a lead, when to hand over to a person); facts are looked up. The copy lives in the runtime's own workspace store (the `soot_knowledge` table, a trigram index), so knowledge does not need a data pool: each runtime mirrors from the public pages by itself. "Pool" here is only the name of a set of knowledge.

### Setup

This part is for a coding agent doing the setup for a user; in Nest, **Cài đặt, Kiến thức công khai** (Settings, Public knowledge) has a **Sao chép lời nhắn cho trợ lý** ("Copy prompt for assistant") button that points here.

1. The project publishes `/llms.txt` in the [llms.txt](https://llmstxt.org/) format: a title, a one-line summary, and links to Markdown pages, one page per topic. Prices come from the project's own catalog at build time or at serve time; a page with a hard-coded price has brought the copy back.
2. The source declares `knowledge` in `source.json`:

```json
"knowledge": {
  "pool": "projects", "refresh": "6h",
  "sources": [{"id": "2novel", "url": "https://2novel.app/llms.txt"}]
}
```

3. The host lists the pools allowed to hold knowledge in `deployment.json`: `"knowledge_pools": ["projects"]` (Nest has a switch; the action is named `knowledge.pool`). A source that names a pool not on the list copies nothing and reports it in its status, without failing the deploy: deploying a repo does not overwrite another source's knowledge set.
4. A support Soot adds `"knowledge:pools=projects"` (or `"knowledge"` for every pool) to `packs` in `soot.json`.

With this version, the first sweep downloads every source into the workspace again. The old copy in the data pool is no longer read; the operator deletes it. Visitor feedback notes (`feedback.pool`) still write to the `data-pool` Pack and must not share a pool with knowledge.

### The runtime keeps the copy

Every few minutes the runtime syncs the sources that are due: it fetches the URL (`https` only, public addresses), follows the index one level deep, splits each page at `##` headings into chunks that stand on their own, and writes each chunk as a document whose `source` is the page URL. If a fetch fails, the old copy stays: dated old facts are better than none. Status is visible through `GET /v1/settings/knowledge`. Nest puts into **Cần bạn** only what a retry cannot fix (consecutive failures, never synced, pool not listed, the store refusing writes).

### Soot lookup

A Soot that declares `knowledge` gets three tools pinned to those pools: `knowledge_search` (up to 8 results with source and date), `knowledge_read` (the full chunk) and `knowledge_gap` (records that a fact is missing). The tools carry rules for every Soot, so missions do not repeat them: project facts come from `knowledge_search`, answers cite the page, earlier answers and the model's own memory are not sources, and a fact the pool lacks is stated as not known.

Public Soots can use knowledge. The two lookup tools read only the pools the host has listed, which hold only what the project has published, so a visitor who tricks the Soot into searching still reads only public pages. The public safety profile still rejects an attached data pool and every other tool. For that reason, do not put private data in a knowledge pool.

### Knowledge gaps

A visitor asks about something the pages do not cover, and the Soot honestly answers that it cannot confirm it. If it stops there, the next visitor hits the same hole and nobody knows it exists. So the runtime records it itself, instead of leaving it to each mission.

When `knowledge_search` cannot confirm a fact, the Soot calls `knowledge_gap` with the missing fact (project name first) and the visitor's question. A hard question can hit the turn limit, and then the final answer has no tools, so the Soot ends with a line `KNOWLEDGE_GAP: <fact>` that the runtime strips from the answer and records as if the tool had been called. Gaps with similar keywords are merged (leaning toward merging, since splitting wrongly is what loses the pattern). The stored question is truncated and has emails and phone numbers masked; the conversation is kept only as a hash, to tell two visitors from one visitor asking twice; each chat and each hour has a cap so a visitor cannot flood the list.

One visitor asking is a one-off and is only listed. When a gap is still open and asked in at least 2 different conversations within 14 days, it becomes `needs_attention` and appears in **Cần bạn**. This threshold counts only real askers: scheduled runs do not count, and a question from the feedback desk counts for the original conversation. After adding the page, the user clicks **Đã bổ sung** ("Added"), and the runtime immediately syncs the sources of that pool. A gap that is asked again reopens by itself and goes back to Cần bạn: the fix did not work, or the page has not been synced. Search is keyword-based, so **Soot tìm thấy gì?** ("What does Soot find?") in Nest runs exactly `knowledge_search`, to check whether the new page is found by the visitor's own words.

## Pack storage

A Pack declares its own tables in `pack.json` under `storage`; the runtime provisions the tables, restricts all access to that Pack with a one-time token bound to `(pack, soot, workspace)`, and allows only additive migrations. When the last Soot deselects the Pack, the data is hidden for 30 days and then deleted. The operator reads a Pack's tables read-only in Nest (Dữ liệu, Bảng, "Gói: <name>", that is Data, Tables, "Pack: <name>"). A column with `principal: true` puts the row into erasure by principal. Contract: contracts/pack-storage.md.

How it differs from the data pool: a Pack's tables are readable only by that Pack and live and die with it. The data pool is a shared workspace service that many Soots on many machines read under grants.

## Where should data go?

| Data | Put it in | Why |
| --- | --- | --- |
| What to remember about a person (preferences, context) | Memory `user` or `conversation` | Bound to an identity; erasable by principal |
| How to treat visitors that a Soot learns from many chats | Visitor lessons (proposals, the operator approves) | Contacts masked, duplicates merged, used only after approval |
| Lessons and procedures a Soot picks up over many runs | Memory `soot` | Its own bank, through consolidation |
| What the whole team needs to remember | Memory `team` | Team members read it together |
| Workspace-wide internal facts / facts told to visitors | Memory `workspace` / `workspace_public` | Publishing is a deliberate action |
| Visitors, consented contact details, opportunities by project, work by visitor | The Soot Forge `crm` Pack, chosen at one home runtime; other runtimes read `pipeline` and write `crm_inbox` through the team contract | Exact identity matching, consent checked by the tool, every table has a `principal` column so erasure by person works |
| Other structured rows: orders, follow-ups | `data` tables at the right level | Typed, queryable, fuzzy search; a visitor's rows have a `principal` column |
| Documents and text drafts that people and Soots both read; task results | Files at the right level | Per level, searchable by name and content, no service needed |
| Pack output that needs hashing and sending elsewhere | Artifact | Content-addressed |
| Handbooks and policies shared by many Soots on many machines | Data pool | One source, per-pool grants, revisions |
| A project's prices, plans, features, limits | The project's pages, through Knowledge | No copying; change in one place; no data pool needed |
| How to close a lead, when to hand over to a person | Skill | Behavior in the skill, facts looked up |
| Work to be done, with an assignee | Task | Has a log and a Start button |
| A Pack's own tables | Pack storage | Only that Pack sees them |
| Secrets, tokens, passwords | Credential vault ([runtime.md](https://trysoot.com/docs/runtime/index.md)) | Not stored anywhere in this document |

Rule of thumb: information that goes stale when the project changes should not be written into memory or a skill. Information describing a specific person is `user` memory and must be erasable. If many Soots on many machines need to read the same copy, use the data pool.

## Boundaries

| Party | Owns |
| --- | --- |
| Core (the Soot runtime) | Workspace, levels and grants, the scoped memory store, the Knowledge mirror, gap recording, erasure by principal and retention |
| AgentCore (`2ai`) | The memory tools and the consolidation worker |
| `data-pool` Pack | The shared document service, per-pool grants, PostgreSQL |
| `artifacts` Pack | The content-addressed artifact store |
| Host (`deployment.json`) | `access`, `data_store`, `data_pool`, `knowledge_pools`, `retention`, memory publish permission (`conversation.memory_workspace_write`) |
| Nest | Display and control; holds no permissions of its own |

Deliberately not done: the model writing SQL; automatically promoting conversation memory to a shared bank; public Soots reading the data pool in general; a repo deploy granting itself access to the host's data; treating a Pack install as a grant.

Not there yet: a pipeline that syncs project data or a data warehouse into the pool, an approval queue, and an issue-summary workflow on the pool.

## In the code

| Part | Where |
| --- | --- |
| Tables, files, tasks, grants | `internal/core/workspace/` |
| `access`, `data_pool`, `data_store` config | `internal/core/config/access.go` |
| Workspace, sessions, knowledge routes | `internal/core/transport/httpapi/workspace.go`, `sessions.go`, `operator.go` |
| Memory | `internal/core/agentstate/`, `internal/core/conversation/memory.go` |
| Principal erasure, retention | `internal/compose/app/erasure.go`, `internal/core/workspace/eraser.go`, `internal/core/transport/httpapi/principals/` |
| Knowledge | `internal/core/knowledge/`, `internal/core/conversation/knowledge.go` |
| Data pool admission check | `internal/compose/app/pool_admission.go` |
| Nest | `desktop/src/modules/data/`, `desktop/src/modules/settings/knowledge/`, `desktop/src/modules/chat/session-memory.tsx` |
| Data pool | `../soot-forge/packs/data-pool/` (README, `docs/`, `skills/`) |
