The starting point
Every product we build needs the same kinds of parts: talking to an AI model, parsing dates, checking an email’s sender, cleaning text, testing what we ship. For a long time those parts were rebuilt inside each product. That meant the same bug fixed several times, and code that was hard to audit because it was buried in a larger app.
Lacspace Lab is how we stopped doing that. Research at Lacspace is practical: AI, language tools and developer infrastructure, published as open-source packages and used in our own products.
What we built
More than 200 packages are published on npm under the Lacspace name. They are grouped by the problem they solve:
- Talking to models. One way to talk to any model: chat, streaming, prompts, token budgets, tool definitions and repairing the JSON that models return.
- Retrieval and agents. Splitting, embedding, storing and reranking documents, and a small agent loop that can call your own tools.
- Spending fewer tokens. Cheap checks before a model call, caching repeated calls, condensing sources and failing over between providers.
- Language and dates. Nepali and English names across scripts, Bikram Sambat dates, and reading when an article was really published.
- Safety and accuracy. Redacting personal data, catching prompt injection, and checking that numbers and names in generated text match the source.
- Foundations. Zero-dependency libraries and a testing kit, so what we publish stays small, auditable and easy to keep up to date.
How we work
A few rules shape everything the Lab publishes:
- Cheap checks first. A lexical screen, a cache or a deterministic rule runs before any model call. The model handles only what is left.
- No lock-in. Our AI packages hold no keys and favour no provider. You choose the model and can change it later.
- Zero dependencies. Each package stands alone, so installs stay small and there is less to audit or patch.
- Publish what is useful. If we build a piece for our own products and it is useful elsewhere, it goes out as an open-source package.
- Check, don’t trust. Generated text is scored and checked against its source rather than trusted because it reads well.
Where it runs
The packages are not a side project. Lacspace Mail uses them for Lumi AI summaries, drafts and a pre-send review, and for phishing checks on SPF, DKIM and DMARC. Lumi, the assistant on lacspace.com, answers questions about Lacspace and its products. The StockYatra trading simulator has Lumi AI built in. Because the same code runs in our products, a fix made for one of them reaches everyone who installs the package.
The developer platform
developer.lacspace.com is the home for all of it: package pages, documentation, a live playground, comparisons and a developer handbook. templates.lacspace.com shows live templates for starting a new app. Every package is published under the Lacspace Free Licence, shown with the package.
What’s next
The Lab keeps publishing as our products grow. Browse the catalogue at developer.lacspace.com, or read how we research on the research page.


