Skip to content
Twelve legal frameworks — India, UAE, UK, EU, US, Canada and China

Legosphere Factory

A document engine that reads your own file room

A matter file system, a generation engine that drafts from the precedents inside it, and a conversion engine that carries a document from one legal system into another. A statutory citation gate over all of it.

Three halves that only make sense together

A generation engine alone is a commodity

A file store alone is Dropbox. A converter with nothing to convert is a demo. The engine drafting from your own corpus, with provenance, is none of those.

The file system


Every source document, reference draft, template, precedent and generated output lives in a matter, in folders — versioned, permissioned, searchable, auditable, retained on a policy. This is the system of record for a practice’s documents, not a folder on a shared drive.

  • Presigned uploads only; the storage bucket is private and never fronted directly
  • Parsing, OCR and structure extraction on commit, with per-page text kept addressable
  • Move, copy, trash, restore and bulk operations, with full-text search across metadata and content
  • Access control, lifecycle and retention as first-class objects rather than conventions

The generation engine


A new draft is not written from a blank prompt. It is assembled from your own precedents, retrieved agentically, with each clause traceable to the file, page and span it came from.

  • Clause- and heading-aware chunking — a chunk that splits a clause mid-obligation is useless for drafting
  • A per-clause retrieval plan, not one blob query for the whole document
  • A sufficiency gate that asks whether the retrieved evidence can actually ground each clause, and re-queries when it cannot
  • Three drafting paths — court, contract, notice — across sixteen document types

The citation gate


A hallucinated section number in a filed petition is real harm. Every statutory reference the engine emits is checked against a seeded provisions corpus before the document is rendered.

  • Constitution, BNS/IPC, BNSS/CrPC, CPC, Contract Act 1872, NI Act 1881, TP Act 1882, Partnership Act 1932 and the rest of the corpus a practice touches
  • An unregistered clause type raises an error rather than silently vanishing from the DOCX
  • A bounded healer loop, so a document either comes out correct or comes out flagged — never quietly wrong
  • The gate has no bypass flag, on any surface

Cross-jurisdiction

Cross-jurisdiction conversion

A multinational’s agreement drafted under English law has to work in India, or Germany, or China. That is not translation and it is not find-and-replace: mandatory rules differ, enforceability differs, and civil-law codes supply by default what common-law contracts must spell out.

IndiaUnited Arab EmiratesSingaporeUnited KingdomEuropean UnionSwitzerlandIsraelTürkiyeSouth KoreaUnited StatesCanadaChina
  1. 01

    Segment

    The source document is split into clauses at the boundaries a lawyer would recognise.

  2. 02

    Bind

    Each clause is classified and bound to a jurisdiction-neutral concept from a working ontology of commercial agreement concepts.

  3. 03

    Plan

    Each concept is mapped against the target framework as direct, partial, absent, prohibited, or implied by code — which decides what happens to the clause.

  4. 04

    Convert

    Retain, redraft, add, delete — or flag as having no equivalent in the target system, which is a real answer and not a failure.

  5. 05

    Verify

    A compliance pass over mandatory clauses, prohibited terms and formalities — stamp duty, registration, notarisation, execution requirements — as versioned data, not code.

  6. 06

    Explain

    Per clause: what changed, why, which target provision drives it, what risk remains, and what a qualified local reviewer still has to look at.

Terms of art

Terms of art are resolved through per-jurisdiction, per-language glossaries before any general translation model is allowed near them. "Consideration" is not a word you let a translation API guess at.

What you can export

DOCX, PDF, a redline against the source, an annotated version and a bilingual version — with numbering and format fidelity preserved, and OCR for scanned sources.

Agentic RAG

Retrieval that checks whether it found enough

Ordinary retrieval runs one search and hands whatever comes back to the model. That is fine when the answer is in the top three results and quietly catastrophic when it is not — the model drafts confidently from thin evidence, and nothing in the system notices. This one grades its own evidence before it writes a word.

  1. 01

    Plan per clause

    A document is not one question. The engine builds a separate retrieval query for each clause it intends to draft — indemnity, governing law, termination — rather than one blob query for the whole instrument.

    One query for a twelve-clause agreement retrieves twelve mediocre matches instead of one good one each.

  2. 02

    Retrieve hybrid

    Vector search and full-text search run together over the firm’s own documents, chunked at clause and heading boundaries.

    Neither alone is reliable on Indian legal text. Full text misses a paraphrase; vectors miss an exact section number.

  3. 03

    Grade sufficiency

    A cheap model is asked a narrow question about each clause: can what was retrieved actually ground this, or not?

    This is the step that makes it agentic rather than a pipeline. Something in the system is allowed to say "not enough".

  4. 04

    Re-query on failure

    Insufficient evidence sends it back to re-plan with a different query, not forward to draft anyway.

    The alternative is a model filling the gap from its own training — which is exactly where invented clauses come from.

  5. 05

    Select precedent

    The surviving passages feed the structure and drafting stages as the material the clause is built from.

    The draft is assembled from your documents, so it comes out in your house style without anyone configuring a house style.

  6. 06

    Record provenance

    Every drafted clause keeps a pointer to the file, page and span it came from.

    A partner asking "where did this indemnity come from?" gets an answer, not a shrug.

The part you can actually check

Provenance is what separates this from a good prompt. Open any clause in a generated draft and it tells you which of your own documents it was built from, and where in that document. If it cannot show you, it did not come from your corpus — and the difference between those two situations is the whole argument for this approach.

Why this gets better and a prompt does not

Every matter you close adds to the corpus the next draft is retrieved from. A firm with twenty years of settled documents has an asset no general model has and no competitor can buy. The engine is the thing that makes it usable; the documents are yours, and they are the part that compounds.

Integration

Callable by machines

Factory is a standalone product with an integration surface. Legosphere Drafter is one of its clients; your systems can be another.

  • Job-based generation with real queueing — enqueue, poll or stream progress, receive a signed completion callback
  • HMAC-SHA256 webhook signatures over the raw body with the timestamp inside the signed payload, exponential backoff, and a delivery log
  • Idempotency keyed on normalised instructions, so a retried request does not bill or generate twice
  • Org-scoped tenancy at the repository layer: a resource belonging to someone else is indistinguishable from one that does not exist
  • Per-org quotas and a cost ledger in INR, priced per model call rather than estimated

Enterprise

What an InfoSec review actually tests

  • Envelope encryption of documents and extracted text, with per-tenant keys
  • MFA and role-based access control across the file system
  • Data residency options, because where a document sits is a contractual term for most enterprise buyers
  • A structural review gate: a conversion cannot reach final without a qualified sign-off recorded against a named reviewer
  • Obligations under India’s DPDP Act 2023 reviewed as part of the build, with a written data-flow note covering what is stored, where, for how long, and which third parties see it

Point it at your own precedent bank

We ingest a slice of your existing documents and show you what the retrieval finds before anything is drafted. That is the honest test of whether this works for your practice.

Get in touch

Got questions?
We answer them ourselves.

No chatbot, no ticket queue. Tell us what you are trying to do and someone who has worked on the software will reply.

info@legosphere.com

Please keep client names and the facts of a live matter out of this box — it is an ordinary enquiry form, not a privileged channel.