synrag — Python client
Python client for the synrag retrieval engine (Rust, single binary). No dependencies.
from synrag import Server
with Server("kb.syn", build_from=["./docs"]) as rag: # starts `synrag serve`; builds the index if missing
for h in rag.search("refund period", k=5):
print(h.rank, h.source, h.score)
ctx = rag.context("how many days for a refund?", budget=800) # sentences that answer + [n] citations
print(ctx.text, [s.source for s in ctx.sources])
rag.add([{"source": "faq.md", "title": "FAQ", "text": "..."}]) # live add / replace (same source), journaled
rag.delete(["old.md"])
rag.save() # snapshot + empty the journal
- Connect to a running server instead:
Client("http://host:7878"). - Multilingual semantic channel:
Server(..., student="synapse.synm"); reranker:rerank="rerank.synr". - Agents:
rag.tool()is an OpenAI-style function definition,rag.call_tool(arguments)runs it (seeexamples/agent_demo.py— works with OpenAI, Ollama, vLLM, llama.cpp server). - The binary is found via
binary=,$SYNRAG_BINorPATH.
Tests (need the release binary): python3 -m unittest discover tests.
MCP server (Claude, Cursor, any MCP client)
python -m synrag.mcp (or synrag-mcp after pip install) gives an AI agent search over your documents: the tools
search_documents, get_context (compressed context with [n] citations) and list_collections; with
--allow-writes also add_document, add_file, delete_documents (off by default).
{"mcpServers": {"synrag": {"command": "synrag-mcp",
"args": ["--index", "/home/me/notes.syn", "--build-from", "/home/me/notes"]}}}
--index builds the index on first start and runs synrag serve locally; --url http://host:7878 --api-key K --collection kb connects to a running server instead.
Metadata
Release files for synrag 1.16.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| synrag-1.16.1.tar.gz | 23.7 kB | With provenance | Details for synrag-1.16.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| synrag-1.16.1-py3-none-any.whl | Python 3 | none | any | Details for synrag-1.16.1-py3-none-any.whl |
Total release size: 51.8 kB
Release files / synrag-1.16.1.tar.gz
| Download URL | synrag-1.16.1.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d333e7fa8886bf649335387c8575185f20c6dcedb5a2611379edce0af1787ff
|
|
BLAKE2b-256 checksum How to use checksums |
9acc2e63e867229745b34f0417a1577384d0837f2dbd17d5e9a5142d2c3c05a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / synrag-1.16.1-py3-none-any.whl
| Download URL | synrag-1.16.1-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
837384751da532e2da0f51510f2cca742ac298294bf343f24555063e09555b06
|
|
BLAKE2b-256 checksum How to use checksums |
8e8dfd4f64cb9eeaa87c05178c078315b6ba433053a6042ca29b8cd331f0249e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for synrag 1.16.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for synrag-1.16.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.