TrueNex
TRUENEX
Memory

Truenex Memory · v0.6.2 · riferimento comandicommand reference

Manuale truenex-mem

Tutti i 28 gruppi di comandi della CLI, raggruppati per fase di lavoro invece che in ordine alfabetico, con la distinzione che conta più di ogni altra: quale store stanno toccando. All 28 command groups of the CLI, grouped by stage of work rather than alphabetically, around the distinction that matters more than any other: which store each one touches.

Store globaleGlobal store 39.060 documentidocuments · 497.009 chunk Embedder multilingual-e5-base, 768 dimdims LicenzaLicense Pro attivaPro, active

I due storeThe two stores

Questa è la distinzione da tenere a mente prima di ogni comando. Quasi tutti gli errori di "non trovo quello che cerco" nascono dal chiedere a uno store ciò che sta nell'altro. This is the distinction to hold in mind before every command. Almost every "it can't find what I'm looking for" turns out to be asking one store for what lives in the other.

Store di progettoProject store
DoveWhere
<project>/.truenex-memory/
Si crea conCreated by
init
Comandi che lo usanoCommands that use it
index, search, add, list, logs, trace, status, export, import, git
ContieneHolds
i file di quel singolo progetto, più i memory node scritti a manothe files of that single project, plus hand-written memory nodes
Store globaleGlobal store
DoveWhere
~/.truenex-memory/truenex_memory.db
Si popola conPopulated by
global discoverglobal sourcesglobal refresh
Comandi che lo usanoCommands that use it
tutto il gruppo global, e il server mcpthe whole global group, and the mcp server
ContieneHolds
catalogo fonti confermate, ledger, tutti i progetti, le sessioni degli agentthe confirmed source catalog, the ledger, every project, and agent session history
VerificatoVerified

Il server MCP gira con --project-root C:\Users\marco e scrive i suoi retrieval_logs nello store globale. Un trace_id restituito da memory_search via MCP non è quindi risolvibile con truenex-mem trace show lanciato da un'altra directory: risponde trace not found. Non è un bug del trace, è il puntamento allo store sbagliato. The MCP server runs with --project-root C:\Users\marco and writes its retrieval_logs to the global store. A trace_id returned by memory_search over MCP therefore cannot be resolved by truenex-mem trace show run from another directory: it answers trace not found. That is not a bug in tracing — it is pointing at the wrong store.

Lo scopeScope

Un parametro, e la differenza più grande fra una risposta utile e una inutile. Va conosciuto prima di ogni ricerca sullo store globale. One parameter, and the largest single difference between a useful answer and a useless one. Worth knowing before every search against the global store.

Lo store globale contiene tutti i progetti. Una domanda posta mentre si lavora in una cartella precisa veniva confrontata con l'intero corpus: 170.285 chunk interrogati per 2.145 rilevanti, cioè ottanta volte il pagliaio necessario. Lo scope restringe la ricerca a una cartella, e la condizione entra dentro la query SQL — non è un filtro applicato dopo, che spenderebbe il bacino di candidati sul resto del corpus per poi scartarlo. The global store holds every project. A question asked while working in one particular folder used to be matched against the entire corpus: 170,285 chunks searched for 2,145 relevant ones — eighty times the haystack needed. Scope narrows the search to a folder, and the condition goes inside the SQL query: it is not a filter applied afterwards, which would spend the candidate pool on the rest of the corpus and then discard it.

Misura, insieme cieco di 32 domandeMeasured on a blind set of 32 questions Senza scopeNo scope Con scopeWith scope Scope sbagliatoWrong scope
Risposte trovateAnswers found 2/328/320/32
MRR 0,0420,1280

Come si passaHow to pass it

truenex-mem search "soglia di fusione densa" --scope truenex-memory

Da un agente, è il parametro scope del tool memory_search: si passa la cartella in cui si sta lavorando. La risposta contiene un blocco scope con applied e answered_from — i progetti da cui viene davvero la risposta. Va confrontato con quello che si è chiesto: se non corrispondono, il risultato non appartiene al progetto corrente. From an agent it is the scope parameter of the memory_search tool: pass the folder you are working in. The reply carries a scope block with applied and answered_from — the projects the answer actually came from. Compare it with what you asked for: if they differ, the result does not belong to the current project.

Uno scope sbagliato non peggiora: azzeraA wrong scope doesn't degrade — it zeroes

È la proprietà scomoda di questo parametro, e la ragione per cui il sistema non lo deduce mai da sé: lo passa chi conosce la cartella. Esiste un ripiego globale quando lo scope non corrisponde a nulla, che protegge dal refuso; non protegge dal progetto sbagliato-ma-esistente, dove la risposta arriva plausibile e falsa. Le domande fra progetti («dove avevo già risolto questo?») vanno fatte senza scope, deliberatamente. This is the uncomfortable property of the parameter, and the reason the system never infers it: it is passed by whoever knows the folder. A global fallback covers a scope that matches nothing, which protects against typos; it does not protect against a wrong-but-real project, where the answer comes back plausible and false. Cross-project questions ("where did I solve this before?") are asked without scope, deliberately.

Segmenti interi, non sottostringheWhole segments, not substrings

La prima versione confrontava lo scope come sottostringa, e truenex-memory prendeva anche truenex-memory-dev: il progetto vicino e sbagliato, cioè il caso peggiore, perché la risposta sembra giusta. Ora la condizione richiede che lo scope sia delimitato da separatori di percorso. Correggerlo ha portato l'insieme cieco da 6/32 a 8/32 senza perdere niente, con i quattro riordini tutti verso l'alto. The first version matched scope as a substring, so truenex-memory also matched truenex-memory-dev: the near and wrong project — the worst case, because the answer looks right. The condition now requires the scope to be delimited by path separators. Fixing it took the blind set from 6/32 to 8/32 with nothing lost, and all four re-rankings moved upward.

In uno store di progetto lo scope non serveIn a project store, scope is pointless

Là i percorsi sono relativi, quindi nessuno scope corrisponde mai — e non serve, perché lo store è già il progetto. Il guadagno vale solo sullo store globale, che è quello che il server MCP interroga. There the paths are relative, so no scope ever matches — and none is needed, because the store already is the project. The gain applies only to the global store, which is the one the MCP server queries.

Variabili d'ambienteEnvironment variables

Non esiste un file di configurazione centrale: il comportamento si governa dall'ambiente, quindi va impostato in ogni client separatamente. There is no central configuration file: behaviour is governed by the environment, so it has to be set in each client separately.

VariabileVariable ValoriValues EffettoEffect
TRUENEX_EMBEDDER hashing (default) · e5 · auto Sceglie l'embedder. Il default è hashing, che non ha ranker semantico: senza impostarla, l'indice e5 da 1,44 GB resta inutilizzato. auto degrada a hashing con un warning se sentence-transformers manca. Selects the embedder. The default is hashing, which has no semantic ranker: leave it unset and the 1.44 GB e5 index sits idle. auto falls back to hashing with a logged warning when sentence-transformers is missing.
TRUENEX_DENSE off per disattivareoff to disable Spegne il ranker denso. Serve durante un reindex-embeddings: senza, ogni ricerca in quella finestra paga un reload completo della matrice. Turns off the dense ranker. Needed during a reindex-embeddings run: without it, every search in that window pays a full matrix reload.
PYTHONUTF8 1 Su Windows evita errori di codifica sui path e sui contenuti non-ASCII. On Windows, avoids encoding errors on paths and non-ASCII content.

1 · Setup e manutenzioneSetup and maintenance

Da eseguire una volta per progetto, più i comandi di diagnosi e di schema che servono solo quando qualcosa non torna. Run once per project, plus the diagnostic and schema commands you only need when something doesn't add up.

initprogettoproject

Crea lo store di progetto nella directory corrente. È il prerequisito di index, search, add: senza, quei comandi non hanno un database su cui lavorare. Creates the project store in the current directory. It is the prerequisite for index, search and add: without it, those commands have no database to work against.

doctorprogettoproject

Diagnostica: esistenza del database, conteggi di documenti e memorie, backend vettoriale attivo. Il primo comando da lanciare quando qualcosa non funziona. Diagnostics: whether the database exists, how many documents and memories it holds, which vector backend is active. The first command to run when something misbehaves.

truenex-mem doctor --privacy

--privacy aggiunge la diagnostica su cosa viene inviato all'esterno e cosa no. --privacy adds a report on what does and does not leave the machine.

version version-info

La prima stampa la versione in chiaro, la seconda tutte le versioni dei componenti in JSON. Entrambe leggono importlib.metadata, quindi riportano i metadata installati: in un venv editable con dist-info stantio mostrano il numero sbagliato anche se il codice è aggiornato. The first prints the version in plain text, the second every component version as JSON. Both read importlib.metadata, so they report the installed metadata: in an editable venv with stale dist-info they show the wrong number even when the code is current.

migrateprogettoproject

Gestione dello schema del database.Database schema management.

statusVersione corrente e ultima disponibile dello schema.Current and latest available schema version.
applyApplica le migrazioni pendenti, con backup automatico pre-migrazione.Applies pending migrations, with an automatic pre-migration backup.
backup-listElenca i backup di migrazione, dal più recente.Lists migration backups, newest first.
restoreRipristina un backup come database attivo.Restores a backup as the active database.
upgradeglobaleglobal

Il comando da lanciare dopo aver aggiornato il pacchetto: mette a posto i dati con il programma nuovo. Fa tre cose in un colpo — migra lo schema con backup che precede la migrazione, ricostruisce i grafi già esistenti, riscrive il profilo nei client installati — e stampa una riga per ciascuna. The command to run after upgrading the package: it brings the data in line with the new program. It does three things in one pass — migrates the schema with a backup taken before the migration, rebuilds the graphs that already exist, and rewrites the profile in the installed clients — printing one line for each.

truenex-mem upgrade
truenex-mem upgrade --skip-graphs --skip-profile

È idempotente: su un archivio già aggiornato dice 8 -> 8 e non copia niente. Non crea grafi nuovi — ricostruisce quelli che ci sono: il primo grafo di un progetto lo fa solo un graph build esplicito. It is idempotent: on an already-current store it says 8 -> 8 and copies nothing. It does not create graphs — it rebuilds the ones that exist: a project's first graph comes only from an explicit graph build.

license

Gestione della licenza Pro. status mostra lo stato, activate attiva una chiave (richiede internet), deactivate la rimuove, require verifica se la licenza attuale soddisfa un tier minimo — è quello che i comandi Pro chiamano internamente. Pro licence management. status shows the current state, activate registers a key (needs internet), deactivate removes it, and require checks whether the current licence meets a minimum tier — this is what the Pro commands call internally.

updateattenzionecaution

check verifica se esiste una versione più recente senza inviare dati di progetto. self aggiorna il pacchetto via pipx o pip. check looks for a newer release without sending any project data. self upgrades the package via pipx or pip.

Non lanciare update self in un venv editableNever run update self in an editable venv

Sovrascrive l'installazione editable con un wheel da PyPI e stacca l'ambiente dal repo: le tue modifiche al sorgente smettono di avere effetto senza alcun errore visibile. Il controllo automatico che stampa New version available è escluso per i sottocomandi mcp e serve, ma non per gli altri. It overwrites the editable install with a PyPI wheel and detaches the environment from the repo: your source edits silently stop taking effect, with no visible error. The automatic check that prints New version available is skipped for the mcp and serve subcommands, but not for the rest.

