Skip to main content
Glama

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):

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):

python -m venv .venv && . .venv/bin/activate
pip 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).

from telys import Telys
db = 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:

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

Related MCP server: Enigma MCP Server

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.

pipx install telys
telys login            # free device license + signed on-device runtime
telys runtime verify   # confirm the runtime the tools drive is present
telys 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:

{
  "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.

Tool

What it does

Required arguments

telys_search

Semantic + lexical search over a memory collection

collection, query

telys_add

Add text documents (collection auto-created if absent)

collection, texts

telys_create_collection

Create a collection (fix name + partition key up front)

name

telys_list_collections

List saved collections in the active store

—

telys_stats

Row counts and index state for one collection

collection

telys_upsert

Add-or-replace rows by id (the idempotent write)

collection, texts, ids

telys_update

Re-embed/replace EXISTING ids (strict: ids required)

collection, texts, ids

telys_delete

Tombstone rows by id

collection, ids

telys_ids

List live external ids, optionally where-scoped

collection

telys_count

Live row count, optionally where-scoped

collection

telys_get

Exact row lookup by id (re-reads repo source slices)

collection, ids

telys_search_lexical

On-device BM25 keyword search

collection, query

telys_compact

Flush tombstones, merge delta into the base layout

collection

telys_build_ivf

Build per-partition IVF indexes (recall-floor calibrated)

collection

telys_build_lexical

Fit the BM25 lexical index

collection

telys_tune

Produce (and optionally apply) a TuningPlan

collection

telys_index_repo

Walk + chunk + ingest a repo, incrementally refreshed

—

telys_repo_search

Search the auto-indexed repo (re-indexes first, always fresh)

query

telys_workspace_info

Report 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:

Available Tools

19 tools
telys_addA

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.

Inputs: texts (required), collection (required), ids, metadata.

telys_build_ivfA
Idempotent

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).

Inputs: collection (required), min_rows, target_recall.

telys_build_lexicalA
Idempotent

Fit the BM25 lexical index over the collection's retained tokens and persist it; the collection must have been created with lexical=True. 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.

Inputs: collection (required), b, k1.

telys_compactA
DestructiveIdempotent

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.

Inputs: collection (required).

telys_countA
Read-onlyIdempotent

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.

Inputs: collection (required), where.

telys_create_collectionA
Idempotent

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). 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.

Inputs: name (required), partition_by.

telys_deleteA
DestructiveIdempotent

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.

Inputs: ids (required), collection (required).

telys_getA
Read-onlyIdempotent

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. 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). Unknown ids come back as found:false, not an error; fails only when the collection does not exist.

Inputs: ids (required), collection (required), with_text, with_metadata.

telys_idsA
Read-onlyIdempotent

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.

Inputs: collection (required), where.

telys_index_repoA
Idempotent

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.

Inputs: mode, path, force, max_files, +5 more.

telys_list_collectionsA
Read-onlyIdempotent

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.

Inputs: no named parameters.

telys_search_lexicalA
Read-onlyIdempotent

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. Requires the collection to have been created with lexical=True AND telys_build_lexical to have run, otherwise the call fails. 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.

Inputs: query (required), collection (required), top_k, where, +1 more.

telys_statsA
Read-onlyIdempotent

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.

Inputs: collection (required).

telys_tuneA

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.

Inputs: collection (required), dry_run.

telys_updateA
Idempotent

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.

Inputs: ids (required), texts (required), collection (required), metadata.

telys_upsertA
Idempotent

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.

Inputs: ids (required), texts (required), collection (required), metadata, +1 more.

telys_workspace_infoA
Read-onlyIdempotent

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.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 19 tools

    Disambiguation5/5

    Every tool targets a distinct resource and action: separate search paths (semantic, lexical, repo), distinct write operations (add, upsert, update, delete), and clear maintenance tools (build indexes, compact, tune). Overlapping functions like telys_ids vs telys_count are explicitly differentiated in descriptions. No two tools appear to do the same thing.

    Naming Consistency5/5

    All tools follow the consistent `telys_` prefix with snake_case and a verb_noun pattern (e.g., build_lexical, search_lexical, list_collections, index_repo). A few like telys_ids and telys_stats are noun-only but still clearly named and stylistically uniform, so no mixing of conventions.

    Tool Count4/5

    At 19 tools, the set is slightly heavy but each tool earns its place for a full-featured memory/vector search server with repo indexing. The count is on the higher end of reasonable, but the scope justifies it; it does not feel bloated.

    Completeness4/5

    The tool surface covers the full lifecycle: collection creation, listing, stats, CRUD operations (add, upsert, update, delete, get), multiple search paths, index building and maintenance, and repo-specific indexing/search. The only notable gap is a missing delete_collection tool, which agents cannot work around easily.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Local-first AI memory layer with hybrid retrieval and brain-inspired namespaces. Enables agents to save, search, and manage memories directly via MCP tools.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Offers MCP tools for managing a local AI memory vault, including remembering, searching, context packing, deletion, and verification of receipts.
      1
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      MCP-native persistent memory for AI agents. Stores and retrieves encrypted memories with Trust Quotient scoring, cross-agent handover protocol, and immutable audit trail. 13 tools. Remote endpoint available.
      13
      40 PyPI
      13
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to store, retrieve, and manage persistent memories locally via an MCP server with hybrid vector and keyword search, plus tools for memory CRUD, search, backup, and import.
      MIT