AutoFigure & AI-Researcher

BioCortex optionally integrates AutoFigure (methodology/result figures from text or papers) and AI-Researcher (autonomous research pipeline). Both are registered as DomainTools and appear in the tool registry and on the Resources page. The core framework runs without them if not installed.

AutoFigure

What it does

  • Generate figures from text — User describes a methodology or result; AutoFigure produces a figure.
  • Generate from a paper — Extract methodology from a research paper (PDF or Markdown) and generate a methodology diagram.

Integration

  • Module: biocortex/tools/autofigure_tool.py
  • Tools (examples): autofigure_generate_from_text, autofigure_generate_from_paper, etc.
  • Domain: e.g. protocols, literature
  • API key: Configurable via AUTOFIGURE_API_KEY or fallback to BioCortex .env (e.g. BIOCORTEX_CUSTOM_API_KEY).

Registration

Registered in biocortex/domains/loader.py behind try/import. If AutoFigure is not installed, the loader skips it and the rest of the framework is unchanged.

Dependencies

Optional AutoFigure-related dependencies are listed in requirements.txt (commented or in an optional section). Install them if you want figure-generation tools.

AI-Researcher

What it does

  • Reference-based mode — Given a list of papers, AI-Researcher generates a novel idea and implements it (literature → idea → implementation).
  • Detailed-idea mode — User provides a full research idea; AI-Researcher runs literature review, implementation, and (optionally) validation/paper writing.
It runs as an external pipeline (subprocess or Docker), with its own env (e.g. OPENROUTER_API_KEY, COMPLETION_MODEL, CATEGORY, INSTANCE_ID).

Integration

  • Module: biocortex/tools/ai_researcher_tool.py
  • Tools: ai_researcher_run_detailed_idea, ai_researcher_run_reference_based
  • Domain: literature
  • Invocation: Subprocess (or HTTP if you expose an API) to the AI-Researcher repo/script. Requires AI_RESEARCHER_PATH (repo root). Uses the pipeline’s own .env for models and keys.

Registration

Registered in loader.py behind try/except. If the module is missing or AI_RESEARCHER_PATH is not set, the tools are not loaded; when called, they return a clear error.

Caveats

  • Long-running: The bridge should return quickly (e.g. job id or output path); the actual run may be consumed later or the Executor timeout increased for that step.
  • Env: Reuse BioCortex’s API key in AI-Researcher’s .env if desired; set the rest (model, category, etc.) in the pipeline’s config.

Adding Your Own Integrations

Same pattern:
  1. Implement a module under biocortex/tools/ with get_*_tools() returning list[DomainTool].
  2. Register in biocortex/domains/loader.py with try/except so the core runs without the optional package.
  3. Document env vars and optional dependencies.
See Adding Tools and Agents for the full pattern.