Skip to content
ArcheCausalPublic

About

A causality-inspired research prototype for multi-agent mathematical reasoning with explicit proof dependencies and independent verification.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

908 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MathAgent · Causality-Inspired Multi-Agent Math Reasoning

English · 简体中文

MathAgent · Causality-Inspired Multi-Agent Math Reasoning

MathAgent is a multi-agent system built for the Intern-S1 mathematical agent design and reasoning challenge. It stores propositions, inferences, candidate routes, and verification evidence in a shared state. During long reasoning runs, this lets it trace invalidated premises, reuse conclusions that still hold, and choose its next action based on independent checks.

Technology stack: Python, Flask, SQLite, Vue, TypeScript, Vite, Node.js, and Docker

Launch Showcase Web · Three causality-inspired mechanisms · Architecture · Validation and documentation

Launch Showcase Web

Run these steps from the repository root. You need uv, Python 3.11 or 3.12, Node.js 24, and npm. The first dependency install requires internet access.

  1. Set INTERN_API_KEY in an untracked .env file at the repository root.

  2. Run the launcher. It installs locked dependencies, builds the Vue frontend, and starts a local Flask server.

    uv run --no-project python scripts/start_showcase.py web
  3. Open 127.0.0.1:8090/dashboard and submit a problem such as Solve x² − 1 = 0 and check the candidate roots. Submitting creates a Job and calls Intern.

Add --mode fake to try the interface without model credentials. Use --port <port> if the default port is in use. Press Ctrl+C to stop the service. Run data defaults to artifacts/showcase-live/ in live mode and artifacts/showcase-local/ in fake mode.

Workbench preview and Notebook launcher

Simulated Showcase workbench with role events, replay controls, and a math report

This screenshot shows simulated data from a browser test. During a live run, the workbench displays public execution events, saved outputs from individual roles, and the final answer. The Showcase rehearsal record describes the demo and replay coverage.

uv run --no-project python scripts/start_showcase.py notebook

JupyterLab opens a working copy of the example notebook on local port 8888. Select Run → Run All Cells to create a Job through the local Showcase HTTP API and read its execution events and answer. The Notebook launcher works without Node.js and supports --mode fake. Working copies and run data are stored in artifacts/showcase-notebook/.

Three causality-inspired mechanisms

MathAgent connects reasoning actions, state changes, and verifiable progress. Chapters 2–4 of the v0.6 technical report describe the design. The implementation contracts below specify the code paths, prerequisites, and validation scope.

Mechanism Technical design
Dependency tracing and local rollback The proposition–inference graph records versions, provenance, and verification evidence. An inference requires all of its premises (AND). A proposition can remain valid with any independent valid support (OR). When the last valid support is withdrawn, invalidation propagates along the dependencies. A Checkpoint provides a state from which the run can resume. See the proof graph contract.
Verification-guided search Population persists candidate routes and their lineage. Rater, Pareto ranking, and APRS schedule work based on verified progress, differences between routes, and known resource costs. Routes share a budget for model calls, tools, and time. The scheduler counts repeated results only once toward overall progress. See the serial APRS contract and concurrent scheduling contract.
Strategy intervention from a shared Checkpoint The system forks baseline and intervention branches from the same Checkpoint. It changes one registered reasoning action while holding the problem, model, tools, and budget fixed, then compares verified progress and cost. The current contract applies to supported serial steps at an explicit pause. The comparison informs repair strategy within those conditions. See the intervention contract.

Architecture

MathAgent architecture showing the Python Orchestrator, shared proof state, verification-guided proof search, and counterfactual strategy optimization

The diagram shows the main search loop and the intervention loop from the technical report. Advanced mechanisms depend on the mode and service configuration. In live mode, Showcase calls the Intern service.

  • Solver orchestration. The Python STAR Solver Harness coordinates Explore, Planner, Reasoner, Verifier, Meta, and Researcher. It manages role handoffs, Checkpoints, the shared budget, and persistent evidence. LangGraph runs workbench graphs and manages checkpoints. The Harness owns the STAR role loop. DeepAgents is available as an optional AgentAdapter. See the framework boundary.
  • Tiered verification. The Verifier records independent review and evidence grades. A bounded deterministic tool check can reach L1. A supported Lean goal can reach L2 after kernel checking and a dependency audit. L3 also requires an independent review of how the formal specification corresponds to the original problem. Whole-solution model review is recorded as LLM_REVIEWED. See the verification contract.
  • Workbench and traceability. The Vue workbench shows progress via the Flask Job API and server-sent events (SSE). It reads answers, public summaries, and available evidence from persisted records. The CLI uses the same API, and paired experiments have a review interface. See the role output validation record.

Development and advanced configuration

Manual startup, Vite hot reload, and CLI

Install the development dependencies and start a local backend from the repository root.

uv sync --locked --all-groups
uv run python showcase_server.py --host 127.0.0.1 --port 8090 --mode fake --data-dir artifacts/showcase-local

Start Vite in another terminal and open 127.0.0.1:5174/dashboard-assets/. Vite proxies /api to local port 8090.

Set-Location showcase/frontend/chat-frontend
npm ci --no-audit --no-fund
npm run dev -- --host 127.0.0.1

After running npm run build, visit the Flask /dashboard route to view the production build. From the repository root, check the service and create a local session with these commands.

uv run python showcase_cli.py health
uv run python showcase_cli.py session create

After configuring credentials, start the backend with --mode live --data-dir artifacts/showcase-live to use Intern. The CLI probe command creates a Job and calls the model. See the Demo and CLI guide.

Enable image input or configure the Faithful service
  • Image input. Set $env:SHOWCASE_VISION_ENABLED = '1' in PowerShell before starting the live Web launcher. The workbench accepts text, one PNG, or both. The PNG limit is 128 KiB. Image interpretation shares the Job budget with solving. See the multimodal intake contract.
  • Faithful service. Copy the example configuration, then check the Docker image required by isolated tools, the budget, and the model context policy. Use your configured file path in these commands. The readiness check runs separately from Job submission.
uv run python showcase_server.py --mode live --faithful-config examples/faithful-service.json --check-runtime
uv run --no-project python scripts/start_showcase.py web --faithful-config examples/faithful-service.json --data-dir artifacts/faithful-local

You can enable adaptive_solving in supported configurations. Complete candidates go to independent whole-solution review. A specific mathematical objection can trigger one local repair before the solver returns to planning. See the high-budget configuration example and the adaptive solving contract.

Validation and documentation

The official evaluation uses user_agent.ReasoningAgent. BASELINE.json records the official baseline file hashes and evaluation results. Showcase runs through separate entry points. Interpret the report's ablation results within their respective datasets, denominators, and budgets. The repository validation records document the scope of the evidence for each capability.

Topic Reference
Current version, implementation status, and evidence Documentation index
Dependency use in live runs, Lean attempts, and validation scope Mechanism validation
Live model readiness, paired experiments, and release history Readiness record · v0.2 release evidence
Fast, full offline, release, and frontend checks Engineering checks
Merge criteria for the official evaluation path and Showcase Release boundary
Local validation commands
uv run python scripts/check_fast.py
uv run python scripts/check.py --offline
uv run python scripts/check_showcase_release.py

From showcase/frontend/chat-frontend/, run npm ci --no-audit --no-fund, npm audit --audit-level=high, and npm run check. For coverage and scope, see the engineering checks.

About

A causality-inspired research prototype for multi-agent mathematical reasoning with explicit proof dependencies and independent verification.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages