Telys — on-device memory

io.github.thyn-ai由 GitHub 帳號 thyn-ai 發布v0.1.14更新於 Nov 2, 2026

Private on-device memory & retrieval for AI assistants — offline vector + lexical search.

發布方自己的服務:Memory.fit

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

Telys 為助理提供私密的本機記憶庫:儲存筆記與事實,並以向量與關鍵字檢索回想,全程離線。

可以做什麼
  • 以語意檢索或 BM25 關鍵字檢索回想已存記憶,或依 id 精確讀取資料列
  • 寫入與維護記憶:加入文字、依 id 覆寫、更新既有 id、刪除資料列、壓縮儲存
  • 管理集合:建立、列出、查看統計、計算列數並依條件列舉 id
  • 索引本機程式碼倉庫並檢索其分段內容,命中結果會從原始檔案重新讀取
  • 調校與建立索引(IVF 向量索引、BM25 詞法索引、調校方案)並回報工作區資訊
適用情境
適合希望助理跨工作階段記住決策、筆記與事實,又不願把資料送往雲端服務的情境;也適合以語意和關鍵字檢索本機程式碼倉庫。
執行需求
以 PyPI 套件(pipx 或 pip)形式透過 stdio 在本機執行,支援 macOS arm64 與 Linux x86_64/arm64(Windows 需 WSL2)。需一次性執行 telys login(裝置授權)以取得簽章的本機執行環境;用戶端設定中不需 API 金鑰。僅列出工具不需憑證。
安裝前請注意
執行記憶工具需要經 telys login 取得的簽章執行環境,以及與帳號綁定的免費社群授權,另有其他方案的定價與帳務頁面。寫入類工具會新增、取代與標記刪除已存資料列,倉庫索引會把本機檔案讀入集合,請將工作區指向你願意被索引的倉庫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Telys — on-device memory,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

telys

Public SDK for Telys — embedded, on-device memory & retrieval. In-process, zero cloud roundtrips at query time.

This package contains the complete developer-facing surface: the Telys/Collection facades, query/filter types, the EmbeddingProvider interface, the Tuner/TuningPlan interfaces, the full MCP server (telys/mcp.py — 19 tools, protocol 2025-06-18, stdio), a runtime loader, and the telys CLI. The numerical kernel (libame_kernel) the tools drive is a separately distributed, signed on-device runtime fetched by telys login (free community license) — the same arrangement as MCP servers that front hosted or signed-binary backends.

Install

As a CLI (recommended — isolated env, on your PATH, not pinned to one Python):

bash
pipx install telys
telys login          # sign in → free device license + signed runtime; fully offline thereafter

As a library (to import telys in your own project):

bash
python -m venv .venv && . .venv/bin/activatepip install telys

Plain pip install --user telys works too, but pip may warn that its user-scripts dir isn't on your PATH (a macOS --user quirk) — pipx avoids that entirely. Runtime platforms: macOS arm64, Linux x86_64/arm64 (Windows: run under WSL2).

python
from telys import Telysdb = Telys("./memory")col = db.create_collection("docs", dim=768, partition_by="tenant_id")   # dim is arbitrary — 384/768/1024/1536/3072…col.add(vectors, ids=ids, metadata=metadata)          # bring your own vectors (embedding-agnostic, any dimension)hits = col.search(qvec, where={"tenant_id": "acme"}, top_k=10, explain=True)

The runtime is required for execution; the embedder is optional — col.add(vectors, …) and col.add_texts(…) both need the runtime, but only *_texts needs an embedder (bring your own via telys.embedding.CallableEmbedder, or use the on-device bigram embedder).

For local development, install the runtime as a package instead of via the CLI:

bash
pip install "telys[runtime]"   # or: pip install telys-runtime

MCP server

[MCP registry]

telys mcp runs Telys as a Model Context Protocol server over stdio, exposing 19 tools — the full memory surface (CRUD, filtered queries, lexical search, compaction / IVF / tuning, plus a repo auto-indexer) — to any MCP client (Claude Desktop/Code, Cursor, Codex, Qwen Code, …). Everything is local and offline. Introspection (initialize/tools/list) needs no credentials; executing memory tools requires the one-time free telys login (device authorization, free community plan) — fully offline thereafter, no API key in the client config.

bash
pipx install telystelys login            # free device license + signed on-device runtimetelys runtime verify   # confirm the runtime the tools drive is presenttelys mcp              # serve JSON-RPC 2.0 (protocol 2025-06-18) on stdin/stdout

You rarely start it by hand — telys mcp install writes the server entry into your clients — or add this block to a client's MCP config yourself:

json
{  "mcpServers": {    "telys": {      "command": "telys",      "args": ["mcp"]    }  }}

Registry: io.github.thyn-ai/telys on the Official MCP Registry. Server source: packages/telys-sdk/telys/mcp.py. MCP docs: docs.telys.ai/mcp.

ToolWhat it doesRequired arguments
telys_searchSemantic + lexical search over a memory collectioncollection, query
telys_addAdd text documents (collection auto-created if absent)collection, texts
telys_create_collectionCreate a collection (fix name + partition key up front)name
telys_list_collectionsList saved collections in the active store—
telys_statsRow counts and index state for one collectioncollection
telys_upsertAdd-or-replace rows by id (the idempotent write)collection, texts, ids
telys_updateRe-embed/replace EXISTING ids (strict: ids required)collection, texts, ids
telys_deleteTombstone rows by idcollection, ids
telys_idsList live external ids, optionally where-scopedcollection
telys_countLive row count, optionally where-scopedcollection
telys_getExact row lookup by id (re-reads repo source slices)collection, ids
telys_search_lexicalOn-device BM25 keyword searchcollection, query
telys_compactFlush tombstones, merge delta into the base layoutcollection
telys_build_ivfBuild per-partition IVF indexes (recall-floor calibrated)collection
telys_build_lexicalFit the BM25 lexical indexcollection
telys_tuneProduce (and optionally apply) a TuningPlancollection
telys_index_repoWalk + chunk + ingest a repo, incrementally refreshed—
telys_repo_searchSearch the auto-indexed repo (re-indexes first, always fresh)query
telys_workspace_infoReport the configured workspace, repo_id and file count—

Every tool ships a rich description (what it does, when to use it, parameters with defaults, failure modes) and static MCP annotations (readOnlyHint / destructiveHint / idempotentHint / openWorldHint) — openWorldHint: false throughout: the server makes no network calls. Listing the tools needs no credentials and no runtime: initialize + tools/list answer from the static tool registry; only actual tool calls load the signed runtime lazily.

Documentation

Full documentation lives at docs.telys.ai:

Links

來源:README.md,提交 7ccd8cf

工具

19

telys_add

Add text documents to a Telys memory collection: each text is embedded on-device, inserted as a new row, and persisted; the collection is auto-created (partition_by='scope') when absent. Use to store new memories. Required: collection, texts. Optional: ids (one per text; auto-generated when omitted — an id that already exists raises a conflict, so use telys_upsert to replace) and metadata (one object per text; set a `scope` value to route partitions and enable where-filtering later). Fails on empty texts, ids/texts length mismatch, or duplicate ids. NOT idempotent: omitted ids are freshly generated per call, so a repeat call inserts additional new rows.

輸入參數idstexts必填metadatacollection必填

telys_create_collection

Create a named Telys memory collection in the active store, wired to the built-in embedder. Optional — telys_add auto-creates on first write — but use it to fix the name and partition key up front. Required: name. Optional: partition_by (default 'scope'; a single metadata key name — compose compound keys into one string yourself). Collections created through MCP are automatically text-retaining and lexical-capable: stored text is returned by telys_get and telys_search, and telys_build_lexical / telys_search_lexical work out of the box. The new collection is built but NOT persisted, so telys_list_collections shows it only after a mutating tool (telys_add, telys_upsert, …) writes to it. Repeating with the same name returns the existing collection unchanged.

