Skip to main content

Model-guided experiment cycle

Use observations to propose a constrained next experiment batch while preserving each iteration.

Import this workflow from AkôFlow Hub

Open the public README and measured execution results. The Hub includes the execution capture, activity metrics, logs and version history. Reading public results does not require an account.

In Desktop, choose Create workflow → Import from Hub and paste this version-specific URI:

akoflow://hub/publications/92f82e89-4067-4c95-8c8d-8b8b3e55c1fd/versions/1

Download the exact workflow YAML (v1). Configure the runtime prerequisites below before planning and executing it.

Run this example locally

Fit a quadratic response model from local observations, propose a new experiment batch, enforce parameter limits, execute the proposed experiments, and verify that the measured optimum improves on the original observations. This is a numerical closed loop, not a hardware experiment.

Install Go and Python 3.12 or newer.

git clone https://github.com/UFFeScience/akoflow-examples.git &&
cd akoflow-examples &&
git checkout --detach d890c3171e3661890305b763b8fc3ede48bb61b4 &&
cd scientific-ai/experiment-feedback-loop &&
./prepare.sh &&
./run.sh

Run the block from the directory where you keep your repositories. If you already cloned the repository, enter this example's directory and run ./prepare.sh && ./run.sh.

Preparation downloads the Go module and any declared Python packages once. The workload then runs locally with offline input data. Every meaningful step is a separate process; independent activities run in parallel after their dependencies complete.

Read outputs/manifest.json for the generated artifacts, outputs/dag-validation.json for dependency waves, and outputs/stage-<activity>.json for each activity's observed result. A failed stage stops the run and prevents a successful final manifest.

Expected outputs: next-batch.json, feedback-report.json.

Run the same activities in Desktop

Start your local AkôFlow daemon with Docker available and configure AKOFLOW_API_TOKEN in your shell. From this example's directory, run:

go run ../../tools/daemon-local -root ../.. -example scientific-ai/experiment-feedback-loop

This command validates the daemon connection, builds the declared image, registers the local environment and workflow, and submits a real run. The daemon owns execution and file transfers. Open the printed run ID in Desktop to inspect each activity.

Model-guided experiment cycle. Nodes in the same column can run in parallel once their dependencies complete.

Activity responsibilities

ActivityResponsibility
observationsExecute the observations stage and publish its declared outputs for downstream activities.
update-modelExecute the update-model stage and publish its declared outputs for downstream activities.
propose-experimentsExecute the propose-experiments stage and publish its declared outputs for downstream activities.
safety-checkExecute the safety-check stage and publish its declared outputs for downstream activities.
run-experimentsExecute the run-experiments stage and publish its declared outputs for downstream activities.
record-observationsExecute the record-observations stage and publish its declared outputs for downstream activities.

Inputs

  • Observation history
  • Search space
  • Safety and budget

Outputs

  • next-batch.json
  • feedback-report.json

Provenance to preserve

  • Iteration parent
  • Rejected proposals
  • Experiment measurements

Source bundle

The executable workflow and its implementation files are maintained in the separate AkôFlow examples repository. The documentation intentionally keeps code, container recipes, generators, and validation scripts out of the narrative page.

Open the complete source bundle ↗

Execution evidence

Verified on local Docker: 6/6 activities completed. These captures belong to run showcase-experiment-feedback-loop-local-4ea0522b9c-run-20261020t190852.243916000.

Read the daemon execution record · Local output manifest

Open full resolution ↗Model-guided experiment cycle: observed activity DAG
The observed activity graph. Click to see the complete capture.

Each stage also ran through the standalone local command. Read the dependency and artifact validation.

observations

After: workflow start.

Open full resolution ↗Execution record for activity observations

Read the measured local activity result

update-model

After: observations.

Open full resolution ↗Execution record for activity update-model

Read the measured local activity result

propose-experiments

After: update-model.

Open full resolution ↗Execution record for activity propose-experiments

Read the measured local activity result

safety-check

After: propose-experiments.

Open full resolution ↗Execution record for activity safety-check

Read the measured local activity result

run-experiments

After: safety-check.

Open full resolution ↗Execution record for activity run-experiments

Read the measured local activity result

record-observations

After: run-experiments.

Open full resolution ↗Execution record for activity record-observations

Read the measured local activity result

Execution considerations

Represent each cycle as a durable iteration with explicit pause, approval, termination, and re-entry policies.

AkôFlow boundary: the engine schedules, deploys, executes, transfers data, and records evidence. The ML or agent framework remains an implementation choice inside each activity.