Su Windows c'è un secondo caso, visto tre volte su macchine vere: se un client MCP ha un server memory attivo, quel server tiene aperto il proprio eseguibile e pip fallisce con WinError 32 a fine installazione. Su una macchina utente l'installazione in genere è riuscita comunque — fallisce solo la sostituzione del lanciatore, e un lanciatore vecchio esegue il pacchetto nuovo. Verificare prima di rifare: truenex-mem version e truenex-mem doctor. Se la versione è quella nuova e doctor risponde ok, non c'è niente da fare. On Windows there is a second case, seen three times on real machines: if an MCP client has a memory server running, that server holds its own executable open and pip fails with WinError 32 at the end of the install. On a user machine the install has usually succeeded anyway — only the launcher replacement fails, and an old launcher still runs the new package. Check before redoing anything: truenex-mem version and truenex-mem doctor. If the version is the new one and doctor answers ok, there is nothing to fix.

2 · IngestioneIngestion

Portare contenuto dentro lo store. Tutto in questa sezione lavora sullo store di progetto. Getting content into the store. Everything in this section works on the project store.

index [PATH]progettoproject

Indicizza i file locali nello store di progetto: legge, spezza in chunk, scrive. Indexes local files into the project store: reads, splits into chunks, writes.

truenex-mem index src --chunk-size 800 --chunk-overlap 100 --exclude "*.min.js"
--chunk-sizeDimensione dei chunk. Più piccoli danno recupero più preciso ma più righe da scorrere.Chunk size. Smaller chunks retrieve more precisely but produce more rows to sift.
--chunk-overlapSovrapposizione fra chunk consecutivi, per non tagliare a metà un concetto.Overlap between consecutive chunks, so a single idea isn't cut in half.
--excludePattern da escludere. Ripetibile.Pattern to exclude. Repeatable.
ingest manifestprogettoproject

Indicizza le fonti dichiarate in un file manifest, invece di passare i path a mano. È la via per ingestioni ripetibili e versionabili. Indexes the sources declared in a manifest file instead of passing paths by hand. This is the route to repeatable, version-controlled ingestion.

add CONTENTprogettoproject

Scrive un memory node manuale: una decisione, un vincolo, una nota che non vive in nessun file. --type ne definisce la natura (nota, decisione, ...). Writes a manual memory node: a decision, a constraint, a note that lives in no file. --type sets its nature (note, decision, ...).

truenex-mem add "Reindex must follow every refresh" --type decision
status setprogettoproject

Cambia lo stato del ciclo di vita di un memory node. È il meccanismo con cui una memoria diventa active, resta unverified o viene marcata obsoleta senza essere cancellata. Il recupero tratta gli stati in modo diverso, quindi questo comando governa direttamente cosa l'agente vedrà. Changes a memory node's lifecycle status. This is how a memory becomes active, stays unverified, or is marked obsolete without being deleted. Retrieval treats these states differently, so this command directly governs what an agent will see.

3 · RecuperoRetrieval

Interrogare lo store e capire perché ha risposto così. La seconda parte è quella che di solito viene ignorata e serve di più. Querying the store, and understanding why it answered the way it did. The second part is the one usually ignored and needed most.

search QUERYprogettoproject

Ricerca nello store di progetto.Searches the project store.

truenex-mem search "vector cache invalidation" --top-k 5 --json
--top-kNumero massimo di risultati.Maximum number of results.
--jsonOutput strutturato, per pipe e script.Structured output, for pipes and scripts.
--include-inactiveInclude anche i nodi non attivi: utile per capire se una risposta esiste ma è marcata obsoleta.Includes inactive nodes: useful for telling whether an answer exists but is marked obsolete.
listprogettoproject

Elenca i memory node manuali — non i chunk dei documenti. --status filtra per stato del ciclo di vita, --json dà output strutturato. È il modo per vedere cosa hai scritto tu, separato da ciò che è stato indicizzato. Lists manual memory nodes — not document chunks. --status filters by lifecycle state, --json gives structured output. This is how you see what you wrote yourself, separate from what was indexed.

logs trace showprogettoproject

Ogni ricerca lascia una traccia. logs --limit N elenca le tracce recenti, trace show TRACE_ID ne apre una con tutti i dettagli dei risultati. Every search leaves a trace. logs --limit N lists recent traces, trace show TRACE_ID opens one with full result detail.

Sono gli unici strumenti per capire perché una ricerca ha risposto male, e quindi i primi da usare quando il recupero delude. Ricorda il puntamento: una traccia generata via MCP vive nello store globale. These are the only tools for working out why a search answered badly, and so the first to reach for when retrieval disappoints. Mind which store you're pointing at: a trace generated over MCP lives in the global store.

4 · Store globaleGlobal store

Il gruppo più grande e quello che conta davvero per l'uso multi-agente: è lo store che il server MCP interroga. Dieci sottocomandi. The largest group, and the one that actually matters for multi-agent use: this is the store the MCP server queries. Ten subcommands.

Popolare il catalogoPopulating the catalog

global discoverglobaleglobal

Scopre progetti, documenti e server a partire dai client agent installati sulla macchina. Produce candidati, non fonti attive: nulla viene indicizzato finché non è confermato. Discovers projects, documents and servers from the agent clients installed on the machine. It produces candidates, not live sources: nothing is indexed until it is confirmed.

global scan-agentsglobaleglobal

Cerca directory di agent non ancora note e opzionalmente le aggiunge alla discovery. Da lanciare quando installi un nuovo client. Scans for agent directories not yet known and optionally adds them to discovery. Run it when you install a new client.

global sourcesglobaleglobal

Rivedere, confermare e aggiungere voci nel catalogo sources.json. È il punto di controllo di tutto il sistema: solo le fonti confermate vengono indicizzate da refresh. Review, confirm and add entries in the sources.json catalog. This is the control point of the whole system: only confirmed sources are indexed by refresh.

