Muse Spark¶
ID spark · Company Meta
Use Meta’s Muse Spark as an automated theorem prover. This prover runs on the OpenCode harness pinned to muse-spark-1.1. See OpenCode for harness details.
Authentication¶
Muse Spark bills against a Meta Model API account. Create a key in the Meta developer console, then set it in the environment:
export META_MODEL_API_KEY=...
Check if the key is in your environment with:
open-atp auth-status spark
Alternatively, pass the key to the harness explicitly:
from open_atp.harness import OpenCodeHarness
OpenCodeHarness(provider="meta", model="muse-spark-1.1", api_key="...")
Using the prover¶
Standard prover via Python API¶
The simplest way to run the prover is through standard_prover(), which pins the muse-spark-1.1 model on the OpenCode harness. Set META_MODEL_API_KEY in the host environment (or pass it to the harness explicitly). Here, we prove the MUL_REORDER example theorem:
from pathlib import Path
from open_atp.backends.docker import DockerBackend
from open_atp.config import standard_prover
from open_atp.examples import EXAMPLE, example_task
task = example_task(EXAMPLE.MUL_REORDER)
prover = standard_prover("spark", backend=DockerBackend())
result = prover.prove(task, output_dir=Path("demo"))
Standard prover via CLI¶
The standard prover can also be run from the CLI:
open-atp prove path/to/task.lean output_dir spark
Customizing the prover¶
To override knobs like effort, construct the class directly:
from pathlib import Path
from open_atp.backends.docker import DockerBackend
from open_atp.examples import EXAMPLE, example_task
from open_atp.harness import OpenCodeHarness
from open_atp.images import DEFAULT_IMAGE
from open_atp.provers import AgentProver
task = example_task(EXAMPLE.MUL_REORDER)
prover = AgentProver(
harness=OpenCodeHarness(provider="meta", model="muse-spark-1.1", effort="xhigh"),
backend=DockerBackend(image=DEFAULT_IMAGE),
)
result = prover.prove(task, output_dir=Path("demo"))
Tracking cost and usage¶
Cost is captured from the OpenCode CLI’s per-call breakdown and summed into cost_usd on ProofResult (see Tracking cost and usage). You can also monitor consumption from the Meta developer console.