DocsPlatformArchitecture

Architecture.

Each Essarion product is its own web service. This page shows what runs where, what is shared, and what happens between the moment you ask a question and the moment a cited answer comes back.

01Three services

Each product is a single Python service, built on FastAPI, that serves both its API and its React front end. There is no gateway in front of the three and no central engine behind them. Each service is deployed on its own and runs its own database migrations when it starts.

ServiceAddressWhat it keeps
ResearchAnythingresearchanything.aiAccounts, runs and their sources, projects, the source library, papers, API keys and API usage.
Sourcipediasourcipedia.comThe encyclopedia: entries, concepts and the queue of topics to write next, plus an audit log of administrator changes.
Essarion Sciencescience.essarion.comIts own accounts, studies and their files, projects and the falsification ledger.
layout
researchanything.ai          sourcipedia.com            science.essarion.com
ResearchAnything             Sourcipedia                Essarion Science
  reads entries as sources     writes entries             own accounts, allowlist
        │                            │                    own studies and ledger
        └──────────┬─────────────────┘
                   ▼
        one Postgres database
        (accounts, runs, encyclopedia)

02What is shared

One database for ResearchAnything and Sourcipedia

ResearchAnything and Sourcipedia run against the same Postgres database. Each owns its own tables: ResearchAnything owns the accounts and research tables, and Sourcipedia owns the encyclopedia tables. Neither service calls the other over HTTP. They meet only in the database:

Shared research code

All three services carry their own copy of the same research pipeline: query planning, search, fetching and reading pages, source ranking and citation. The copies have drifted apart as each product needed different things, so behaviour can differ between products. Each product's section describes its own.

Shared sign-in, optionally

Essarion ID, shown as Sign in with Essarion, is a login that products can accept alongside their own email and password. It is a separate account system. When you sign in with it, the product you are signing in to creates or links its own account and issues its own session, so each product still decides who gets in. Essarion Science still checks its allowlist. See Core concepts.

Essarion Science stands apart

Essarion Science keeps its own accounts, behind its own allowlist, and its own data. Its search code can use the encyclopedia as a source index when it is connected to the same database as Sourcipedia. When it is not, that step is skipped and the search goes straight to its other sources.

03From question to answer

This is what happens when you ask ResearchAnything a question, in the app or through the API.

  1. The service checks who you are (your session cookie, or an API key) and whether your plan has a research run left this month.
  2. It turns your question into a small set of search queries.
  3. It searches the encyclopedia first, then the web through Brave Search, scholarly indexes, or both, depending on the source mode. If the encyclopedia already covers the question, the web search is skipped or narrowed.
  4. It fetches and reads the pages and papers it found. Downloads are size-capped. When a site refuses automated access, it may read the Internet Archive's copy of the page instead, and the source keeps its original address.
  5. It scores the sources and keeps the strongest for close reading. Those are read in parallel.
  6. It writes the answer with citations. On deeper settings a critic reviews the draft, and RA-2 checks every cited sentence against its source.
  7. It saves the run, the answer and the sources it relied on to your account. Progress streams to you while all of this happens.

The steps a run went through are kept with it, so you can read them back afterwards. For the developer view, see Run timelines.

Two layers sit in front of the web search provider, both stored in the shared database.

If either layer is unavailable, search falls through to the web as normal.

05How Sourcipedia writes itself

Sourcipedia runs its research pipeline in the background, inside its own service. A generator works through a queue of topics, researches each one, and writes or revises the entry. A cleanup process removes duplicate entries. Administrators can review and edit entries, and their changes are logged. Reading and searching the encyclopedia are served straight from the database.

06How Essarion Science runs a study

Essarion Science is one service with four main parts: an agent that picks the next step each turn, a Python kernel it shares with you for each study, connections to 29 public biomedical databases, and audits and a reviewer that check the answer before it is shown. Files you upload are kept in that study's own workspace. The Science section covers each part.

07Models and outside services

The products depend on outside providers for models, search and data. What each one receives is set out in section 4 of the Privacy Policy.

ProviderUsed forWhere
Large language modelsPlanning, reading and writingAll three products. The Privacy Policy names the model providers as OpenAI and Anthropic.
Brave SearchWeb resultsResearchAnything.
Scholarly indexesPapersarXiv, PubMed, Europe PMC, Semantic Scholar, OpenAlex and CrossRef. ResearchAnything and Essarion Science.
Public biomedical databasesPrimary records for studiesEssarion Science. Examples include GEO, ChEMBL, Open Targets, Ensembl, Reactome, UniProt, ClinVar, ClinicalTrials.gov, the PDB and AlphaFold.
Internet ArchiveFallback copy of a pageResearchAnything, only after a site has refused the request.
EmailSign-up and password-reset codesResearchAnything. Codes are sent from hello@essarion.com.

Essarion also trains its own models, outlined on the Research page. These docs don't describe them.

08Streaming

Runs take time, so progress is streamed rather than returned at the end.

TipFor most integrations the SSE stream is the right choice. Streaming with SSE has a worked example.

Can’t find what you need?

Write to us and a person will answer.