Da verificare periodicamenteWorth auditing periodically

Un project_root confermato che punta a un path rinominato o cancellato resta nel catalogo e continua a produrre voci missing a ogni refresh, mentre il progetto reale non viene indicizzato affatto. È il posto dove guardare quando global context risponde resolved: false. A confirmed project_root pointing at a renamed or deleted path stays in the catalog and keeps producing missing entries on every refresh, while the real project goes unindexed entirely. This is where to look when global context answers resolved: false.

Aggiornare l'indiceUpdating the index

global refreshglobaleglobal

Refresh incrementale: carica le fonti confermate, gira i parser, confronta col ledger e indicizza solo nuovo o modificato, deduplicando per hash del contenuto. Incremental refresh: loads the confirmed sources, runs the parsers, checks them against the ledger, and indexes only what is new or modified, deduplicating by content hash.

--dry-runRiporta cosa farebbe senza toccare DB e ledger. Da usare sempre la prima volta.Reports what it would do without touching the DB or ledger. Always use it the first time.
--jsonReport strutturato.Structured report.
--stability-secondsSalta i .jsonl modificati negli ultimi N secondi (default 120), per non leggere file che un agent sta ancora scrivendo.Skips .jsonl files modified within the last N seconds (default 120), so it never reads a file an agent is still writing.
--detail-limit --full-detailsQuante righe di dettaglio per fonte includere nel JSON.How many per-source detail rows to include in the JSON.
global reindex-embeddingsglobaleglobal

Ri-incorpora i chunk con l'embedder semantico. Resumable: salta quelli già sul modello attivo, e ogni batch viene committato a parte, quindi si può interrompere e rilanciare. Re-embeds chunks with the semantic embedder. Resumable: it skips chunks already on the active model, and commits each batch separately, so it can be interrupted and relaunched.

Senza --yes stampa solo i conteggi — e lo fa senza istanziare il modello, quindi è istantaneo. Without --yes it prints counts only — and does so without instantiating the model, so it returns instantly.

Passo obbligatorio, non opzionaleA required step, not an optional one

refresh non calcola embedding: la CLI non passa mai un embedder al refresh, solo a questo comando. I chunk appena indicizzati entrano con embedding_model a NULL, trovabili lessicalmente ma invisibili al ranker semantico. Aggiornare lo store richiede sempre due comandi. refresh computes no embeddings: the CLI never passes an embedder to refresh, only to this command. Freshly indexed chunks land with embedding_model set to NULL — findable lexically, invisible to the semantic ranker. Updating the store always takes two commands.

Ogni batch committato invalida la cache dell'indice denso, e la prima ricerca successiva la ricostruisce da zero. Su uno store da ~500k chunk sono 1,44 GB: conviene pagare quel rebuild lanciando subito una ricerca qualsiasi, invece di trovarselo addosso a caso. Each committed batch invalidates the dense index cache, and the next search rebuilds it from scratch. On a ~500k-chunk store that is 1.44 GB: better to pay for that rebuild by running any search straight away than to be ambushed by it later.

Auto-memory pro

global autoglobaleglobalpro

Manutenzione automatica della memoria. run è un wrapper sopra global refresh che, con --auto-memory, genera memory node dal contenuto appena indicizzato. Automatic memory maintenance. run is a wrapper over global refresh which, with --auto-memory, generates memory nodes from the freshly indexed content.

runRefresh + generazione. Opzioni: --auto-memory, --min-confidence, --auto-memory-limit, --auto-memory-per-source-limit, --skip-refresh.Refresh plus generation. Options: --auto-memory, --min-confidence, --auto-memory-limit, --auto-memory-per-source-limit, --skip-refresh.
statusStato read-only dell'auto-memory.Read-only auto-memory status.
reviewRivede i nodi generati senza modificare lo store.Reviews generated nodes without mutating the store.
approvePromuove un nodo da unverified ad active.Promotes a node from unverified to active.
rejectMarca un nodo obsoleto senza cancellarlo.Marks a node obsolete without deleting it.
promoteCrea una memoria curata e attiva partendo da un nodo rumoroso.Creates a curated, active memory from a noisy node.
pruneCompatta i nodi rifiutati in tombstone. Dry-run per default.Compacts rejected nodes into tombstones. Dry-run by default.
I nodi generati si accumulanoGenerated nodes accumulate

I nodi nascono unverified e restano in attesa di revisione. Il tetto per-run li limita: su una singola esecuzione reale, 182.529 candidati hanno prodotto 300 nodi creati e 180.898 scartati per limite. Ogni esecuzione successiva ne aggiunge altri 300 dal residuo, quindi senza una politica di review la coda cresce indefinitamente. Nodes are born unverified and sit waiting for review. The per-run cap bounds them: on one real run, 182,529 candidates produced 300 created nodes and 180,898 skipped by the limit. Every subsequent run adds another 300 from the remainder, so without a review policy the queue grows without end.

LeggereReading

global statusglobaleglobal

Report read-only: catalogo, database, ledger, conteggi indicizzati, problemi. La sezione problems distingue error, missing e skipped — e gli skipped di tipo server_alias sono normali, perché non c'è indicizzazione via SSH. Read-only report: catalog, database, ledger, indexed counts, problems. The problems section separates error, missing and skipped — and server_alias entries under skipped are expected, because there is no indexing over SSH.

global contextglobaleglobal

Contesto di un progetto confermato: root del catalogo, ledger, documenti e chunk indicizzati. Accetta nome, path o alias e prova a risolverli. Se risponde resolved: false, il progetto non è tra le fonti confermate — si corregge con global sources, non con un refresh. Context for a confirmed project: catalog roots, ledger, indexed documents and chunks. It accepts a name, path or alias and attempts to resolve it. If it answers resolved: false, the project is not among the confirmed sources — fix that with global sources, not with a refresh.

