๐Ÿ“ฆ Stream29 / AiWorkflowActions

๐Ÿ“„ README.md ยท 62 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62# AiWorkflowActions

AI-powered workflow node generation for Dify workflows.

## Setup

1. Install dependencies:
```bash
uv sync
```

2. Set your Anthropic API key:
```bash
echo "ANTHROPIC_API_KEY=your_api_key_here" > .env
```

## Quick Start

### Interactive Mode
```bash
uv run python cli.py
```

### Load File Directly
```bash
uv run python cli.py resources/SimpleDsl.yml
```

## CLI Commands

| Command | Description |
|---------|-------------|
| `load <file>` | Load and validate workflow file |
| `nodes` | List all nodes in workflow |
| `detail --node <id>` | Show node details and JSON data |
| `generate --after <id> --type <type> [-m <message>]` | Generate new node with AI |
| `save <file>` | Save workflow to file |
| `help [command]` | Show help information |

## Generate Node Examples

```bash
# Basic generation
generate --after start_node --type llm

# With custom message
generate --after start_node --type code -m "Process JSON data"

# With title and message
generate --after start_node --type http-request --title "API Call" -m "Fetch user data"
```

## Supported Node Types

`start`, `end`, `answer`, `llm`, `code`, `http-request`, `tool`, `if-else`, `template-transform`, `variable-assigner`, `knowledge-retrieval`, `agent`, `iteration`, `parameter-extractor`, `question-classifier`, `iteration-start`, `loop-start`, `loop-end`, `variable-aggregator`, `document-extractor`, `list-operator`

## Validation

```bash
# Validate all DSL files
uv run python cli.py --validate-resources
```