# FAROS

> A blueprint-driven AutoResearch runtime that carries a study from research interest to reviewed paper — with a typed PlanPackage between modules and a human sign-off at every consequential gate

- Category: Science & Biomedical AI / Scientific Workflow Orchestration
- Language: Python
- Repository: https://github.com/OpenNSWM-Lab/FAROS
- Canonical page: https://ai-tldr.dev/tools/faros/

## In short

FAROS (Foundation AutoResearch Operating System) is a multi-agent system built around the shape of a real research project rather than around a chain of model calls. It sits in the Scientific Workflow Orchestration category of the Science & Biomedical AI tools and is open-source, written in Python. To get started: check your machine first.

## Overview

FAROS (Foundation AutoResearch Operating System) is a multi-agent system built around the shape of a real research project rather than around a chain of model calls. It covers seven stages — ideation, literature retrieval, planning, code generation, experiment tracking, paper writing and peer review — and keeps provenance, decisions, artifacts and human feedback attached at each one. The current release targets LLM and AI-Scientist research; the runtime's `Blueprint + Capability + Profile + Provider` design is what lets new workflows, tools and scientific domains be added without rebuilding the orchestration core.

Two design choices do most of the work. The first is *evidence before generation*: retrieved papers must clear semantic and quality gates before they can support an idea, so the system distinguishes "we found papers" from "these papers actually bear on this question". The second is the `PlanPackage`, a typed contract passed between modules. Instead of handing the next stage a paragraph of prose, it freezes hypotheses, experimental variables, staged steps, acceptance criteria and evidence references — so the Code stage does not have to infer intent, and any later conclusion can be traced back.

Review is a closed loop rather than a score. ReviewX extracts the claims a paper makes, aligns each against the evidence and the measurements that are supposed to support it, checks consistency and reliability, and emits revision actions located at the claim, evidence or measurement level. Real experiment results can therefore change the next round of planning. Projects, runs, experiments, figures, papers and reviews all share traceable identifiers, which is what makes that loop auditable.

Automation stops short of full autonomy on purpose. LLM agents propose, retrieve, draft and suggest revisions; people approve plans, interpret results and sign off, and every piece of that feedback lands in a versioned record rather than a chat window. Long-running work — topic recommendation, plan generation — runs as background jobs with polling, so a browser disconnect or refresh does not lose results or trigger duplicate model calls. The interface is bilingual (Chinese and English) with light and dark themes, per-user provider configuration and encrypted API-key storage.

## What it does

- A seven-stage research loop — Idea, PlanPackage, Code, Experiment, Paper, ReviewX, human approval — with shared traceable identifiers across every artifact
- Evidence gates before ideation: retrieval, semantic filtering and deep reading must pass quality checks before a paper can support an idea
- `PlanPackage`, a typed cross-module contract carrying hypotheses, variables, staged steps, acceptance criteria and evidence references
- ReviewX — claim extraction, claim-evidence-measurement consistency checking, reliability assessment, and revision actions that feed back into planning
- Sandboxed code generation and execution with static and dynamic evaluation and automatic repair, plus metric ingestion and publication-quality figures
- Paper generation from brief and outline through section drafting and citations to LaTeX/PDF output, linked back to the plan and the experiments
- Human-in-the-loop gates at plan approval, result interpretation and final sign-off, with every decision versioned
- Per-user provider configuration with encrypted API keys, a bilingual light/dark responsive UI, and recoverable background jobs

## Getting started

FAROS runs as a Python backend plus a Vite frontend. Docker is optional for local UI work but required for the production code/experiment sandbox. You need Python 3.11+, Node.js 18+ and at least one compatible LLM provider — the project recommends Qwen. Formal paper PDFs additionally need latexmk, XeLaTeX, the ctex package and a CJK font; without them only the fallback PDF is produced.

1. Check your machine first

   A preflight script verifies the dependencies for the role you are deploying. The full Ubuntu, compute-node, public-gateway, systemd and Caddy requirements are in deploy/README.md.

```bash
./scripts/check_deployment_dependencies.sh --role local
```

2. Start the backend

```bash
git clone https://github.com/OpenNSWM-Lab/FAROS.git
cd FAROS/backend

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt

uvicorn app.main:app --host 127.0.0.1 --port 8005 --reload
```

3. Start the frontend

   The UI opens at http://127.0.0.1:5176; the OpenAPI documentation is served at http://127.0.0.1:8005/api/docs.

```bash
cd FAROS/frontend
npm ci
VITE_API_BASE_URL=http://127.0.0.1:8005 npm run dev
```

4. Configure a model provider

   The recommended path is to set the API key for your account under Settings / LLM Providers, so credentials stay encrypted and per-user. Environment variables also work. Production deployments should set FAROS_CREDENTIAL_KEY and let a trusted reverse proxy supply X-Faros-User — never commit a real key.

```bash
export ACTIVE_PROVIDER_NAME=qwen
export QWEN_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
export QWEN_API_KEY=your_api_key
```

5. Run the test suites

```bash
cd backend
./.venv/bin/pytest -q

cd ../frontend
npm run test -- --run
```

## When to use it

- Reach for it when an automated research pipeline has to be auditable — every claim traceable to the evidence and the measurement behind it
- Reach for it when LLM-generated research ideas keep coming back ungrounded, and you want literature quality gates ahead of ideation rather than review after it
- Reach for it when several agents must hand work to each other and a paragraph of prose is not a precise enough contract
- Reach for it when a team wants automation with human sign-off at plan approval and final review, not an unattended end-to-end run
