Fastfold Docs
Apps

Workflows

Generic workflow SDK and CLI examples, plus low-level REST fallbacks when you need raw endpoints.

Use these examples when you want the generic workflow layer under client.workflows instead of the higher-level client.openmm, client.openmmdl, or client.boltzgen helpers.

SDK: create a workflow

from fastfold import Client

client = Client()
workflow = client.workflows.create(
    "evolla_v1",
    {
        "sourceType": "fold_job",
        "targetSource": "sequence",
        "sourceJobId": "550e8400-e29b-41d4-a716-446655440000",
        "sourceJobRunId": "35a22a69-89ef-4a6e-8a7f-0290ba4e8a1f",
        "sourceSequenceId": "39a5f8c6-a6cb-4bc8-89f8-0bbeb75e8a83",
        "question": "What is the function of this protein?",
    },
    name="Evolla Chat",
)
print(workflow.workflow_id)

SDK: status, task results, and execute

from fastfold import Client

client = Client()
workflow_id = "af2473ef-820d-44df-98fe-fa15103157d5"

status = client.workflows.status(workflow_id)
task_results = client.workflows.task_results(workflow_id)
client.workflows.execute(workflow_id)

print(status.status)
print(task_results.raw)

CLI: generic workflow commands

fastfold-cli workflows create --payload-file fastfold/examples/openmm/from_manual_files.json
fastfold-cli workflows status <workflow_id>
fastfold-cli workflows task-results <workflow_id> --json
fastfold-cli workflows execute <workflow_id>

Workflow YAML

Use the generic graph/YAML endpoints when you need to read or replace a workflow.yml spec directly.

from pathlib import Path

from fastfold import Client

client = Client()
workflow_id = "af2473ef-820d-44df-98fe-fa15103157d5"

current_yml = client.workflows.get_workflow_yml(workflow_id)
client.workflows.set_workflow_yml(
    workflow_id,
    Path("workflow.yml").read_text(),
)
print(current_yml)

Linked Evolla history

from fastfold import Client

client = Client()
history = client.workflows.linked_history(
    source_job_id="550e8400-e29b-41d4-a716-446655440000",
    source_job_run_id="35a22a69-89ef-4a6e-8a7f-0290ba4e8a1f",
    source_sequence_id="39a5f8c6-a6cb-4bc8-89f8-0bbeb75e8a83",
    limit=1,
)
print(history)

REST fallback

If you need a field or endpoint that is not wrapped yet, use requests directly against the same /v1/workflows/* paths. The workflow API reference lives under /workflows/overview.

import os
import requests

base = os.getenv("FASTFOLD_BASE_URL", "https://api.fastfold.ai")
headers = {"Authorization": f"Bearer {os.environ['FASTFOLD_API_KEY']}"}
workflow_id = "af2473ef-820d-44df-98fe-fa15103157d5"

resp = requests.get(f"{base}/v1/workflows/status/{workflow_id}", headers=headers, timeout=30)
resp.raise_for_status()
print(resp.json())

Last updated on

On this page