Ollama Shortcuts UI is an innovative project that bridges the gap between Ollama's local language models and Apple's Shortcuts app on Mac OS. This web interface allows users to interact with Ollama models through a user-friendly front-end, leveraging Shortcuts as an intermediary to handle API calls and process responses.
The purpose of this project is to build a fully local workflow engine that allows users to compose multi-step AI agent workflows using only Shortcuts and Ollama.
- Web Interface: A user-friendly dashboard for managing workflows, shortcuts, and Ollama model interactions.
- Workflow Composer: Create and edit complex workflows, including parallel branching.
- Shortcuts Library: Manage and use your Apple Shortcuts directly from the web interface.
- Form Builder: Create custom input forms for your workflows.
- Local Processing: All operations run locally, ensuring data privacy and security.
- Python 3.7+
- Git
- Ollama installed on your local machine
- Mac OS desktop or laptop computer with Shortcuts app
-
Clone the repository:
git clone https://github.com/elsheppo/ollama-shortcuts-ui.git cd ollama-shortcuts-ui
-
Run the local server:
python webui.py
-
Open your web browser and navigate to
http://localhost:8000
-
That's it. Everything should run with a default Python installation.
- Dashboard: Get an overview of your workflows and quick actions.
- Workflows: Create and manage workflows that integrate Shortcuts and Ollama operations.
- Shortcuts: View your available Apple Shortcuts. Add them to workflows for complex automations. Add descriptions to Shortcuts since currently they only show the title of the Shortcut with no context about what it does.
- Form Builder: Create custom input forms for your workflows.
- Settings: Configure Ollama API settings and other options.
Paste the Executable Ontology markdown file into Claude 3.5 Sonnet alongside a description of the workflow you want to design. Sometimes it may have an issue where it structures system prompts incorrectly with multi-line text. You can correct it by telling it to put the system prompt on a single line with no line breaks.
The workflow you get with this will be a linear workflow (no branching / merging) that you can import in OSUI via "Import Workflow". Then you can run the workflow!
Currently this executable ontology is designed to select from either gemma2:2b or llama3.1:latest from your available Ollama model files. If you don't have these models, or you want to change them, you can do this once the workflow is created based on your preferences.
We welcome contributions to Ollama Shortcuts UI! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
While we can't include Apple Shortcuts directly in this repository due to their proprietary format, we've created some starting blocks for you. Download it from the following iCloud links:
- OSUI, Block 1: Make this the starting block in a workflow.
- OSUI, Block N: Extend workflows after Block 1 using this block for each step.
- OSUI Function Router: Demo function calling block that can run the "Get Weather" action when the user asks about the weather.
- OSUI Function – Get Weather: Gets the weather in Austin using Apple Weather. To get the weather in your locality, change the City in the shortcut itself.
To use these Shortcuts:
- Click on the links above on your Mac
- Add the Shortcut to your library
- In the Ollama Shortcuts UI web interface, refresh your Shortcuts list to see the new additions
- The Ollama team for their amazing language model
- Apple for the powerful Shortcuts app
- All contributors and users of Ollama Shortcuts UI
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.