This is a template project for creating Mira flows. The flows
directory contains some sample flows.
Before you start, please sign up using invitation code SRICITY
and get your Mira API key.
Note
Use uv for package management for a better and faster experience (optional)
- Set up environment
# Create and activate a Python virtual environment (optional but recommended) python -m venv .venv # on linux source .venv/bin/activate # on linux # Install dependencies pip install -e .
Warning
If you use Windows, then make sure to refer python docs for virtual environment setup.
-
Add your API key
# Create .env file and add your Mira API key echo "MIRA_API_KEY=your_api_key_here" > .env
-
Modify the flow
- Delete the content inside
flows
folder (they are just examples) - Create a
flows/{some_flow}.yaml
: (see examples in the flows directory) - Change
metadata.name
to your flow name - Change
metadata.author
to your Mira username - Modify
inputs
,model
, andprompt
for your use case
- Delete the content inside
-
Update the code
- Edit
hello.py
:- Change
flow_id
indeploy_flow()
to match your "author/flow-name" - Modify the sample input in
main()
to match your flow's requirements
- Change
- Edit
-
Run the flow
python hello.py
- Check your deployed flow at https://flows.mira.network/factory
flow.yaml
: Flow configuration (prompt, model, inputs)hello.py
: Python code to deploy and run the flow.env
: Environment variables (API key)pyproject.toml
: Project dependencies
- AI DJ that generates music based on your dance moves
- AI that generates recipe based on the ingredients you have at home
- AI that generates a song based on your favorite lyrics
- AI that predicts your mood based on your tone of voice
- AI that generates a workout routine based on your fitness goals
- AI that generates a poem based on your emotions
- AI that generates a video game based on your favorite games
- AI that generates a personalized meditation based on your brain waves
- AI that generates a fashion outfit based on your style
- AI that generates a personalized book based on your reading habits