輸入參數name必填partition_by

telys_list_collections

List the Telys memory collections saved in the active store ($TELYS_MEMORY_PATH, default ~/.telys/memory). Use to discover what exists before searching or writing. Takes no arguments and returns sorted names; an empty store yields an empty list, not an error. Collections created but never written to by a mutating tool do not appear — if names you expect are missing, check the client points at the right store.

無需輸入參數。

telys_stats

Report stats for one Telys memory collection: name, partition key name, and live external-id count, plus runtime-provided counters (row counts, dimension, index state) that vary by runtime version. Use to confirm a collection exists and gauge its size. Siblings: telys_list_collections enumerates collections; telys_count returns cardinality only. Required: collection. Fails when the collection does not exist.

輸入參數collection必填

telys_upsert

Add-or-replace text rows by external id: new ids are inserted; existing ids are re-embedded and replaced as a versioned update (never a duplicate physical row), then persisted. Use when the caller owns the ids and a repeated call must converge instead of conflicting — this is the idempotent write path. Required: collection, texts, ids (explicit JSON null is treated as omitted = plain telys_add with generated ids). Optional: metadata (one object per text) and partition_by (default 'scope'; the collection is auto-created when absent). Fails on ids/texts length mismatch.

輸入參數ids必填texts必填metadatacollection必填partition_by

telys_update

