Molecule OS

Company Brain API

Policy-scoped retrieval, grounded answers, and website ingestion over your organization's shared knowledge — one bearer-authenticated HTTP contract, molecule.v1.

Molecule OS is the shared company brain: a single retrieval + policy + evals plane that every product (JustCall, Helpwise, ServiceAgent) queries instead of each building its own RAG stack. This is the reference for Boundary 1 — the HTTP API a product or an assistant calls to ask the brain a question.

Every request carries a bearer API key that is a principal: it resolves to a (tenant, product) and the surfaces it may act on. The caller never supplies scope — the audience (end_customer vs internal_agent) is derived from the key. That single rule is what keeps a public website visitor and an internal agent asking the same query and getting correctly different answers.

Get started

The endpoints

Base URL

All endpoints are served under a single origin. Locally that is the gateway container:

http://localhost:8080

Contract source of truth

The request and response shapes in this reference are generated from the same Zod schemas the gateway validates against (@molecule/core, molecule.v1). If a field is documented here, it exists in the contract — the docs can't drift from the API.

What this is not

The brain is deliberately two boundaries, not one. This reference covers Boundary 1 (ask the brain). The ingestion plane (connectors → raw append-only log → derivation) and the eval plane (datasets, experiments, scorers) are separate workstreams; the dashboard is where evals live.

On this page