Briefing view

Reference

API reference

The JSON endpoints behind these pages and the two downloads — all plain GETs — plus the two server-only POSTs.

On this page

Overview

The Brain is public at https://brain.rms.quantvero.com, and the GET examples call it there. Everything public is read-only: GET and HEAD only. The two POSTs — one adds research, the other sets a cookie — are accepted only on the server itself (http://localhost:8080, fno-intel-dashboard.service); from anywhere else they return 403. Nothing here places an order.

JSON comes back compact, with keys in alphabetical order and non-ASCII characters as \u escapes (— arrives as \u2014). The examples below are pretty-printed, and long values are shortened with …

GET/brain/api/paste/<hash>

One research note, in exactly the shape the evidence drawer and the full note page render.

Path parameter

NameTypeNotes
hashstringThe note’s content hash: 16 hex characters, the start of the SHA-256 of its text.

Response

200 with the note, never cached (Cache-Control: no-store). An unknown or malformed hash returns 404 {"error": "not found"}.

FieldMeaning
hash, urlContent hash and the full page
titleSource label, with the title if one was given
date, ist, ageDate added, IST timestamp and how long ago
verdict, toneOverall lean (BULLISH, BEARISH or MIXED) and its colour tone (bull, bear, mixed)
signal_count, classesNumber of signals; asset classes covered, most signals first
decision_md, decision_paragraphsClaude’s decision summary, whole and split into paragraphs
content_text, content_charsThe research exactly as added, and its length
signals[]text, asset_class, slug, delta (−5 to +5), delta_str, tone, confidence, strength (1–10)
related[]Themes the note feeds: title, verdict, tone, conviction (0–10), conviction_word, asset_class, href
Request
curl https://brain.rms.quantvero.com/brain/api/paste/93b8e50fa86a5999
Responseshortened
{
  "age": "31h ago",
  "classes": ["Gold & commodities", "Bonds & rates"],
  "content_chars": 3389,
  "content_text": "Axis Bank gold report (dated September 3, 2026) is bullish on gold, …",
  "date": "28 Sep 2026",
  "decision_md": "Axis Bank (Sep-2026) is structurally bullish gold toward USD 6,000/oz …",
  "decision_paragraphs": ["Axis Bank (Sep-2026) is structurally bullish gold …", …],
  "hash": "93b8e50fa86a5999",
  "ist": "2026-09-28 10:10",
  "related": [
    {
      "asset_class": "Gold & commodities",
      "conviction": 6.5,
      "conviction_word": "high conviction",
      "href": "/brain/verdicts#gold-commodities",
      "title": "Axis Bank projects gold to USD 6,000/oz by ~Sep 2028; …",
      "tone": "bull",
      "verdict": "BULLISH"
    },
    …
  ],
  "signal_count": 8,
  "signals": [
    {
      "asset_class": "Gold & commodities",
      "confidence": "medium",
      "delta": 3.0,
      "delta_str": "+3.0",
      "slug": "gold-commodities",
      "strength": 8.0,
      "text": "Axis Bank projects gold to USD 6,000/oz by ~Sep 2028; …",
      "tone": "bull"
    },
    …
  ],
  "title": "Axis Bank - Gold Outlook + Return/Drawdown Plan, Sep 2026",
  "tone": "bull",
  "url": "/brain/paste/93b8e50fa86a5999",
  "verdict": "BULLISH"
}

POST/brain/api/theme

Saves the light or dark theme in a cookie, so the next page is rendered in it without a flash. The theme button in the top bar now writes the same cookie itself.

Request body

JSON, sent with Content-Type: application/json.

NameTypeNotes
themestring, required"light" or "dark", in any case.

Server only. The pages no longer call it: the theme switch writes the same brain_theme cookie in the browser. From anywhere but the server it returns 403.

Response

204 No Content, setting brain_theme for a year (SameSite=Lax). Any other value — or a body that isn’t JSON — returns 400 {"error": "theme must be 'light' or 'dark'"}.

Request
curl -i -X POST http://localhost:8080/brain/api/theme \
  -H 'Content-Type: application/json' \
  -d '{"theme": "dark"}'
Responseheaders
HTTP/1.1 204 NO CONTENT
Set-Cookie: brain_theme=dark; Expires=Wed, 29 Sep 2027 12:23:45 GMT; Max-Age=31536000; Path=/; SameSite=Lax

GET/brain/brief.md

Today’s decision brief as a Markdown file — the Export brief button. No parameters.

Response

text/markdown, downloaded as brain-brief-YYYY-MM-DD.md and never cached. It holds the regime and evidence agreement, the headline and summary, then This week, Actions to review, What changed (last 7 days), Market themes and Latest research.

Request
curl -OJ https://brain.rms.quantvero.com/brain/brief.md
Responsefirst lines
# Decision brief — Tuesday 29 Sep 2026

