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 集成