/api/thesis/* and require authentication (Authorization: Bearer sf_live_... or browser session), except the public ticker lookup noted below. The CLI, TypeScript SDK, and Agent SDK call the same routes — see Thesis lifecycle for the conceptual model and Heartbeat for the per-thesis monitor loop.
A private thesis is owned by exactly one user. Owner read and write paths 404 when the caller does not own the resource. Public thesis reads return only published thesis data.
CRUD
POST /api/thesis/create
Two modes:POST /api/thesis/create— returns202immediately and forms the causal tree in the background.POST /api/thesis/create?sync=true— runs formation inline (up to 5 minutes) and returns the formed thesis on200.
A claim classifier rejects rationale, action verbs, single tickers, or unverifiable statements with
code: THESIS_NOT_A_CLAIM. Statements shorter than 20 chars return THESIS_TOO_SHORT.
Response (202 / 200)
?sync=true, tree is populated and status is active on success.
Errors
GET /api/thesis/
Returns the full state, including tree, positions, and strategies merged into one document.PATCH /api/thesis/
Body (all optional)
Returns the updated thesis.
404 when the thesis is not yours.
DELETE /api/thesis/
Hard-deletes the thesis and all related rows (signals, evaluations, positions, strategies, notifications). Returns{ ok: true } on success.
Signals
Response 200
400 type and content are required, 404 Thesis not found.
Evaluation
Response 200: full evaluation result — confidence, node probabilities, signals consumed, killConditions checked, model used, cost.
Augment
{ depth?: number, focusNodeId?: string } to scope the augmentation.
Response 200
Causal-tree node mutation
Errors
Fork / evolve
- Pure fork: empty body or
{}— clones the thesis as-is for a new owner-perspective. - Evolve: send
{ newRawThesis, newTitle?, reason?, inheritEdgeMarketIds? }— creates a new thesis as a frame-shift of the old one. Owner-only.
Context / read
Heartbeat
Positions
POST body — required
POST body — optional
Returns
{ id: <posId> } with status 201.
PATCH accepts any subset of those fields. DELETE records an exit timestamp; positions are not hard-deleted.
Strategies
POST and PATCH accept the same body shape; POST requires the core fields, PATCH only the fields you want to change.
Body fields
Publishing
POST body
Response 200
DELETE
Returns{ "unpublished": true }. The public page returns 404 immediately; the underlying thesis is unaffected.
Public theses are reachable at /thesis/{slug} for browsers and GET /api/public/thesis/{slug} for agents.
Public thesis reads
These public endpoints do not require browser session ownership. SDK and Agent SDK callers still use an API-keyed client by default because the strict SDK/Agent contract is API-key-first for hosted reads.
What-if
Body
Errors
Video
SDK and Agent SDK mapping
The TypeScript SDK exposes this thesis surface undersf.theses.*:
Agent SDK canonical tools mirror the same names with dotted tool ids, for example
theses.context, theses.heartbeat.update, theses.positions.create, theses.strategies.list, theses.evaluate, and theses.public.get. Read tools have sideEffect: none; thesis mutation, evaluation, augmentation, fork, publish, and unpublish tools are sideEffect: user_write and require explicit Agent policy allowance.
CLI shorthand
See also
Thesis lifecycle
Conceptual model and CLI walkthrough.
Heartbeat
Per-thesis monitor loop schema.
Direct API access
Auth, base URLs, and first calls.
Errors
Full error envelope reference.