Discovery System
How Bifrost automatically finds and registers your workflows
Discovery System
Section titled “Discovery System”Bifrost automatically discovers workflows and data providers in your workspace. Just write your code with decorators—the platform finds and registers it for you.
How It Works
Section titled “How It Works”When you add a Python file with a @workflow or @data_provider decorator:
- Bifrost scans your workspace for
.pyfiles - Decorators register your functions automatically
- Your workflow appears in the UI and becomes executable
No configuration files, no manual registration—it just works.
Making Your Workflows Discoverable
Section titled “Making Your Workflows Discoverable”Create a Python file anywhere in your workspace
Section titled “Create a Python file anywhere in your workspace”from bifrost import workflow, param
@workflow( name="send_email", description="Send email notification", category="communications")@param("recipient", type="email", required=True)@param("subject", type="string", required=True)async def send_email(context, recipient: str, subject: str): # Your code here return {"sent": True}That’s it! Your workflow now appears in the UI and can be executed.
Data providers work the same way
Section titled “Data providers work the same way”from bifrost import data_provider
@data_provider( name="get_licenses", description="Available M365 licenses")async def get_licenses(context): return [ {"label": "Microsoft 365 E3", "value": "SPE_E3"}, {"label": "Microsoft 365 E5", "value": "SPE_E5"} ]Use it in form dropdowns: dataProvider="get_licenses"
Rules for Discovery
Section titled “Rules for Discovery”Your files must follow these simple rules:
- Use the
.pyextension - Only Python files are discovered - Don’t start filenames with
_- Files like_helpers.pyare ignored - Use the
@workflowor@data_providerdecorator - Undecorated functions won’t appear - Import from
bifrost- Usefrom bifrost import workflow, param
Quick Example
Section titled “Quick Example”Create a file: /workspace/create_user.py
from bifrost import workflow, param
@workflow( name="create_user", description="Create a new user account")@param("email", type="email", required=True)@param("first_name", type="string", required=True)@param("last_name", type="string", required=True)async def create_user(context, email: str, first_name: str, last_name: str): # Your user creation logic return {"success": True, "email": email}Result: Your workflow immediately appears in the Workflows page and can be executed via forms or API.
Common Issues
Section titled “Common Issues”My workflow isn’t appearing
Section titled “My workflow isn’t appearing”- Check your decorator - Make sure you have
@workflow(name="...")above your function - Check your imports - Use
from bifrost import workflow, param - Check your filename - Files starting with
_are ignored (like_helpers.py) - Check for errors - Look at the application logs for import errors
My parameters aren’t showing in forms
Section titled “My parameters aren’t showing in forms”-
Put
@paramafter@workflow@workflow(name="test") # First@param("name", ...) # Then paramsasync def test(context, name):pass -
Match parameter names to function arguments
@param("email", ...) # Must match...async def create_user(context, email): # ...thispass