Multi-agent physics problem solver built on deepagents and LangGraph.
An orchestrator delegates each physics problem to a pipeline of specialized sub-agents — parser, researcher, solver, verifier, peer reviewer, consolidator — that share a virtual filesystem (the "lab notebook") and a toolkit of sandboxed python_exec, symbolic dimension checks, and web search.
Early prototype. The end-to-end pipeline runs against Anthropic models; local Ollama models currently complete the run as a single LLM call without orchestrating sub-agents (see FUTURE.md).
- Python 3.14
- uv for dependency management
- An Anthropic API key (recommended) or a local Ollama install
- Optional: Tavily API key for web search, LangSmith account for tracing
uv sync --extra dev
cp .env.example .env
# edit .env with your keys.env is auto-loaded by the CLI (see src/solvay/cli.py) before any LangChain import, so keys flow in without manual export.
# Solve a one-liner
uv run solvay solve "A 2 kg block slides down a 30° incline with μ=0.1. Find its speed after 3 m."
# Read the problem from a file, see the full lab notebook, dump a trace
uv run solvay solve --file problem.md --show-notebook --trace trace.json
# Pick a different model (any string accepted by langchain.chat_models.init_chat_model)
uv run solvay solve --model "openai:gpt-4o" "..."
uv run solvay solve --model "ollama:qwen3.5" "..."
# Run the benchmark suite through the matrix runner
uv run solvay bench --problems benchmark/problems --profiles solvay-noweb --models "ollama:qwen3.5" --out results.jsonlFor a first local Ollama smoke test, start Ollama, pull the model, then run one small no-web benchmark profile:
ollama pull qwen3.5
uv run solvay bench \
--problems benchmark/problems \
--profiles solvay-noweb \
--models "ollama:qwen3.5" \
--out benchmark/runs/ollama-smoke.jsonlSet the LangSmith vars in .env (LANGSMITH_API_KEY, LANGSMITH_TRACING=true, LANGSMITH_PROJECT=solvay) and every run shows up in the LangSmith UI with the full sub-agent tree, tool calls, and messages. EU-region accounts need LANGSMITH_ENDPOINT=https://eu.api.smith.langchain.com.
src/solvay/
├── agent.py # deepagents orchestrator + middleware wiring
├── cli.py # Typer CLI (solve, bench)
├── config.py # SolvayConfig, PersistenceConfig, model routing
├── middleware/ # notebook injection, cross-run persistence
├── prompts/ # markdown system prompts for each role
├── subagents/ # parser, researcher, solver, verifier, ...
└── tools/ # python_exec, dimensional check, url_fetch
tests/ # pytest suite (ruff + mypy --strict clean)
benchmark/ # curated physics problems + runner
docs/superpowers/ # design spec and implementation plan
uv run pytest # tests
uv run ruff check . # lint
uv run mypy src tests # type-check (strict)Pre-commit hooks run ruff, mypy, and detect-secrets on every commit (uv run pre-commit install).
Private repository — all rights reserved for now.