_Generated 2026-09-29 17:54 IST from the Investor Second Brain. Advisory only — nothing here places an order._

**Regime:** MIXED / DEFENSIVE · evidence agreement 60%

## Gold & commodities and Crypto are constructive; Indian equities, Bonds & rates and Global equities lean bearish.

Most one-sided: Gold & commodities (66% agreement across 6 sources). …

## This week

- New research: 2 (+1 vs prior week)
- Signals extracted: 16 (+8 vs prior week); 78 total across 7 asset classes
…

GET/brain/calendar.ics

Upcoming dated catalysts as an iCalendar file — the Sync calendar button on Catalysts. No parameters.

Response

text/calendar, downloaded as brain-catalysts.ics and never cached. One all-day event per upcoming catalyst: SUMMARY is the catalyst, DESCRIPTION its note tally and sources. Past and undated catalysts are left out; with nothing upcoming, the calendar has no events.

Request
curl -OJ https://brain.rms.quantvero.com/brain/calendar.ics
Responseexample with one upcoming catalyst
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Investor Second Brain//Catalysts//EN
CALSCALE:GREGORIAN
X-WR-CALNAME:Brain catalysts
BEGIN:VEVENT
UID:fed-fomc-2026-10-28@brain
DTSTAMP:20260929T122400Z
DTSTART;VALUE=DATE:20261028
DTEND;VALUE=DATE:20261029
SUMMARY:Fed/FOMC
DESCRIPTION:2 notes · 1 bullish · 1 mixed — Axis Bank - India Macro Outlook\, Sep 2026\; Axis Bank - Gold Outlook + Return/Drawdown Plan\, Sep 2026
END:VEVENT
END:VCALENDAR

POST/brain/paste

Adds a research note. Operator only, on the server: adding research is handled by the Brain operator, so this route accepts a POST only from the server itself — the Obsidian inbox watcher and the operator post to http://localhost:8080/brain/paste. From anywhere else it returns 403 with a plain-text notice, and a GET shows how research is added instead of a form. Expect 30–60 seconds: two Claude calls plus the theme regrouping.

Form fields

Form-encoded — application/x-www-form-urlencoded or multipart/form-data. A JSON body is not read.

NameRequiredNotes
sourceyesWho the research is from. Saved as “source - title” when a title is given; the label is cut at 200 characters.
titlenoThe piece’s title.
contentyesThe research text: 100–14,000 characters after trimming.

Response

On the server, always the Add research page as HTML with status 200, so read the message rather than the status code.

OutcomeMessage on the page
AddedIngested N atomic signals from '…'. Themes refreshed. Obsidian vault updated.
Already addedThis exact content was already ingested earlier (content_hash=…). All signals collided with prior rows. Nothing new inserted.
RejectedSource label is required · Content too short (N chars) · Content too long (N chars). Nothing is sent to Claude.
FailedLLM client init failed · LLM client unavailable · Claude scoring failed · Claude returned an error · Claude returned 0 atomic signals · DB insert failed
Partly doneSignals landed but theme clustering crashed: … Themes will refresh on the next daily aggregator run.

The watcher (scripts/brain_obsidian_inbox_processor.py) treats any 200 as delivered and tells a duplicate or a failure apart by the phrases “already ingested earlier”, “DB insert failed” and “Claude scoring failed”, so keep that wording stable.

Request
curl -X POST http://localhost:8080/brain/paste \
  --data-urlencode 'source=Axis Bank' \
  --data-urlencode 'title=Gold Outlook, Sep 2026' \
  --data-urlencode 'content@note.txt'
Responsethe message, inside the HTML page
Ingested 8 atomic signals from 'Axis Bank - Gold Outlook, Sep 2026'. Themes refreshed. Obsidian vault updated.

GET/healthz

A liveness check for monitors: runs SELECT 1 against the database. It sits at the root, not under /brain.

Response

200 {"ok": true}, or 500 {"error": "…", "ok": false} when the database can’t be reached.

Request
curl https://brain.rms.quantvero.com/healthz
Response
{"ok":true}

Not available over HTTP

  • Adding or changing research from outside the server. Every POST under /brain from anywhere but the server returns 403 — except the due-date forms (/brain/claims/due, /brain/sectors/due), which take a POST only from the Brain’s own pages. Send research to the Brain operator.
  • JSON ingestion. POST /brain/paste reads form fields only; a JSON body arrives without a source and is rejected.
  • Deleting a note. There is no route; removing research is a database operation.
  • Re-running an analysis. There is no route, and posting the same text again is treated as a duplicate.

Keyboard shortcuts

Ctrl K or /
Search
g t
Today
g n
News brief
g s
Assets
g c
Compare
g k
Catalysts
g a
Allocation
g r
Research library
g b
Briefing view
Esc
Close drawer, search or menu
?
This list