Quickstart · ~5 minutes
Run Polymathy in five minutes.
Polymathy is a single binary that needs two upstreams: a SearxNG instance and a content
processor. Install it, set two environment variables, and query /v1/search.
Prerequisites: a reachable SearxNG instance with JSON output enabled, and a content-processor HTTP service that turns a URL into chunks + embeddings. Polymathy does not bundle either — see the architecture for the exact contract each must satisfy.
- 1
Install Polymathy
Install the crate from crates.io. Polymathy is a single Rust binary.
# from crates.io cargo install polymathy # or build from source git clone https://github.com/Skelf-Research/polymathy cd polymathy && cargo build --release - 2
Point at a SearxNG instance
Polymathy reads result URLs from SearxNG. Use your own instance or a private one — it must return JSON (format=json enabled).
export SEARXNG_URL=https://searx.example.org - 3
Point at a content processor
Chunking and embedding are delegated. PROCESSOR_URL must accept a URL plus a chunking/embedding config and return chunks with embeddings.
export PROCESSOR_URL=https://processor.internal - 4
Run the service
Start the actix-web server. The OpenAPI spec and the Swagger/ReDoc/RapiDoc/Scalar UIs come up alongside the endpoint.
polymathy serve --port 8080 # Swagger UI: http://localhost:8080/swagger # OpenAPI: http://localhost:8080/openapi.json - 5
Query the endpoint
Ask a question. Polymathy fetches the top ten URLs, chunks and embeds them, and returns the chunk map.
curl 'http://localhost:8080/v1/search?q=how+does+tokio+schedule+tasks' { "0": ["https://tokio.rs/…", "Tokio's scheduler is a multi-threaded…"], "1": ["https://docs.rs/tokio/…", "Tasks are polled cooperatively…"], "2": ["https://…", "The work-stealing runtime…"] }