Molecule OS

Quickstart

Boot the brain, seed a demo tenant, and make your first authenticated call.

The whole v0 brain runs from Docker — SurrealDB plus the gateway. No local Node toolchain required.

1. Start the brain

docker compose up --build -d          # SurrealDB 3.2 + the gateway
docker compose run --rm seed          # seed the demo ServiceAgent tenant

It runs keyless in mock mode out of the box — deterministic stub embeddings and canned answers — so you can exercise the full flow before adding an OpenAI key. Check it's up:

curl http://localhost:8080/healthz
{
  "ok": true,
  "embedder": "mock",
  "generator": "mock",
  "capabilities": { "hybrid": true, "knn": "post-filter" }
}

2. Retrieve

Ask the brain a question as an anonymous end-customer (the demo public key). Only public knowledge comes back.

POST http://localhost:8080/v1/retrieve

3. Answer

Same query, but generate a grounded answer with citations instead of raw chunks:

POST http://localhost:8080/v1/answer

4. Ingest a website

Hand the pipeline a URL with an internal-agent key. It crawls, extracts, chunks, embeds, and stores the site as the tenant's public knowledge — then the widget can answer from it. This is async; it returns a jobId to poll.

POST http://localhost:8080/v1/sources/website

The two demo keys — sa_demo_public_key and sa_demo_internal_key — are seeded by docker compose run --rm seed. The public key can only retrieve and answer; ingest requires a key with an internal_agent surface.

Real answers

For real (semantic) retrieval and generation, add an OpenAI key and re-seed:

echo "AI_PROVIDER=openai"    >  .env
echo "OPENAI_API_KEY=sk-..." >> .env
docker compose up --build -d && docker compose run --rm seed

On this page