Skip to content

Latest commit

 

History

History
95 lines (66 loc) · 5.75 KB

README.md

File metadata and controls

95 lines (66 loc) · 5.75 KB

ScienceEvolve SDK

English | 简体中文

← Back to repository README

Run multi-Agent research workflows from Node.js or the command line. The SDK supports review loops, Git collaboration, workflow evolution, persistent state, and recovery.

The repository overview covers the quick start, diagrams, 23 source workflows, and upstream acknowledgements.

Installation and Skill

Requires Node.js 24+. Version 0.1.1 is currently distributed from source or a local package. From the source repository root:

npm ci
npm run install:cli
npm run pack:sdk

In another Node project, install the generated package as a dependency. To install only the CLI globally, use the second command instead:

npm install /absolute/scienceevolve-sdk-0.1.1.tgz
npm install -g /absolute/scienceevolve-sdk-0.1.1.tgz

The SDK bundles pi; install Codex or DSH as needed. The configuration-authoring Skill ships with its references and templates. Copy its directory into the Skills directory used by your coding agent and start a new session. In an installed package it is at node_modules/@scienceevolve/sdk/skills/scienceevolve-sdk.

Scientific Skills

The SDK organizes 24 general/platform Skills and 875 scientific method Skills across 12 research areas under general/ and scientific/, distilled from 70,000+ published papers. They cover hypothesis generation, research design, validation, evidence analysis, and iteration.

Add the relevant builtin: Skill IDs to an Agent’s skills or autoSkills in its workflow configuration. The build includes the Skills and full catalog under assets/skills; loading uses the existing runtime and Harness capability checks.

Scientific Skills overview · Full catalog

The three Agent4Sci Skills provide research, experiment execution, and on-demand checklist guidance. Select all three fixed Skill IDs for the complete flow; see the example workflow. Support files and upstream license/provenance ship with each Skill. No automatic reminders are installed.

Configure and start

Choose a dedicated absolute dataDir, then add and test a model gateway in that directory. Set each Agent's model, Harness, and reasoning option in your workflow. Use the returned gateway ID when starting:

scievolve workflow validate /absolute/workflow.json
scievolve start /absolute/workflow.json /absolute/research_proposal.txt --data-dir /absolute/scienceevolve-data --workspace /absolute/task-project --gateway GATEWAY_ID

The task directory must exist, and both it and dataDir must use absolute paths. The two directories must be separate, and neither may contain the other. Git-off runs directly in the task directory; Git-on uses isolated worktrees and delivers the integrated result back. Press Ctrl+C to pause, wait for shutdown, then use the printed resume command. Keep one SDK host per data directory.

Node API

Use a workflow with its model routes already tested in the same dataDir:

import { readFile } from 'node:fs/promises';
import { createResearchSdk, loadWorkflowConfig } from '@scienceevolve/sdk';

const sdk = await createResearchSdk({ dataDir: '/absolute/scienceevolve-data' });
try {
  const run = await sdk.start({
    title: 'Research task',
    requirement: await readFile('/absolute/research_proposal.txt', 'utf8'),
    workflow: await loadWorkflowConfig('/absolute/workflow.json'),
    workspace: '/absolute/task-project',
    gatewayBindings: { defaultGatewayId: 'GATEWAY_ID' }
  });
  console.log('runId', run.id);
  for await (const event of run.events()) console.log(event);
  const result = await run.wait();
  console.log(result.status, result.artifacts);
  if (result.status !== 'completed') process.exitCode = 2;
} finally {
  await sdk.close();
}

wait() also returns on pause or interruption. Use run.snapshot(), pause(), resume(), addInput(), and respond() to inspect and manage tasks. See the API and lifecycle reference.

Guides

English and Chinese guides are included in the package. Use the language links at the top of each guide.

Task Guide
Models, reasoning, native login, and deployment CLI guide
Agents, routing, and dynamic reconfiguration Workflow reference · Loops
GitHub and parallel collaboration Authentication · Git-on v3 workflow
Workspaces and input files Workspace examples · Shared inputs
Skills, tools, and experiments Skills · MCP · Inspire / SII
Upgrade an existing deployment Naming migration · Runtime migration

The API and CLI use the main runtime. @scienceevolve/sdk/main and --engine main remain explicit aliases. The legacy engine and its package exports have been removed; existing legacy data requires an older release.

The runtime's Git baseline and per-file source hashes are recorded in the runtime manifest. The 2026-10-30 synchronization notes retain the historical update record.