Skip to content

Commit 943d5d1

Browse files
authored
Merge pull request #209 from satti-hari-krishna-reddy/master
Improved the instructions for setting up self hosted AI models in shuffle
2 parents 1164f59 + b9d9179 commit 943d5d1

File tree

1 file changed

+125
-19
lines changed

1 file changed

+125
-19
lines changed

docs/AI.md

Lines changed: 125 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
With AI becoming a larger part of the Automation space, the goal with AI at Shuffle is provide it in a controllable and responsible way. We do not intend to implement chat systems - just to make certain mechanisms in Shuffle easier to use over time.
44

55
## Using LLMs
6-
Shuffle by default provides LLM credits using the OpenAI GPT-5-mini model. This is available to a certain level to those who use our Cloud or Hybrid offerings. [Read about self-hosted models](#self-hosted-models).
6+
Shuffle by default provides LLM credits using the OpenAI GPT-5-mini model. This is available to a certain level to those who use our Cloud or Hybrid offerings. [Read about self-hosted models](#how-to-set-up-a-self-hosted-ai-model-with-shuffle).
77

88
## Singul
99
Singul works against vendor-locking with our translator for different providers of the same tools, such as Slack vs Teams vs Discord, or Splunk vs Elastic vs QRadar). It uses LLMs to understand the context of what you are trying to perform, and makes a determinsitic translation to use a standard such as OCSF or STIX. This is a powerful way to avoid vendor lock-in, and to make your automation more future-proof. Made by the Shuffle team.
@@ -24,39 +24,145 @@ They can additionally talk to each other and be published for third party use.
2424

2525
**This is in private Beta and is not generally available yet. If you would like to try it, please reach out to [email protected] and ask about AI Agents.**
2626

27-
## Workflow Generation
28-
AI Workflow generation is a great starting point.
27+
## How to Generate Your First Workflow with AI
28+
This guide will walk you through creating a complete, functional Shuffle workflow in seconds, just by describing what you want to do in plain English.
2929

30-
1. Go to the **Workflows** page.
31-
2. Click **Create Workflow**.
32-
3. Describe your workflow in natural language.
33-
4. Click **AI Generate**.
34-
5. The AI-generated workflow will appear. You can use it as is or modify it if needed
3530

36-
<img width="785" height="787" alt="AI_generate_page" src="https://github.com/user-attachments/assets/c756caf1-a32b-4b56-bd5a-81fc2ec879dd" />
31+
**Step 1: Navigate to the Workflow Page**
32+
* In the navigation sidebar on the left, click on "Workflows". This will take you to the `/workflows` page where you'll see your list of existing workflows.
3733

38-
## Self-Hosting models
34+
**Step 2: Start a New Workflow**
35+
* In the top right corner of the Workflows page, click the "Create Workflow" button.
3936

40-
For the open-source version, you need to provide details about your self-hosted AI model. If you haven't done this before, we recommend looking into [Ollama with the OpenAI gpt-oss model](https://ollama.com/blog/gpt-oss).
37+
<img width="1200" height="966" alt="create_workflow" src="https://github.com/user-attachments/assets/8938b032-db6f-4f25-b8bb-578f241c638c" />
4138

42-
[Ollama installation](https://ollama.com/)
39+
**Step 3: Describe Your Goal**
4340

44-
### Environment Variables
41+
****You have two options: writing a description or uploading a flowchart.****
42+
43+
####
44+
45+
***Option A: Write a Text Description***
46+
47+
<img width="600" height="650" alt="AI_generate_page" src="https://github.com/user-attachments/assets/c756caf1-a32b-4b56-bd5a-81fc2ec879dd" />
48+
49+
50+
51+
* At the top of the canvas, you will see a text box that says "Describe your workflow in natural language...". This is where the magic happens.
52+
* Click inside this box and type out the process you want to automate.
53+
54+
**Tips for a Great Description:**
55+
* **Be Specific:** Instead of "Check a URL," try "Check a URL in VirusTotal."
56+
* **Name Your Tools:** Mention the specific apps you want to use (e.g., "Open a ticket in Jira," "Send a message to Slack").
57+
58+
**Example Description:**
59+
When a phishing email is reported, get the URL from the email body. Check the URL's reputation in VirusTotal. If the score is above 5, create a new ticket in TheHive and send a high-priority alert to the 'security-alerts' channel in Slack.
60+
61+
***Option B: Upload a Flowchart Image***
62+
63+
If you prefer to visualize your process, you can upload an image of a flowchart. The AI will analyze the shapes, text, and connections in the diagram to build your workflow.
64+
65+
<img width="600" height="650" alt="flowchart" src="https://github.com/user-attachments/assets/a484e0ed-3f21-4a3c-a8f3-dbd333a893e4" />
66+
67+
* Look for the large box below the "Description" field that says "Generate Workflow from Flowchart" with a cloud upload icon.
68+
69+
* Click anywhere inside this box. This will open your computer's file browser.
70+
71+
* Select a flowchart image (e.g., a .png, .jpg, or .jpeg file up to 5MB in size) from your computer.
72+
73+
**Pro Tip:** Add a Description for Even Better Results
74+
Even after uploading your flowchart, we recommend adding a brief text description in the "Description" box (mentioned in Option A).
75+
76+
Think of this description as extra instructions for the AI model. It helps clarify any details or ambiguities in the flowchart and provides specific context, leading to an even more accurate and powerful workflow.
77+
78+
**Example description to add:**
79+
80+
This flowchart shows our phishing response process. The goal is to automate the URL check with VirusTotal and create a Jira ticket for malicious findings.
81+
82+
**Important Note for Self-Hosted Users:**
83+
The ability to process images depends entirely on your AI model. This feature is fully supported when using Shuffle Cloud's default model. If you are using a self-hosted model (like Ollama), you must ensure it is a multimodal model (one that can understand both text and images) for this feature to work correctly.
84+
85+
86+
**Step 4: Generate the Workflow**
87+
88+
* Once you are satisfied with your description or uploaded flowchart, click the 'AI Generate' button.
89+
* Wait a few moments. The AI will analyze your request and automatically build the workflow on the canvas, complete with the right apps and connections.
90+
91+
**Step 5: Review and Customize**
92+
* The AI-generated workflow is a powerful starting point. You can now:
93+
94+
* Click on each app to configure its specific settings (e.g., authenticating with your Jira account).
95+
96+
* Drag and drop new apps onto the canvas.
97+
98+
* Modify the connections between the apps.
99+
100+
**Congratulations! You've just built an automation workflow using AI.**
101+
102+
## How to set up a Self-Hosted AI Model with Shuffle
103+
104+
While Shuffle's Cloud platform provides AI credits to get you started, connecting your own self-hosted AI model gives you ultimate control and flexibility. This guide will walk you through the process.
105+
106+
**Before you configure Shuffle, please ensure you have the following ready:**
107+
108+
1. A Server to Run the AI: You need a computer that Shuffle can reach over the network. This can be a VM, physical server or a cloud instance.
109+
2. We recommend Ollama as the simplest way to run local AI models. Go to [Download Ollama](https://ollama.com/download) to install it on your server. After installation, make sure the Ollama service is running.
110+
3. Once Ollama is installed, you need a model for it to serve. For a great starting point, we recommend the gpt-oss model. It's a powerful and versatile model perfect for general tasks. (You can read more about it in Ollama's official announcement [here](https://ollama.com/blog/gpt-oss)). Of course, you can use any model available on Ollama. Our gpt-oss suggestion is just a recommendation to make getting started easy.
111+
112+
113+
Open your server's terminal and run this command:
45114

46115
```bash
47-
# URL of your AI server (required for self-hosted models)
116+
ollama run gpt-oss:20b
117+
```
118+
119+
### Setting Up Environment Variables in Shuffle
120+
121+
Once your self-hosted AI model is running, you can proceed with setting up the necessary environment variables in Shuffle.
122+
123+
**Step 1: Find Your AI Server Details**
124+
125+
You will need the following information from your self-hosted AI server:
126+
127+
* The full URL of the API (e.g., http://192.168.1.55:11434/v1).
128+
* The exact name of the model you want to use (e.g., llama3).
129+
* An API key (if your server requires authentication).
130+
131+
**Step 2: Set the Environment Variables**
132+
133+
`OPENAI_API_URL` (Required)
134+
135+
* What it is: The full URL to your AI server's API endpoint.
136+
137+
Example:
138+
```bash
48139
OPENAI_API_URL=http://localhost:11434/v1
140+
```
49141

50-
# API Key (optional if authentication is enabled)
51-
OPENAI_API_KEY=myapikey
142+
`AI_MODEL` (Required)
52143

53-
# Model to use (required)
54-
AI_MODEL=your-model-name
144+
* What it is: The exact name of the model you want Shuffle to use.
145+
146+
Example:
147+
```bash
148+
AI_MODEL=llama3
55149
```
56150

151+
OPENAI_API_KEY (Optional)
152+
153+
* What it is: The API key or token if your server requires authentication.
154+
155+
Example:
156+
```bash
157+
OPENAI_API_KEY=sk-mysecretkey123
158+
```
159+
160+
57161
Shuffle can support any self-hosted model that implements the OpenAI API interface. Examples include Ollama, local LLMs wrapped with OpenAI-compatible endpoints, or any other model that exposes the same API.
58162

59-
Once these are set, start your Shuffle backend server. The AI features will be automatically enabled, allowing you to use AI features.
163+
Once these are set, there is no need to restart your Shuffle backend server as the checks happen in real-time. The AI features will be automatically enabled, allowing you to use them immediately.
164+
165+
**Note: You need to refresh the Shuffle UI page in your browser for the new AI features to appear.**
60166

61167

62168
### Troubleshooting

0 commit comments

Comments
 (0)