Features
What Polymathy actually ships.
Polymathy is a narrow service by design. These are the features that exist in the binary today — no roadmap items dressed up as capabilities, no bundled model you have to bring yourself. Where a feature is delegated, we say so.
The API surface
One read endpoint
GET /v1/search?q={query} is the entire public surface in v0.2. There is no write path, no admin API, no chat endpoint — deliberately.
OpenAPI generated from Rust types
apistos derives the OpenAPI spec directly from the actix-web handler signatures, so the spec cannot drift from the code.
Four API doc UIs bundled
Swagger UI, ReDoc, RapiDoc, and Scalar are served from the binary at /swagger, /redoc, /rapidoc, and /scalar.
The retrieval path
SearxNG as the search frontend
Point SEARXNG_URL at any SearxNG instance. Polymathy issues a JSON query and reads the top result URLs — it never crawls or indexes on its own.
Parallel URL fan-out
The top ten result URLs are dispatched to the content processor concurrently over reqwest, so per-query latency tracks the slowest page, not the sum.
Pluggable content processor
Chunking and embedding live behind PROCESSOR_URL. Swap the chunker, the chunk size, or the embedding model without changing Polymathy.
The response contract
Citation by construction
The response is a map of chunk_id → (source_url, text). Every chunk arrives paired with its origin URL, so attribution is a data invariant rather than a downstream prompt convention.
Sequential u64 chunk IDs
Chunks are keyed by sequential u64 IDs, giving downstream systems a stable handle for reranking, deduplication, or citation footnotes.
384-dim embeddings
The default request asks the processor for AllMiniLML6V2 embeddings at 100-word chunks; a 384-dim, inner-product USearch index is instantiated per request.
Operations
Single Rust binary
actix-web 4, tokio, reqwest, and usearch compile to one binary. You supply SearxNG and the processor — nothing else to operate.
Stateless per request
No database, no persistent index in v0.2. Each request builds and discards its own in-memory index, which makes horizontal scaling trivial.
Config via environment
SEARXNG_URL and PROCESSOR_URL are the two knobs that matter. Everything else is a compile-time default.
Delegated on purpose: Polymathy does not bundle an embedding model, an LLM, a reranker, a citation renderer, an auth layer, or a persistent store. See how it works for the exact request handler, or the glossary for the terms.