Skip to main content

Synthia

Contributions welcome pre-commit Ruff License: GPLv3

synthia_logo

Synthia is an agent companion for working with Synthesizer.

Synthia bundles an Agent Skill with a local MCP server so Claude Code, OpenCode, and other MCP-capable agents can answer Synthesizer questions from the user's actual installation rather than inflating context and relying on incomplete local memory. Note that it is not designed as a replacement for a human user but simply aims to make learning and using Synthesizer a frictionless experience. For more on these mechanisms see the MCP documentation and, for Agent Skills, agentskills.io.

Installation

Synthia requires Synthesizer to be installed first. You'll need to install Synthia in the same environment containing Synthesizer, and you'll need to launch your agent from that same environment.

For agent-assisted installation, send your coding agent this prompt:

Read https://raw.githubusercontent.com/synthesizer-project/synthia/main/INSTALL.md and install Synthia for me.

Or install it directly (which is essentially all the install prompt does):

pip install cosmos-synthia
synthia-install

To install an unreleased change, point pip at the repository instead:

pip install 'git+https://github.com/synthesizer-project/synthia.git'

In case you care what the install does...

synthia-install links the bundled skill at ~/.claude/skills/synthia (which OpenCode also loads, so one copy serves both clients), registers synthia-mcp with Claude Code when the claude CLI is available, and adds it to OpenCode's ~/.config/opencode/opencode.json. --dry-run shows what it would change, --uninstall reverses it. Restart your client afterwards: skills load per session, but MCP servers only load at client start.

Usage

Synthia has no interface of its own. Once installed, ask your agent about Synthesizer in plain language: the skill triggers on the subject matter, and the agent calls the MCP tools when it needs an exact local fact or a support operation.

cd ~/my-analysis
claude # or opencode
> Compare the spectra of a parametric stellar population with little and with
> heavy dust attenuation, and plot them.

What sort of thing can Synthia help with?

  • "Do any of my local grids cover the metallicity range I need, and do they contain H-beta?" — answered from the actual grid files you have, not from memory and without delving into the online documentation.
  • "Why is spectra['total'] a KeyError after I built a TotalEmission model with fesc=0?" — a documented Synthesizer emission model initialisation trap.
  • "Show me what my BPASS v2.2.1 grid's spectra look like at 10 Myr and Z=0.01." — renders a figure with known plotting methods and returns its path.
  • "Adapt this script to the Synthesizer version I actually have installed." — take outdated scripts and update them for your specific Synthesizer install.
  • "Generate a young and old galaxy with black holes and produce plots showing whether JWST can detect the AGN contribution for a set of reasonable redshifts and galaxy properties." — render a complex astrophysics question by applying its knowledge of the local installation and available grids without the need to build up the quick script yourself.

Synthia is at its most useful where an answer depends on your specific installation: which version, which grids, which spectra those grids hold. It is least useful for pure astrophysics questions not specific to Synthesizer, which the model can answer without it.

Performance

The benchmarks directory contains a series of 15 tests for common Synthia prompts. These were run on a bare agent (i.e. no plugins, MCPs, or skills) using Sonnet 5 with and without Synthia. Below is a comparison of the usage and runtime.

metric baseline synthia change
total cost $11.30 $8.22 −27%
total wall time 3682 s 2174 s −41%
source read 954 kB 92 kB −90%
cache-read tokens 21.5 M 14.9 M −31%
turns 443 341 −23%

Note that every Synthia script produced a correct result or a runnable script while baseline did in all but one case. Synthia is designed to be correct more often but importantly it'll get to the correct answer with less resource and often faster.

Development

See CONTRIBUTING.md for the full development workflow.

Licence

GNU General Public License v3.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cosmos_synthia-0.1.0.tar.gz (131.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cosmos_synthia-0.1.0-py3-none-any.whl (119.5 kB view details)

Uploaded Python 3

File details

Details for the file cosmos_synthia-0.1.0.tar.gz.

File metadata

  • Download URL: cosmos_synthia-0.1.0.tar.gz
  • Upload date:
  • Size: 131.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cosmos_synthia-0.1.0.tar.gz
Algorithm Hash digest
SHA256 429041ab48820248eff933a78b0eb318f568b9da8cee3f9a2575c33340deb122
MD5 0c42ffa8d7b27f733f9bb1e6f4f04f77
BLAKE2b-256 96cd635a1df5af5a0d542fec9e8673749ea6162da7257b101bc6d126a14fe5cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmos_synthia-0.1.0.tar.gz:

Publisher: deploy.yml on synthesizer-project/synthia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmos_synthia-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cosmos_synthia-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 119.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cosmos_synthia-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30933d3f736d1210a4e010ae9d32472086eef729069355903921a481ad331b5d
MD5 af0a9f40ae06dbed6adbff099dc6fe03
BLAKE2b-256 cc20dcd8d11afc78db418315cfa1b57aac7f75014790d26441cb43d752dac754

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmos_synthia-0.1.0-py3-none-any.whl:

Publisher: deploy.yml on synthesizer-project/synthia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page