global searchglobaleglobal

Ricerca nello store globale senza mutare i log di retrieval né lo stato del DB. È la variante da usare per valutare la qualità del recupero senza inquinare le tracce con i propri esperimenti. Searches the global store without mutating retrieval logs or DB state. This is the variant to use when assessing retrieval quality, so your experiments don't pollute the traces.

5 · Agenti e orchestrazioneAgents and orchestration

La parte meno documentata e la più interessante per l'uso multi-agente. Qui vive l'embrione di un livello di coordinamento fra client diversi. The least documented part, and the most interesting for multi-agent use. This is where the embryo of a coordination layer across different clients lives.

agentglobaleglobal

Gestisce il manifest di discovery degli agent: list, add, remove. Il manifest (~/.truenex-memory/agent_manifest.json) dichiara per ogni agent la sua directory e quali sottopercorsi contengono sessioni, cronologia e memorie — è così che global discover sa dove guardare. Manages the agent discovery manifest: list, add, remove. The manifest (~/.truenex-memory/agent_manifest.json) declares each agent's directory and which subpaths hold sessions, history and memories — this is how global discover knows where to look.

Aggiungere qui un client nuovo è il modo per far entrare le sue sessioni nello store senza toccare codice. Adding a new client here is how you get its sessions into the store without touching any code.

adapter

Genera il testo delle istruzioni per gli agent: agents-md per AGENTS.md (Codex e simili), claude-md per CLAUDE.md. Stampa su stdout, non scrive file. Generates instruction text for agents: agents-md for AGENTS.md (Codex and similar), claude-md for CLAUDE.md. It prints to stdout; it does not write files.

Oggi produce quattro righe di testo statico, uguali per entrambi i target a parte il nome del file: cercare in memoria prima di scrivere codice, preferire i risultati active, trattare gli unverified come tentativi, non usare gli obsoleti. Non esiste una policy come sorgente né un target per client diversi da questi due. Today it emits four lines of static text, identical for both targets bar the filename: search memory before writing code, prefer active results, treat unverified ones as tentative, don't use superseded ones. There is no policy acting as the source, and no target for clients beyond these two.

taskglobaleglobal

Registra le pipeline di task in modo strutturato, con i passi e un giudizio finale. È l'unico gruppo esposto anche via MCP, quindi l'unico che un agente può usare da solo durante il lavoro. Records task pipelines in structured form, with their steps and a closing judgment. It is the only group also exposed over MCP, and therefore the only one an agent can use by itself mid-task.

openApre un task. Opzioni: --project, --session, --type, --json.Opens a task. Options: --project, --session, --type, --json.
closeChiude il task, con giudizio umano opzionale.Closes the task, with an optional human judgment.
listElenca i task recenti.Lists recent tasks.
showDettaglio di un task con tutti i suoi passi.Detail of one task with all its steps.
calibrationStatistiche di calibrazione: confronta l'esito previsto con quello giudicato.Calibration statistics: compares predicted outcome against judged outcome.

Il giudizio umano alla chiusura è ciò che alimenta calibration: senza chiudere i task con un verdetto, la statistica resta vuota. The human judgment at close is what feeds calibration: leave tasks unclosed or unjudged and the statistics stay empty.

orchestrate

Loop multi-agente ricorsivo. run esegue un loop da un file di configurazione JSON; converge-check verifica se due round persistiti sono byte-identici, che è il criterio di convergenza per fermare la ricorsione. Recursive multi-agent loop. run executes a loop from a JSON config file; converge-check tests whether two persisted rounds are byte-identical, which is the convergence criterion for stopping the recursion.

È il gruppo più sperimentale: la configurazione vive solo nel JSON, e il design è descritto in docs/recursive-orchestrator-design.md. This is the most experimental group: configuration lives only in the JSON, and the design is written up in docs/recursive-orchestrator-design.md.

6 · ServiziServices

Processi che restano in esecuzione ed espongono lo store ad altri programmi. Long-running processes that expose the store to other programs.

mcpglobaleglobal

Avvia il server stdio MCP. È il comando che ogni client agent lancia dietro le quinte: non si esegue a mano, si configura. Con --project-root si decide su quale store punta. Starts the stdio MCP server. This is the command every agent client launches behind the scenes: you configure it rather than run it. --project-root decides which store it points at.

truenex-mem mcp --project-root C:\Users\marco

Il controllo automatico degli aggiornamenti è disattivato per questo sottocomando, per non sporcare stderr e rompere il protocollo. The automatic update check is disabled for this subcommand, so it cannot pollute stderr and break the protocol.

serve

Avvia l'API HTTP che serve la GUI desktop. Opzioni: --host, --port, --project-root. Espone anche /health con la versione. Come mcp, salta il controllo aggiornamenti. Starts the HTTP API behind the desktop GUI. Options: --host, --port, --project-root. It also exposes /health with the version. Like mcp, it skips the update check.

7 · Export e syncExport and sync

Portare la memoria fuori dalla macchina, o condividerla fra macchine. Getting memory off the machine, or sharing it between machines.

export importprogettoproject

Esporta e reimporta i dati della memoria locale. La coppia più semplice per un backup manuale o per spostare uno store di progetto. Exports and re-imports local memory data. The simplest pair for a manual backup, or for moving a project store.

gitprogettoprojectpro

Sincronizzazione della memoria via Git: la memoria di progetto viaggia come repository, quindi versionata e condivisibile col team. Memory synchronisation over Git: project memory travels as a repository, so it is versioned and shareable with a team.

initInizializza il repository di sync per questo progetto.Initialises the sync repository for this project.
pushEsporta la memoria corrente e la manda al remoto.Exports current memory and pushes it to the remote.
pullScarica dal remoto e importa nella memoria locale.Pulls from the remote and imports into local memory.
statusStato di sync fra database locale e repository.Sync status between the local database and the repository.
remoteGestione dei remoti.Remote management.

