Replace the flat "run 17 adapters in parallel and sum" design with a collaborative, layered blackboard MoA where the backend engines compose: agents declare produces/consumes typed artifacts, a scheduler topologically orders them into layers, and each layer commits its artifacts to a shared blackboard before the next runs — so downstream agents genuinely build on upstream findings. Composition core (lib/moa): - types.ts: MoaAgent contract (produces/consumes/gate/run(ctx,bb)) + typed artifact taxonomy (source_labels, effect_sizes, quality, relevance, contested, entities, mechanisms, design_priors, sufficiency, debate, research_brief) - blackboard.ts: typed single-producer-per-kind shared memory - scheduler.ts: dependency-DAG layering; parallel within a layer, artifacts committed between layers - router.ts + planner.ts: deterministic gate + advisory Claude planner (boosts never revive a 0 gate) - aggregate.ts: deterministic vote mix -> verdict + trust (no LLM; the moat) - synthesize.ts: grounded Claude narrative (explains, never decides) - 21 composing agents under lib/moa/agents/* Real composition edges proven live: MiniCheck produces source_labels -> MultiVerS aggregates them + Valsci produces contested -> STORM debates; quant-extractor produces effect_sizes -> PyMARE pools them; paper-qa quality + Loki relevance feed MiniCheck. Sample (EMPA-REG vs DECLARE) yields a calibrated "supported, trust 73/100" with an honest heterogeneity caveat. New production engines from vendored research repos (MVP -> production), wired as Layer-3 deliberation agents with papertrail_*.py + PAPERTRAIL.md: - autoreview (eimenhmdt/autoresearcher): citation-grounded literature review - autogather (lucereal/AutoResearcher): query-gen + coverage-gap analysis - autoloop (karpathy/autoresearch pattern): bounded evidence-refinement loop Platform robustness: callClaudeForJson now tolerates prose-wrapped JSON (balanced-value extraction) with one stricter retry — fixes model editorializing that previously broke MiniCheck and any strict-JSON engine. API /api/moa/orchestrate + console page /console/orchestrator visualizing the layered DAG, artifact provenance, and per-agent produce/consume.
93 lines
2.6 KiB
YAML
93 lines
2.6 KiB
YAML
openapi: 3.0.2
|
|
info:
|
|
title: Autoresearcher API
|
|
version: 1.0.0
|
|
description: An API that helps users perform research tasks like literature reviews, summarize papers and find citations.
|
|
servers:
|
|
- url: PLUGIN_HOSTNAME
|
|
description: To be replaced when served
|
|
- url: https://restfox.dev/
|
|
description: Testing server
|
|
- url: https://example.com/
|
|
description: Production server
|
|
paths:
|
|
/:
|
|
post:
|
|
tags:
|
|
- Literature Review
|
|
operationId: litreviewPostRequest
|
|
summary: Retrieve literature review results
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/QuestionModel"
|
|
responses:
|
|
200:
|
|
description: Literature review results
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/LitreviewResponse"
|
|
default:
|
|
description: Error occurred
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
/q/{q}:
|
|
get:
|
|
tags:
|
|
- Literature Review
|
|
operationId: litreviewGetRequest
|
|
summary: Retrieve literature review results
|
|
parameters:
|
|
- name: q
|
|
in: path
|
|
description: The research question to perform the literature review for
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: What is the current state of the art in deep learning?
|
|
responses:
|
|
200:
|
|
description: Literature review results
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
description: The literature review results for the given research question
|
|
default:
|
|
description: Error occurred
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
components:
|
|
schemas:
|
|
QuestionModel:
|
|
type: object
|
|
properties:
|
|
research_question:
|
|
type: string
|
|
description: The research question to perform the literature review for
|
|
example: What is the current state of the art in deep learning?
|
|
LitreviewResponse:
|
|
type: object
|
|
properties:
|
|
researcher:
|
|
type: string
|
|
description: The literature review results for the given research question
|
|
Error:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
description: Error message
|
|
securitySchemes:
|
|
bearerAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|