Deploy the network and connect an agent¶
This tutorial builds the complete local ORFB Design network, connects an MCP-compatible agent to the hub, and runs a first screening workflow.
1. Prerequisites¶
Install:
- Docker with Docker Compose v2;
- GNU Make;
- a Linux x86_64 host, or a Docker environment capable of running the repository's Linux x86_64 scientific Python images;
curl,unzip,sha256sum, andmd5sum; and- enough disk and memory for the scientific images and model assets.
The RetroChimera image and runtime are the most resource intensive.
2. Clone the repository¶
3. Configure model assets¶
The staging script downloads the Graphormer checkpoints from a pinned, checksum-verified Hugging Face revision. To override either artifact with a local checkpoint, set the corresponding variable:
export GRAPHORMER_REDUCTION_CHECKPOINT_SOURCE=/absolute/path/to/reduction_checkpoint_best.pt
export GRAPHORMER_OXIDATION_CHECKPOINT_SOURCE=/absolute/path/to/oxidation_checkpoint_best.pt
Otherwise, leave both variables unset.
RetroChimera evaluates purchasability against retrochimera_inventory.csv by
default. To use a different UTF-8, one-SMILES-per-line inventory, mount it into
the container and set RETROCHIMERA_INVENTORY_PATH to its container path.
4. Build and start¶
This command:
- stages the Graphormer checkpoints;
- downloads and verifies the public RetroChimera model;
- builds the shared Agora Workbench base image;
- builds the five domain images and the hub; and
- starts the network in the background.
Initial builds can take substantial time. RetroChimera can also require several minutes to become healthy while it loads its planning model.
Check the deployment:
Follow logs if a service remains unhealthy:
See Troubleshooting if assets are missing, startup stalls, or the agent cannot reach the hub.
5. Connect an agent¶
Any MCP client that supports Streamable HTTP can connect to:
For example, a VS Code workspace can define .vscode/mcp.json:
See the VS Code MCP configuration reference for client-specific options.
Local development security
The default servers use no-op authentication. Published ports are bound to loopback, but anyone who can access an endpoint can execute code inside its container. Do not expose these endpoints to an untrusted network.
6. Ask the agent to discover the network¶
Start with a prompt that encourages tool and skill discovery:
Discover the ORFB Design tools and skills. Explain which servers you would use to characterize a molecule, predict reduction potential and aqueous solubility, assess synthesis, and estimate device-level performance. Do not run a model yet.
The agent should use search_orfb-hub_tools, inspect the relevant skill, and
identify the domain execution tools before writing Python.
7. Run a small workflow¶
For an inexpensive first run, avoid RetroChimera and ask for characterization, redox prediction, and solubility:
Evaluate ethanol (
CCO) and benzene (c1ccccc1). Compute molecular descriptors, predict reduction potential and aqueous solubility, and return a compact comparison table. Keep intermediate objects in the server kernels and report model warnings.
The agent will typically:
- call
execute_orfb_codeand usemolecular_properties; - call
execute_graphormer_codeand usepredict_reduction_potential; - call
execute_soltrannet_codeand usepredict_solubility; and - summarize the returned records.
Retrosynthesis requests can take tens of minutes and are normally promoted to
background jobs. Submit one target per planning job and poll the returned
retrochimera_check_job handle.
8. Stop the network¶
Staged checkpoints remain under the git-ignored model-assets/ directory. To
remove them and the download cache:
Troubleshooting¶
Run the following commands from the repository root, using the same
COMPOSE_FILE setting as your deployment. If you opened a new shell, restore
the inventory override and its host-path variable from step 3 first.
The hub is not ready¶
docker compose ps -a
docker compose logs --tail=100
curl --fail --max-time 10 http://127.0.0.1:8050/health
The hub waits for all five domains to become healthy before starting.
RetroChimera can take several minutes to load its model. While a service shows
starting, check its logs for progress rather than repeatedly restarting it.
If it becomes unhealthy or exits, inspect that domain's logs for the cause.
Review logs for sensitive inputs or local paths before sharing them.
Missing model assets¶
Run make graphormer-checkpoints again to retry the pinned Hugging Face
downloads. If the hosted artifacts are unavailable, set
GRAPHORMER_REDUCTION_CHECKPOINT_SOURCE and
GRAPHORMER_OXIDATION_CHECKPOINT_SOURCE to readable, nonempty local files as
shown in step 3, then run:
RetroChimera reports an unreadable inventory¶
Check whether an inventory override is set:
Unset RETROCHIMERA_INVENTORY_PATH to use the default inventory. If you
intentionally replace it, confirm that the configured container path is backed
by a readable, read-only mount. After correcting the configuration, rebuild and
apply it:
The agent is on another machine¶
First run the hub health check on the Docker host. If it fails there, resolve
service startup before changing the client. If health succeeds, configure the
MCP client with /mcp, not /health, and ensure it supports Streamable HTTP.
127.0.0.1 refers to the machine where the MCP client runs, not a remote VM.
Keep the default loopback binding and run an SSH tunnel on the client machine:
Replace user@docker-host with your SSH destination and keep the tunnel open.
On the client machine, verify
curl --fail --max-time 10 http://127.0.0.1:8050/health, then connect the MCP
client to http://127.0.0.1:8050/mcp. If local port 8050 is occupied, use
127.0.0.1:18050:127.0.0.1:8050 in the tunnel and port 18050 in the client URLs.
The default endpoints have no authentication and allow code execution inside the containers; do not expose them directly to an untrusted network.