8 · Il grafo del codiceThe code graph

Le domande strutturali — chi chiama questa funzione, quali test la coprono — a cui la ricerca testuale risponde male per costruzione. Il grafo le legge dalla struttura del sorgente, non dai nomi. The structural questions — who calls this function, which tests cover it — that text search answers badly by construction. The graph reads them from parsed source structure, not from names.

Richiede un extra opzionaleNeeds an optional extra

L'estrattore non è installato per default. Le virgolette non sono un vezzo: senza, PowerShell e zsh interpretano le parentesi quadre e il comando falisce con un errore che non nomina nemmeno la causa. The extractor is not installed by default. The quotes are not decoration: without them, PowerShell and zsh interpret the square brackets and the command fails with an error that doesn't even name the cause.

pip install --upgrade "truenex-memory[graph]"
graph build [PATH]progettoproject

Costruisce il grafo di un progetto e lo salva nella cache (~/.truenex-memory/code_graphs/). Su una soluzione .NET di media taglia sono decine di secondi; il risultato è riusabile finché il codice non cambia. Builds a project's graph and saves it to the cache (~/.truenex-memory/code_graphs/). On a mid-sized .NET solution this takes tens of seconds; the result is reusable until the code changes.

truenex-mem graph build D:\Project_sw\ProjectPy\truenex-memory
truenex-mem graph build . --if-stale

--if-stale esce senza fare niente se il grafo è già aggiornato, in circa mezzo secondo: è ciò che rende il comando chiamabile a ogni salvataggio, o da un hook. --if-stale exits without doing anything when the graph is already current, in about half a second: this is what makes the command safe to call on every save, or from a hook.

graph explain NOME

La domanda vera: chi chiama questa entità, e quali test la coprono. Le due risposte sono separate, perché sono due domande diverse che prima finivano nello stesso elenco. The real question: who calls this entity, and which tests cover it. The two answers are kept separate, because they are two different questions that used to land in one list.

truenex-mem graph explain build_file_graph
truenex-mem graph explain build_file_graph --json

Il rapporto dichiara sempre i totals e se l'elenco è stato troncato: un elenco tagliato in silenzio si legge come completo. The report always states the totals and whether the list was truncated: a silently cut list reads as a complete one.

graph status

Elenca i grafi in cache con file e archi, senza costruire niente, e dice se l'estrattore è presente. Segnala anche le voci che non sono progetti — una cartella graficata per sbaglio — e quale comando le toglie. Lists the cached graphs with their file and edge counts, building nothing, and says whether the extractor is present. It also flags entries that are not projects — a folder graphed by mistake — and which command removes them.

graph forgetrimuoveremoves

Toglie un grafo dalla cache. Serve perché un grafo si poteva costruire e non rimuovere: una cartella graficata per sbaglio restava una radice nota per sempre, e ogni upgrade la ripercorreva. Removes a graph from the cache. It exists because a graph could be created and never removed: a folder graphed by mistake stayed a known root forever, and every upgrade walked it again.

truenex-mem graph forget --not-projects --dry-run
truenex-mem graph forget --not-projects

--not-projects toglie in un colpo le cartelle di configurazione dei client e la cartella dati di memory. Non tocca un progetto vero che risulta vuoto per un'altra ragione — un progetto in un linguaggio senza grammatica ha zero file esattamente come .claude, ma è un progetto. --not-projects sweeps client config folders and memory's own data folder in one go. It does not touch a real project that comes out empty for another reason — a project in a language with no grammar has zero files exactly like .claude, but it is a project.

Cosa è stato misuratoWhat was measured

CapacitàCapability PrimaBefore DopoAfter
Chiamanti fra file diversiCallers across files 4/2318/22, precisioneprecision 323/323
Test attribuiti (Rust)Tests attributed (Rust) 0/9583 funzioni di testtest functions
Archi di rumoreNoise edges 579 (10,2%)0
Controllo di freschezzaStaleness check 11,5 s4 ms

Si aggiorna da séIt refreshes itself

Un grafo vecchio risponde sul passato senza dichiararlo, ed è il difetto peggiore che possa avere. Le tre porte che leggono il grafo — tool MCP (quindi ogni client), CLI, API della GUI — confrontano l'impronta dei sorgenti in 4 ms, rispondono subito col grafo che c'è dichiarando che è vecchio, e avviano la ricostruzione in disparte. Nessun client deve configurare niente: una regola nella configurazione di uno lascerebbe gli altri col grafo vecchio. Si spegne con TRUENEX_GRAPH_AUTO_REBUILD=0. A stale graph answers about the past without saying so, which is the worst fault it can have. The three doors that read the graph — the MCP tool (so every client), the CLI, and the GUI API — compare the source fingerprint in 4 ms, answer immediately with the graph they have while declaring that it is old, and start the rebuild in the background. No client configures anything: a rule in one client's config would leave the others stale. Turn it off with TRUENEX_GRAPH_AUTO_REBUILD=0.

Limiti dichiaratiDeclared limits

Linguaggi senza grammatica: VB.NET, Razor, ASP.NET Web Forms, SQL. Il grafo lo dice invece di rispondere zero: 0 file — 79 .vb (VB.NET): grammatica assente. Quei file restano indicizzati e cercabili; ciò che manca è il «chi chiama chi». Languages with no grammar: VB.NET, Razor, ASP.NET Web Forms, SQL. The graph says so instead of answering zero: 0 file — 79 .vb (VB.NET): grammatica assente. Those files stay indexed and searchable; what is missing is the who-calls-what.

