Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

Run Telys as a local server so several processes or hosts share one memory store over a Unix socket or an access-token-protected TCP port.

Telys runs in-process by default: construct Telys(path), open a collection, and read and write vectors inside your own program. That fits a single application that owns its store.

Serve instead when several processes — a web worker pool, a batch job, an interactive shell — must read and write the same collections, or when a store lives on one host and is reached from another over a trusted private network.

telys serve (and the serve() function behind it) runs a long-lived process that owns a store directory and answers requests over a socket. Clients connect with connect() / RemoteTelys and drive collections almost as they would locally. The server is the single writer to disk; clients never touch collection files directly.

Serving is the telys_team self-host tier. See Plans & licensing.

When to serve vs. run in-process

Serving adds a socket hop and a single-owner process. If one program uses the store, skip it — the in-process facade is simpler and faster. Serve only for shared access. See Local vs remote execution.

Situation
Use

One application owns the store

In-process Telys(path)

Several processes on one host share collections

A server on a Unix socket

A store on one host, clients on another (private network)

A server on a TCP port with an access token

A quick script against an existing store

Either — connect if a server already owns the dir

How the pieces fit

        your processes                         one owner process
  +-----------------------+             +---------------------------+
  | connect("unix://...")  |  length-   | telys serve --path ./mem  |
  |  -> RemoteTelys        |  prefixed  |   - owns ./mem on disk     |
  |  -> RemoteCollection   |<--JSON---> |   - single writer          |
  |     add / search / ... |  socket    |   - no outbound network    |
  +-----------------------+             +---------------------------+

The client speaks a length-prefixed JSON protocol; the server runs every operation against the on-disk store and returns results. The wire format and its limits are in Auth & network model.

Two ways to be reached

A server listens on one of two transports, chosen at start.

Created with 0600 permissions and treated as trusted: any local user who can open the socket file is authorized, so no token is required. Best for several processes sharing a store on one host.

Reachable from other hosts, so it requires an access token — the server refuses anonymous connections. Bind to a private interface only.

What the server does and does not do

  • Single owner of the store. Point one server at a given --path. Clients never open the collection files.

  • Pre-registers the bigram embedder. On boot the server best-effort registers AlgentaBigramEmbedder as "bigram", so clients can create a collection with embedder="bigram" and use add_texts / search_text immediately.

  • A remote surface, not the whole API. RemoteCollection is a subset of local Collection — ingest, query, delete, compact, index building (build_ivf), snapshots, save, stats. Tuning (tune / apply_tuning) and update_texts stay in-process on the owner. See Connect with RemoteTelys.

  • Optional license gate. Start with --require-license to verify a products.telys license offline before accepting any connection.

Next steps

Last updated

Was this helpful?