Replace the vectors/metadata of EXISTING ids by re-embedding new texts, then persist. Use for deliberate corrections to known rows. Required: collection, texts, ids — strict by contract: missing or null ids fail with 'update requires ids' (use telys_upsert to insert-or-replace instead). Optional: metadata (one object per text; the collection's partition key is defaulted when omitted). Fails when the collection does not exist or on ids/texts length mismatch.

輸入參數ids必填texts必填metadatacollection必填

telys_delete

Tombstone rows by external id so they no longer appear in queries or id listings; the store is persisted and the space is physically reclaimed later by telys_compact. Use to forget memories. Required: collection, ids. Repeating the same delete is a no-op. Fails when the collection does not exist.

輸入參數ids必填collection必填

telys_ids

Return the live (non-tombstoned) external ids in a collection, optionally scoped by a where filter — enumeration without ranking. Siblings: telys_search returns ranked hits with scores for a query; telys_count returns just the cardinality. Required: collection. Optional: where — a single-key equality filter such as scope=project:acme (one key only). Result: the full id list in a single response (no pagination); the order is the engine's internal row order — neither sorted nor insertion order — so sort client-side when a stable display order matters. Fails when the collection does not exist or when `where` carries more than one key.

輸入參數wherecollection必填

telys_count

Return the live row count (post-tombstone) for a collection — cardinality only, optionally where-scoped. Siblings: telys_stats for aggregate stats (partition key, live id count, runtime index counters); telys_ids to enumerate the ids themselves. Required: collection — the name of an existing collection in the active store; the call fails when it does not exist (write first via telys_add or telys_create_collection). Optional: where — a single-key equality filter (one key only); more than one key fails.

輸入參數wherecollection必填

telys_get

Exact row lookup by external id — no similarity search. Returns one entry per requested id with a found flag plus stored metadata; for auto-indexed repo rows the exact source slice is re-read from disk via the row's path + line range. For memory rows created through MCP, the stored raw text is also returned. Use to fetch known rows or read the code behind a telys_repo_search hit. Required: collection, ids. Optional: with_metadata (default true) and with_text (default true; re-read the source slice for repo-index rows, or return stored text for memory rows). Unknown ids come back as found:false, not an error; fails only when the collection does not exist.

輸入參數ids必填with_textcollection必填with_metadata

telys_search_lexical

On-device BM25 lexical (keyword) search — exact-term matching for identifiers and rare tokens where semantic search is fuzzy. Sibling: use telys_search for embedding-ranked (vector) retrieval; this tool is the BM25 path, no embedding involved. Collections created through MCP are lexical-capable; run telys_build_lexical once after bulk ingestion, then telys_search_lexical returns hits including the stored text. Required: collection, query. Optional: top_k (default 5), where (single-key equality filter), explain (default false; include per-hit score explanations). Fails when the collection does not exist or the lexical index was never built.

輸入參數query必填top_kwhereexplaincollection必填

telys_compact

Flush tombstones and merge the delta segment into the base layout, physically reclaiming space from deleted/updated rows; the store is persisted. Use after large delete or update batches. Alternatives: telys_delete to remove rows, telys_tune for index tuning. Required: collection. Repeating with no pending changes is a no-op. Fails when the collection does not exist.

輸入參數collection必填

telys_build_ivf

Build per-partition IVF indexes and calibrate nprobe to a recall floor — approximate search for partitions that have outgrown exact scans. Maintenance sibling of telys_compact (physically reclaim space from deletes) and telys_tune (plan and optionally apply tuning automatically). Required: collection. Optional: min_rows (default 20000; only partitions with at least this many rows get an IVF index — smaller ones keep exact scans) and target_recall (default 0.98). Fails when the collection does not exist; needs the optional faiss dependency — the error names the fix (pipx: `pipx inject telys faiss-cpu`; venv: `pip install faiss-cpu`).

輸入參數min_rowscollection必填target_recall

telys_build_lexical

Fit the BM25 lexical index over the collection's retained tokens and persist it. Collections created through MCP are lexical-capable, so this works out of the box after ingestion. This builds the lexical BM25 index; telys_build_ivf builds the IVF vector index. Run after bulk ingestion and before telys_search_lexical. Required: collection. Optional: k1 (default 1.8; term-frequency saturation) and b (default 1.0; document-length normalization). Fails when the collection does not exist.

輸入參數bk1collection必填

telys_tune

Produce a TuningPlan for a collection via its Tuner, and optionally apply it. Use to inspect or apply index/maintenance recommendations. Sibling: telys_build_ivf builds the IVF index directly; this tool plans and optionally applies tuning. Applying (dry_run=false) sets the default target recall + exact↔quantized crossover and IVF-builds oversized partitions (already-built ones are skipped) — instant settings plus a faiss-requiring build that grows with partition size, applied live in-process (this handler does not persist to disk) and not atomically, so a mid-apply failure can leave earlier settings in place. Verify the after-state with telys_stats. Required: collection. Optional: dry_run (plan-only vs apply; values on the parameter). Fails when the collection does not exist.

輸入參數dry_runcollection必填

telys_index_repo

Walk a repo directory — respecting .gitignore on git checkouts, else skipping common build/dep dirs; binaries and symlinks escaping the root are refused — chunk every text file, and ingest the chunks into a collection for telys_repo_search. Incremental: re-calls re-fingerprint each file (size, mtime), re-embed only changed files, tombstone removed ones, and no-op fast when nothing changed. Routing: telys_repo_search queries the index; telys_add/telys_upsert store manual memories. Returns status (built/refreshed/hit), repo_id, and file/chunk counts. All arguments optional: path (repo root; default: the server workspace, else CWD), collection (default 'repo_symbols'), mode ('windowed' default or 'file'), window_lines (48), window_overlap_lines (8), max_file_bytes / max_files / max_seconds (0 = unlimited), force (default false; rebuild every file). Fails when path is not a directory or the collection already exists with a partition key other than repo_id.

輸入參數modepathforcemax_filescollectionmax_secondswindow_linesmax_file_byteswindow_overlap_lines

telys_workspace_info

Report the server's configured workspace: resolved path, repo_id, the auto-index collection name, tracked file count, and whether the fingerprint cache is persisted across restarts. Use to verify which repo telys_repo_search will index before calling it. Takes no arguments; the workspace fields are null when no workspace is configured — that is a report, not an error.

無需輸入參數。

版本歷史

5
  1. v0.1.14最新Oct 26, 2026
  2. v0.1.9Sep 25, 2026
  3. v0.1.6Sep 24, 2026
  4. v0.1.5Sep 23, 2026
  5. v0.1.4Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Memory 整合