Output di compilazione: su una soluzione .NET reale 844 file su 1.851 (46%) erano dentro bin e obj. Ora sono esclusi. packages invece non lo è, per scelta: contiene sorgenti che qualcuno legge davvero. Build output: on a real .NET solution, 844 of 1,851 files (46%) lived inside bin and obj. Those are now excluded. packages deliberately is not: it holds sources people actually read.

Punto cieco noto: una modifica che lascia la dimensione identica entro lo stesso scatto d'orologio (~16 ms su Windows) non viene vista dal controllo di freschezza. È fissato in un test perché resti una scelta e non una dimenticanza. Known blind spot: an edit that leaves the file size identical within the same clock tick (~16 ms on Windows) is not seen by the staleness check. It is pinned by a test so it stays a choice rather than an oversight.

9 · Il profilo degli agentiThe agent profile

Un solo testo che spiega a qualunque client agentico come usare memory, scritto da memory stessa nel file che quel client legge. Nessuna configurazione da ricordare, e nessuna soluzione fatta su misura per un client solo. A single text that tells any agent client how to use memory, written by memory itself into the file that client reads. Nothing to remember, and nothing tailored to one client only.

Il problema che risolve: memory è trasversale a ogni agente e a ogni progetto, ma ogni client legge le istruzioni di utente da un percorso diverso. Non esiste uno standard unico — chi dice il contrario si sbaglia. Quindi la sorgente è una, i file di arrivo sono molti, e il blocco è delimitato da marcatori così da poter convivere con quello che c'era già. The problem it solves: memory is transversal to every agent and every project, but each client reads user-level instructions from a different path. There is no single standard — anyone claiming otherwise is wrong. So there is one source, many destination files, and the block is delimited by markers so it can coexist with whatever was already there.

Client File che leggeFile it reads
Claude Code~/.claude/CLAUDE.md
Codex~/.codex/AGENTS.md
Gemini~/.gemini/GEMINI.md
Kimi~/.kimi/AGENTS.md
Cursor~/.cursor/AGENTS.md
Aider~/.aider/CONVENTIONS.md
Copilot~/.copilot/copilot-instructions.md (o COPILOT_HOME)(or COPILOT_HOME)
MiniMaxnessuno — vedi sottonone — see below
profile show

Stampa il blocco che memory scrive, con i suoi marcatori. Sola lettura: serve a vedere cosa verrebbe scritto prima di scriverlo, e a leggere cosa un agente riceve oggi. --raw dà solo il testo, per incollarlo altrove. Prints the block memory writes, with its markers. Read-only: it is how you see what would be written before writing it, and what an agent receives today. --raw gives the text alone, for pasting elsewhere.

profile status

Quali client hanno il profilo, quali no, e chi è rimasto a una versione precedente. È la fotografia che rende visibile la deriva: senza, un client col profilo di tre versioni fa è indistinguibile da uno aggiornato. Which clients have the profile, which don't, and who is stuck on an older version. This is the snapshot that makes drift visible: without it, a client carrying a three-versions-old profile is indistinguishable from an up-to-date one.

profile apply

Scrive o aggiorna il blocco nei client installati, lasciando intatto tutto il resto del file. È idempotente: rieseguirlo dice invariato. --dry-run mostra cosa farebbe senza toccare niente, --project lo scrive nell'AGENTS.md di un progetto invece che nella cartella utente. Writes or updates the block in the clients that are installed, leaving the rest of each file untouched. It is idempotent: run it again and it says invariato. --dry-run shows what it would do without touching anything; --project writes into a project's AGENTS.md instead of the user folder.

truenex-mem profile apply --dry-run
truenex-mem profile apply
profile clients

Chi si è collegato davvero, e come è stato riconosciuto: dal nome dichiarato nell'handshake MCP, oppure risalendo l'albero dei processi quando il nome è generico (mcp, mcp-client). Un client che si presenta senza nome altrimenti sarebbe invisibile. Who actually connected, and how they were recognised: from the name declared in the MCP handshake, or by walking the process tree when that name is generic (mcp, mcp-client). A client that introduces itself anonymously would otherwise be invisible.

profile check

Misura il comportamento, non la presenza del file. Un profilo consegnato non è un profilo seguito: questo comando guarda quali strumenti ogni client ha davvero chiamato, e distingue chi cerca da chi usa solo il grafo (graph-only) e da chi non registra niente (no-recording). It measures behaviour, not whether the file exists. A delivered profile is not a followed profile: this command looks at which tools each client actually called, and separates those who search from those who only use the graph (graph-only) and those who record nothing (no-recording).

Un client che non legge nessun fileA client that reads no file at all

MiniMax parla MCP e dichiara memory nella propria configurazione, ma le sue istruzioni di utente vivono dentro un suo strumento, non in un markdown. Per lui l'unico canale è il campo instructions dell'handshake. È rappresentato esplicitamente come «nessun file»: scrivergliene uno non darebbe alcun errore e sarebbe indistinguibile dal successo — parlare MCP e leggere un file di istruzioni sono due cose diverse, e confonderle è l'errore da cui nasce questa riga. MiniMax speaks MCP and declares memory in its own configuration, but its user instructions live inside one of its own tools, not in a markdown file. Its only channel is the handshake's instructions field. It is represented explicitly as "no file": writing one would raise no error and would be indistinguishable from success — speaking MCP and reading an instruction file are two different things, and conflating them is the mistake this line exists to prevent.

Superficie MCPThe MCP surface

Ciò che un agente può fare da solo è molto meno di ciò che la CLI permette. Questo scarto è la cosa più importante da sapere per progettare l'uso multi-agente. What an agent can do on its own is far less than what the CLI allows. That gap is the single most important thing to know when designing multi-agent use.

