Quick Start

The easiest way to capture provenance from plain Python functions—no external services required.

Install

First, install Flowcept:

# Make sure you activate your Python environment (conda, venv, etc.)
pip install flowcept

The simplest offline path does not require a settings file. If you need the full config structure for online services, adapters, telemetry, or deployment profiles, use:

flowcept --init-settings --full

Run a Minimal Example

Save the following script as quickstart.py and run python quickstart.py:

"""
Minimal example of Flowcept's instrumentation using decorators.
No DB, broker, or external service required.
"""
from flowcept import Flowcept, flowcept_task
from flowcept.instrumentation.flowcept_decorator import flowcept


@flowcept_task(output_names="o1")
def sum_one(i1):
    return i1 + 1


@flowcept_task(output_names="o2")
def mult_two(o1):
    return o1 * 2


@flowcept
def main():
    n = 3
    o1 = sum_one(n)
    o2 = mult_two(o1)
    print("Final output", o2)


if __name__ == "__main__":
    main()

    # print(Flowcept.read_buffer_file())  # inspect raw JSONL records if needed
    Flowcept.generate_report(print_markdown=True)

Inspecting the Output

Flowcept writes provenance messages to flowcept_buffer.jsonl. You should see two tasks:

[
  {
    "activity_id": "sum_one",
    "workflow_id": "fe546706-ef46-4482-8f70-3af664a7131b",
    "campaign_id": "76088532-3bef-4343-831e-d8a5d9156174",
    "used": {"i1": 3},
    "generated": {"o1": 4},
    "status": "FINISHED",
    "type": "task"
  },
  {
    "activity_id": "mult_two",
    "workflow_id": "fe546706-ef46-4482-8f70-3af664a7131b",
    "campaign_id": "76088532-3bef-4343-831e-d8a5d9156174",
    "used": {"o1": 4},
    "generated": {"o2": 8},
    "status": "FINISHED",
    "type": "task"
  }
]

Next Steps

Examples: