Your coding agent can add Narsil search to your project
With one prompt, your coding agent can install the Narsil skill and add search to a TypeScript, Python, Go, or Rust project, where it will test the search before it reports back.
Your agent will install the Narsil package that matches your project's language
Narsil has a package for TypeScript, Python, Go, and Rust. Because every package follows the same specification and reads the same index files, any of them can open an index that another one saved.
TypeScript and JavaScript
pnpm add -E @delali/narsil- Embed the engine
- @delali/narsil
- Call a server
- @delali/narsil/client
Python
pip install delali-narsil- Embed the engine
- delali-narsil
- Call a server
- narsil-client
Go
go get github.com/assetcorp/narsil/packages/go/engine- Embed the engine
- github.com/assetcorp/narsil/packages/go/engine
- Call a server
- github.com/assetcorp/narsil/packages/go
Rust
cargo add delali-narsil- Embed the engine
- delali-narsil
- Call a server
- Send JSON over HTTP
An app in any other language can send JSON over HTTP to a Narsil server, which you can start from the ghcr.io/assetcorp/narsil container image.
Your agent can complete any of these tasks from one prompt
The copy button on each task copies the whole prompt with that task written into it, so that you can paste the prompt into your agent.
Add product search that finds the product even when a customer misspells it
Narsil scores terms within a bounded edit distance and folds plurals and verb forms into one term. Search-as-you-type also matches the last word as a prefix while the customer types it.
Read the full-text search guideLet shoppers filter results by stock and price, with a count beside each filter
Typed filters narrow the results on any field in the schema, while facets return the counts that your sidebar shows beside each filter.
Read the filters and facets guideAnswer support questions from our documentation, with a source for every claim
Narsil retrieves the passages from which your model writes its answer. Because Narsil's highlighting marks the matched text in each passage, you can trace every claim in the answer back to a document.
Read the hybrid search guideFind the right help article even when the customer's wording differs from ours
An embedding adapter turns documents and queries into vectors so that hybrid mode can fuse the vector ranking with the keyword ranking. Because the transformers adapter loads the model into your application's process, it needs no API key.
Read the embedding adapters guideAdd search to our site that works inside the browser, even offline
Narsil loads its engine and index into the browser and saves the index to IndexedDB, while a Web Worker can handle each search away from the main thread.
Read the getting started guideMove our embedded search index behind an HTTP server
Because the embedded engine and the server write the same binary format, the server can load an index that your process built, with no change to your query code.
Read the HTTP server guide
Install the skill yourself
The skills CLI can install the Narsil skill into each of the eight agents above. When you enter the command in your project, the CLI will ask you to pick the agents that should receive the skill.
Once you install the skill, your agent will check which version of Narsil your project uses, so that it can work from the types and documentation of that version.
Read the skill on GitHubYou can read every instruction that your agent receives
The playbook is a plain markdown file on this site, while the skill is a folder in the Narsil repository on GitHub.