Tool MCPMCP tool Cosa faWhat it does RestituisceReturns
memory_search Ricerca in linguaggio naturale, top_k fino a 50. Con full_content: true restituisce i corpi verbatim.Natural-language search, top_k up to 50. With full_content: true it returns verbatim bodies. Un excerpt di 320 caratteri per risultato, più content_chars, truncated, e document_id/memory_id per il drill-down.A 320-character excerpt per result, plus content_chars, truncated, and document_id/memory_id for drill-down.
memory_get Legge per intero un singolo risultato, per document_id o memory_id. Esattamente uno dei due.Reads one result in full, by document_id or memory_id. Exactly one of the two. Il testo completo, con content_chars. Per un documento lo ricompone dai suoi chunk, quindi risponde anche per sorgenti spostate o cancellate.The complete text, with content_chars. For a document it is reassembled from the chunks, so it still answers for sources since moved or deleted.
memory_add Scrive un memory node.Writes a memory node. Conferma.Confirmation.
global_status Stato dello store globale.Global store status. Catalogo, ledger, conteggi, problemi.Catalog, ledger, counts, problems.
global_project_context Contesto di un progetto confermato.Context for a confirmed project. Root, ledger, documenti e chunk, fino a limit 100.Roots, ledger, documents and chunks, up to a limit of 100.
task_open Apre un record di task.Opens a task record. Identificativo del task.The task identifier.
task_step_add Aggiunge un passo al task.Adds a step to the task. Conferma.Confirmation.
task_close Chiude il task.Closes the task. Conferma.Confirmation.
Cerca a poco, leggi per intero solo ciò che serveSearch cheaply, read in full only what you need

Otto tool su venticinque gruppi di comandi. memory_search restituisce excerpt, non corpi verbatim: una chiamata che prima costava 19.779 caratteri ne costa 4.107, misurato. Ogni risultato porta il proprio id, così memory_get recupera per intero solo quello che vale la pena leggere. Eight tools against twenty-five command groups. memory_search returns excerpts, not verbatim bodies: a call that used to cost 19,779 characters now costs 4,107, measured. Every result carries its own id, so memory_get retrieves in full only what is worth reading.

Il motivo di memory_id accanto a document_id: quest'ultimo è NULL per le memorie scritte a mano, quindi da solo non basta a indirizzarle e un risultato troncato sarebbe irrecuperabile. Why memory_id sits beside document_id: the latter is NULL for hand-written memories, so on its own it cannot address them and a truncated result would be unresolvable.

I dialoghi sono esclusi dal recuperoConversation transcripts are excluded from retrieval

Le memorie e i chunk derivati dai file di sessione .jsonl (indirizzati come <file>.jsonl::exchange_N) non entrano più nei risultati per default. Sono dialogo grezzo: agganciano i token di una query quanto il contenuto curato, senza contenere una risposta. Misurato su 14 domande reali: da 9 frammenti di chat nei primi 5 a zero. Memories and chunks derived from .jsonl session files (addressed as <file>.jsonl::exchange_N) no longer enter results by default. They are raw dialogue: they match a query's tokens as readily as curated content while carrying no answer. Measured over 14 real questions: from 9 chat fragments in the top 5 down to zero.

Lo stato non è un discriminante utilizzabile: nodi derivati da trascritto esistono sia unverified sia active. La via di fuga è include_sessions=True su search(), per quando la cronologia stessa è ciò che cerchi. Status is not a usable discriminator: transcript-derived nodes exist as unverified and as active alike. The escape hatch is include_sessions=True on search(), for when the history itself is what you want.

Trappole verificateVerified pitfalls

Comportamenti reali osservati su questa installazione, non ipotesi. Sono i punti dove il sistema fa qualcosa di corretto ma non di intuitivo. Real behaviour observed on this installation, not conjecture. These are the points where the system does something correct but unintuitive.

Il refresh non incorporaRefresh does not embed

Aggiornare lo store richiede due comandi, sempre. Dopo il solo refresh, i chunk nuovi esistono e sono trovabili lessicalmente, ma il ranker semantico non li vede. Misurato: 24.437 chunk incorporati in 218 secondi a 111,9 chunk/s su CUDA. Updating the store takes two commands, always. After refresh alone, new chunks exist and are findable lexically, but the semantic ranker cannot see them. Measured: 24,437 chunks embedded in 218 seconds at 111.9 chunks/s on CUDA.

L'embedder non è una proprietà dello storeThe embedder is not a property of the store

È una variabile d'ambiente per processo. Due client sullo stesso database, uno con e5 e uno senza, danno ranking diversi sulla stessa query — e la diagnosi è difficile perché tutto il resto è identico. Va impostata in ogni configurazione client. It is a per-process environment variable. Two clients on the same database, one with e5 and one without, rank the same query differently — and diagnosing it is hard precisely because everything else is identical. Set it in every client configuration.

Il lock dell'exe blocca il reinstallThe exe lock blocks reinstalls

Su Windows, un qualunque server MCP attivo tiene truenex-mem.exe e fa fallire pip install -e . a metà, lasciando il pacchetto disinstallato. Prima di reinstallare, va individuato quale client lo tiene aperto e chiuso. On Windows, any live MCP server holds truenex-mem.exe and makes pip install -e . fail halfway, leaving the package uninstalled. Before reinstalling, find which client is holding it and close that client.

Un catalogo può puntare al nullaA catalog can point at nothing

Una fonte confermata che punta a un path rinominato resta confermata. Continua a generare voci missing a ogni refresh, mentre il progetto reale non entra nell'indice — e global context risponde resolved: false per un progetto che a tutti gli effetti esiste. A confirmed source pointing at a renamed path stays confirmed. It keeps generating missing entries on every refresh while the real project never enters the index — and global context answers resolved: false for a project that plainly exists.

Riferimento della CLI installata, v0.6.2 · 28 gruppi di comandi, 9 tool MCPReference from the installed CLI, v0.6.2 · 28 command groups, 9 MCP tools