Skip to content

Build Your First Workflow

Create and execute a workflow in 10 minutes

Learn by building a simple greeting workflow with parameters and validation.

A workflow that accepts a name and returns a personalized greeting.

  1. Open the Code Editor from the header.

    alt text

  2. Create a new file called hello_world.py:

    alt text

    from bifrost import workflow
    import logging
    logger = logging.getLogger(__name__)
    @workflow(category="Examples")
    async def hello_world(name: str):
    """A simple greeting workflow."""
    logger.info(f"Generating greeting for {name}")
    greeting = f"Hello, {name}! Welcome to Bifrost."
    return {"greeting": greeting, "name": name}

    Note how the decorator infers:

    • name: "hello_world" from the function name
    • description: "A simple greeting workflow." from the docstring
    • parameters: name (required string) from the function signature
  3. Hit CTRL/CMD + S to save.

  4. Navigate to WorkflowsExamplesHello World

    alt text

  5. Click Execute, enter your name, and click Run

alt text

{
"greeting": "Hello, Alice! Welcome to Bifrost.",
"name": "Alice"
}

Navigate to Executions to see all runs with logs and results.