abstractflow 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,413 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: abstractflow
3
- Version: 0.3.0
4
- Summary: Diagram-based AI workflow generation built on AbstractCore
5
- Author-email: AbstractFlow Team <contact@abstractflow.ai>
6
- Maintainer-email: AbstractFlow Team <contact@abstractflow.ai>
7
- License-Expression: MIT
8
- Project-URL: Homepage, https://github.com/lpalbou/AbstractFlow
9
- Project-URL: Documentation, https://abstractflow.readthedocs.io
10
- Project-URL: Repository, https://github.com/lpalbou/AbstractFlow
11
- Project-URL: Bug Tracker, https://github.com/lpalbou/AbstractFlow/issues
12
- Project-URL: Changelog, https://github.com/lpalbou/AbstractFlow/blob/main/CHANGELOG.md
13
- Keywords: ai,workflow,diagram,llm,automation,visual-programming,abstractcore,machine-learning
14
- Classifier: Development Status :: 2 - Pre-Alpha
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Intended Audience :: Science/Research
17
- Classifier: Operating System :: OS Independent
18
- Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Classifier: Topic :: System :: Distributed Computing
25
- Requires-Python: >=3.10
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE
28
- Requires-Dist: AbstractRuntime>=0.4.0
29
- Requires-Dist: abstractcore[tools]>=2.6.8
30
- Requires-Dist: pydantic>=2.0.0
31
- Requires-Dist: typing-extensions>=4.0.0
32
- Provides-Extra: agent
33
- Requires-Dist: abstractagent>=0.2.0; extra == "agent"
34
- Provides-Extra: dev
35
- Requires-Dist: pytest>=7.0.0; extra == "dev"
36
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
37
- Requires-Dist: black>=23.0.0; extra == "dev"
38
- Requires-Dist: isort>=5.12.0; extra == "dev"
39
- Requires-Dist: flake8>=6.0.0; extra == "dev"
40
- Requires-Dist: mypy>=1.0.0; extra == "dev"
41
- Requires-Dist: pre-commit>=3.0.0; extra == "dev"
42
- Provides-Extra: server
43
- Requires-Dist: fastapi>=0.100.0; extra == "server"
44
- Requires-Dist: uvicorn[standard]>=0.23.0; extra == "server"
45
- Requires-Dist: websockets>=11.0.0; extra == "server"
46
- Provides-Extra: ui
47
- Requires-Dist: streamlit>=1.28.0; extra == "ui"
48
- Requires-Dist: plotly>=5.15.0; extra == "ui"
49
- Requires-Dist: networkx>=3.1.0; extra == "ui"
50
- Provides-Extra: all
51
- Requires-Dist: abstractflow[agent,dev,server,ui]; extra == "all"
52
- Dynamic: license-file
53
-
54
- # AbstractFlow
55
-
56
- **Diagram-Based AI Workflow Generation**
57
-
58
- > **WIP** - Core workflow engine and visual editor are implemented and ready for use!
59
-
60
- AbstractFlow is an innovative Python library that enables visual, diagram-based creation and execution of AI workflows. Built on top of [AbstractCore](https://github.com/lpalbou/AbstractCore), it provides an intuitive interface for designing complex AI pipelines through interactive diagrams.
61
-
62
- ## Monorepo note (Abstract Framework)
63
-
64
- This repository is the **Abstract Framework monorepo**. The implementation in `abstractflow/abstractflow/*` (Flow/FlowRunner/compiler) and `abstractflow/abstractflow/visual/*` (VisualFlow models + portable executor) is aligned with `docs/architecture.md`.
65
-
66
- Some parts of this README (and `abstractflow/pyproject.toml` / `abstractflow/CHANGELOG.md`) were originally written for a standalone placeholder package and may be out of sync with the monorepo implementation. See `docs/architecture.md` and planned backlog `docs/backlog/planned/093-framework-packaging-alignment-flow-runtime.md`.
67
-
68
- ## 🎯 Vision
69
-
70
- AbstractFlow aims to democratize AI workflow creation by providing:
71
-
72
- - **Visual Workflow Design**: Create AI workflows using intuitive drag-and-drop diagrams
73
- - **Multi-Provider Support**: Leverage any LLM provider through AbstractCore's unified interface
74
- - **Real-time Execution**: Watch your workflows execute in real-time with live feedback
75
- - **Collaborative Development**: Share and collaborate on workflow designs
76
- - **Production Ready**: Deploy workflows to production with built-in monitoring and scaling
77
-
78
- ## 🚀 Planned Features
79
-
80
- ### Core Capabilities
81
- - **Diagram Editor**: Web-based visual editor for workflow creation
82
- - **Node Library**: Pre-built nodes for common AI operations (text generation, analysis, transformation)
83
- - **Custom Nodes**: Create custom nodes with your own logic and AI models
84
- - **Flow Control**: Conditional branching, loops, and parallel execution
85
- - **Data Transformation**: Built-in data processing and transformation capabilities
86
-
87
- ### AI Integration
88
- - **Universal LLM Support**: Works with OpenAI, Anthropic, Ollama, and all AbstractCore providers
89
- - **Tool Calling**: Seamless integration with external APIs and services
90
- - **Structured Output**: Type-safe data flow between workflow nodes
91
- - **Streaming Support**: Real-time processing for interactive applications
92
-
93
- ### Deployment & Monitoring
94
- - **Cloud Deployment**: One-click deployment to major cloud platforms
95
- - **Monitoring Dashboard**: Real-time workflow execution monitoring
96
- - **Version Control**: Git-based workflow versioning and collaboration
97
- - **API Generation**: Automatic REST API generation from workflows
98
-
99
- ## 🏗️ Architecture
100
-
101
- AbstractFlow is built on a robust foundation:
102
-
103
- ```
104
- ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
105
- │ Diagram UI │ │ Workflow Engine │ │ AbstractCore │
106
- │ │────│ │────│ │
107
- │ Visual Editor │ │ Execution Logic │ │ LLM Providers │
108
- └─────────────────┘ └─────────────────┘ └─────────────────┘
109
- ```
110
-
111
- - **Frontend**: React-based diagram editor with real-time collaboration
112
- - **Backend**: Python workflow execution engine with FastAPI
113
- - **AI Layer**: AbstractCore for unified LLM provider access
114
- - **Storage**: Workflow definitions, execution history, and metadata
115
-
116
- ## 🎨 Use Cases
117
-
118
- ### Business Process Automation
119
- - Customer support ticket routing and response generation
120
- - Document analysis and summarization pipelines
121
- - Content creation and review workflows
122
-
123
- ### Data Processing
124
- - Multi-step data analysis with AI insights
125
- - Automated report generation from raw data
126
- - Real-time data enrichment and validation
127
-
128
- ### Creative Workflows
129
- - Multi-stage content creation (research → draft → review → publish)
130
- - Interactive storytelling and narrative generation
131
- - Collaborative writing and editing processes
132
-
133
- ### Research & Development
134
- - Hypothesis generation and testing workflows
135
- - Literature review and synthesis automation
136
- - Experimental design and analysis pipelines
137
-
138
- ## 🛠️ Technology Stack
139
-
140
- - **Core**: Python 3.10+ (aligns with AbstractRuntime)
141
- - **AI Integration**: [AbstractCore](https://github.com/lpalbou/AbstractCore) for LLM provider abstraction
142
- - **Web Framework**: FastAPI for high-performance API server
143
- - **Frontend**: React with TypeScript for the diagram editor
144
- - **Database**: PostgreSQL for workflow storage, Redis for caching
145
- - **Deployment**: Docker containers with Kubernetes support
146
-
147
- ## 📦 Installation
148
-
149
- ```bash
150
- # Clone the repository
151
- git clone https://github.com/lpalbou/AbstractFlow.git
152
- cd AbstractFlow
153
-
154
- # Install core dependencies
155
- pip install -e .
156
-
157
- # Or install with web editor dependencies
158
- pip install -e .[server]
159
-
160
- # Development installation (includes tests)
161
- pip install -e .[dev]
162
- ```
163
-
164
- ### Dependencies
165
-
166
- AbstractFlow requires:
167
- - Python 3.10+ (aligns with AbstractRuntime)
168
- - [AbstractRuntime](https://github.com/lpalbou/AbstractRuntime) - Workflow execution engine
169
- - [AbstractCore](https://github.com/lpalbou/AbstractCore) - LLM provider abstraction
170
-
171
- For the visual editor:
172
- - Node.js 18+ (for frontend)
173
- - FastAPI, uvicorn, websockets (for backend)
174
-
175
- ## 🚀 Quick Start
176
-
177
- ### Programmatic API
178
-
179
- ```python
180
- from abstractflow import Flow, FlowRunner
181
-
182
- # Create a flow
183
- flow = Flow("my-workflow")
184
-
185
- # Add function nodes
186
- def double(x):
187
- return x * 2
188
-
189
- def add_ten(x):
190
- return x + 10
191
-
192
- flow.add_node("double", double, input_key="value", output_key="doubled")
193
- flow.add_node("add_ten", add_ten, input_key="doubled", output_key="result")
194
-
195
- # Connect nodes
196
- flow.add_edge("double", "add_ten")
197
- flow.set_entry("double")
198
-
199
- # Execute the flow
200
- runner = FlowRunner(flow)
201
- result = runner.run({"value": 5})
202
- print(result) # {"value": 5, "doubled": 10, "result": 20}
203
- ```
204
-
205
- ### With Agents
206
-
207
- ```python
208
- from abstractflow import Flow, FlowRunner
209
- from abstractagent import create_react_agent
210
-
211
- # Create an agent
212
- planner = create_react_agent(provider="ollama", model="qwen3:4b-instruct-2507-q4_K_M")
213
-
214
- # Create flow with agent node
215
- flow = Flow("agent-workflow")
216
- flow.add_node("plan", planner, input_key="task", output_key="plan")
217
- flow.set_entry("plan")
218
-
219
- # Run
220
- runner = FlowRunner(flow)
221
- result = runner.run({"task": "Plan a weekend trip to Paris"})
222
- print(result["plan"])
223
- ```
224
-
225
- ### Nested Flows (Subflows)
226
-
227
- ```python
228
- # Create a subflow
229
- inner_flow = Flow("processing")
230
- inner_flow.add_node("step1", lambda x: x.upper())
231
- inner_flow.add_node("step2", lambda x: f"[{x}]")
232
- inner_flow.add_edge("step1", "step2")
233
- inner_flow.set_entry("step1")
234
-
235
- # Use subflow in parent flow
236
- outer_flow = Flow("main")
237
- outer_flow.add_node("preprocess", lambda x: x.strip())
238
- outer_flow.add_node("process", inner_flow) # Subflow as node
239
- outer_flow.add_node("postprocess", lambda x: x + "!")
240
- outer_flow.add_edge("preprocess", "process")
241
- outer_flow.add_edge("process", "postprocess")
242
- outer_flow.set_entry("preprocess")
243
-
244
- runner = FlowRunner(outer_flow)
245
- result = runner.run({"input": " hello "})
246
- ```
247
-
248
- ## 🖥️ Visual Workflow Editor
249
-
250
- AbstractFlow includes a state-of-the-art web-based visual editor inspired by Unreal Engine Blueprints:
251
-
252
- ### Features
253
- - **Blueprint-Style Nodes**: Drag-and-drop nodes with typed, colored pins
254
- - **Real-time Execution**: Watch workflows execute with live node highlighting via WebSocket
255
- - **Monaco Code Editor**: Write custom Python code directly in nodes
256
- - **Type-Safe Connections**: Pin type validation prevents incompatible connections
257
- - **Export/Import**: Save and load workflows as JSON
258
-
259
- ### Blueprint-Style Pin Types
260
-
261
- | Type | Color | Shape | Description |
262
- |------|-------|-------|-------------|
263
- | **Execution** | White `#FFFFFF` | ▷ Triangle | Flow control |
264
- | **String** | Magenta `#FF00FF` | ○ Circle | Text data |
265
- | **Number** | Green `#00FF00` | ○ Circle | Integer/Float |
266
- | **Boolean** | Red `#FF0000` | ◇ Diamond | True/False |
267
- | **Object** | Cyan `#00FFFF` | ○ Circle | JSON objects |
268
- | **Array** | Orange `#FF8800` | □ Square | Collections |
269
- | **Agent** | Blue `#4488FF` | ⬡ Hexagon | Agent reference |
270
- | **Any** | Gray `#888888` | ○ Circle | Accepts any type |
271
-
272
- ### Built-in Node Categories
273
-
274
- - **Core**: Agent, Subflow, Python Code
275
- - **Math**: Add, Subtract, Multiply, Divide, Modulo, Power, Abs, Round, Min, Max
276
- - **String**: Concat, Split, Join, Format, Uppercase, Lowercase, Trim, Substring, Length, Replace
277
- - **Control**: If/Else, Compare, NOT, AND, OR
278
- - **Data**: Get Property, Set Property, Merge Objects
279
-
280
- ### Running the Visual Editor
281
-
282
- ```bash
283
- # 1. Create virtual environment and install dependencies
284
- cd abstractflow
285
- python3 -m venv .venv
286
- source .venv/bin/activate
287
-
288
- # Prefer editable installs over PYTHONPATH hacks so dependency wiring matches real installs.
289
- pip install -e "../abstractcore[tools]"
290
- pip install -e "../abstractruntime[abstractcore]"
291
- pip install -e "../abstractagent"
292
- pip install -e ".[server,agent]"
293
-
294
- # 2. Start backend server (run from web/ so `backend.*` is importable)
295
- cd web
296
- uvicorn backend.main:app --port 8080 --reload
297
-
298
- # 3. In a new terminal, start frontend dev server
299
- cd abstractflow/web/frontend
300
- npm install
301
- npm run dev
302
- ```
303
-
304
- Then open http://localhost:3000 in your browser.
305
-
306
- **Production mode** (serve frontend from backend):
307
- ```bash
308
- # Build frontend
309
- cd web/frontend && npm run build && cd ../..
310
-
311
- # Run backend only (serves frontend from dist/)
312
- cd web
313
- uvicorn backend.main:app --port 8080
314
-
315
- # Open http://localhost:8080
316
- ```
317
-
318
- ### Project Structure
319
-
320
- ```
321
- web/
322
- ├── backend/ # FastAPI backend
323
- │ ├── main.py # App entry with CORS, static files
324
- │ ├── models.py # Pydantic models (VisualNode, VisualEdge, VisualFlow)
325
- │ ├── routes/
326
- │ │ ├── flows.py # Flow CRUD endpoints
327
- │ │ └── ws.py # WebSocket for real-time execution
328
- │ └── services/
329
- │ ├── executor.py # VisualFlow → AbstractFlow conversion
330
- │ ├── builtins.py # 26 built-in function handlers
331
- │ └── code_executor.py # Sandboxed Python execution
332
- ├── frontend/ # React + TypeScript frontend
333
- │ ├── src/
334
- │ │ ├── components/
335
- │ │ │ ├── Canvas.tsx # React Flow canvas
336
- │ │ │ ├── NodePalette.tsx # Categorized node picker
337
- │ │ │ ├── PropertiesPanel.tsx
338
- │ │ │ ├── Toolbar.tsx # Run/Save/Export/Import
339
- │ │ │ └── nodes/
340
- │ │ │ ├── BaseNode.tsx # Blueprint-style node
341
- │ │ │ └── CodeNode.tsx # Monaco editor node
342
- │ │ ├── hooks/
343
- │ │ │ ├── useFlow.ts # Zustand state management
344
- │ │ │ └── useWebSocket.ts # Real-time updates
345
- │ │ ├── types/
346
- │ │ │ ├── flow.ts # TypeScript types, PIN_COLORS
347
- │ │ │ └── nodes.ts # Node templates
348
- │ │ └── styles/ # Dark theme CSS
349
- │ └── package.json
350
- └── requirements.txt # Backend Python dependencies
351
- ```
352
-
353
- ## 🎯 Roadmap
354
-
355
- ### Phase 1: Foundation ✅ Complete
356
- - [x] Core workflow engine (Flow, FlowNode, FlowEdge)
357
- - [x] Basic node types (Agent, Function, Subflow)
358
- - [x] Flow compilation to WorkflowSpec
359
- - [x] FlowRunner execution via Runtime
360
- - [x] State passing between nodes with dot notation
361
-
362
- ### Phase 2: Visual Editor ✅ Complete
363
- - [x] Web-based diagram editor with React Flow
364
- - [x] Blueprint-style pins with colors and shapes
365
- - [x] 26 built-in function nodes (math, string, control, data)
366
- - [x] Custom Python code nodes with Monaco editor
367
- - [x] Export/Import JSON functionality
368
- - [x] Real-time execution updates via WebSocket
369
-
370
- ### Phase 3: Advanced Features (Planned)
371
- - [ ] Custom node development SDK
372
- - [ ] Advanced flow control (loops, parallel execution)
373
- - [ ] Monitoring and analytics dashboard
374
- - [ ] Cloud deployment integration
375
-
376
- ### Phase 4: Enterprise (Planned)
377
- - [ ] Enterprise security features
378
- - [ ] Advanced monitoring and alerting
379
- - [ ] Multi-tenant support
380
- - [ ] Professional services and support
381
-
382
- ## 🤝 Contributing
383
-
384
- We welcome contributions from the community! Once development begins, you'll be able to:
385
-
386
- - Report bugs and request features
387
- - Submit pull requests for improvements
388
- - Create and share workflow templates
389
- - Contribute to documentation
390
-
391
- ## 📄 License
392
-
393
- AbstractFlow will be released under the MIT License, ensuring it remains free and open-source for all users.
394
-
395
- ## 🔗 Related Projects
396
-
397
- - **[AbstractCore](https://github.com/lpalbou/AbstractCore)**: The unified LLM interface powering AbstractFlow
398
- - **[AbstractCore Documentation](http://www.abstractcore.ai/)**: Comprehensive guides and API reference
399
-
400
- ## 📞 Contact
401
-
402
- For early access, partnerships, or questions about AbstractFlow:
403
-
404
- - **GitHub**: [Issues and Discussions](https://github.com/lpalbou/AbstractFlow) (coming soon)
405
- - **Email**: Contact through AbstractCore channels
406
- - **Website**: [www.abstractflow.ai](http://www.abstractflow.ai) (coming soon)
407
-
408
- ---
409
-
410
- **AbstractFlow** - Visualize, Create, Execute. The future of AI workflow development is here.
411
-
412
- > Built on top of [AbstractCore](https://github.com/lpalbou/AbstractCore)
413
-
@@ -1,32 +0,0 @@
1
- abstractflow/__init__.py,sha256=JmKIZdCD2A4w6Tqt06oap0G3nJfFs2uKGp_91PMlYi8,2586
2
- abstractflow/__main__.py,sha256=nl-6C1KVPCcPfrIM67zYnyotsKI8XaNpIsNJ1EZ6S5w,175
3
- abstractflow/cli.py,sha256=Zm3RFmn3IvaEGjV0_O-Cx52yTPDvF9fJXevNHKAiz8Q,1237
4
- abstractflow/compiler.py,sha256=FCVVi_DZUDRgtg9Hxt695UsyM7JH85CkhtAXxAn30ug,88528
5
- abstractflow/py.typed,sha256=QjzTvd0siCmvIPhJL7u61TKvbkV9Ba_WXrDMoyIZ3Fc,76
6
- abstractflow/runner.py,sha256=v-da9yvX74laLJY6_FwpMm-5WPZ-71qq7D9e6bvXYFM,14123
7
- abstractflow/adapters/__init__.py,sha256=1My7MaQqrg9DRGNR3fq0PSGfs06ZpzuwHJnj7LRqX9A,360
8
- abstractflow/adapters/agent_adapter.py,sha256=ynnHwfpfyREGNoyyTDLxE_0C3N59j_o_xWyn8sDS08k,4539
9
- abstractflow/adapters/control_adapter.py,sha256=jTUY6lmq7s4mllf23bQ81hFo8uYnrt7HAKOC5MILaHM,22368
10
- abstractflow/adapters/effect_adapter.py,sha256=oHSmrOWAnVnWPrVNtf8B4jME8p5KqK8ee_1PSdaGMu8,21020
11
- abstractflow/adapters/event_adapter.py,sha256=x9_u5MOr3USAYsS8Y4u3JkZjto31K-NpNsGN6SIwcdM,11236
12
- abstractflow/adapters/function_adapter.py,sha256=QGqkZ4tPTy2H5isz1dur3i6tObVWJ4r3Z2lbdOi3suQ,3040
13
- abstractflow/adapters/subflow_adapter.py,sha256=NVD5iIiQdbmMUPrYJ0kocpTIaxlNqVOEDgw1DFQsUgI,2567
14
- abstractflow/adapters/variable_adapter.py,sha256=kunfTIPYvfbqtKd3_XfenyOTlXLUsViJVDFYGsm1TXI,12991
15
- abstractflow/core/__init__.py,sha256=1Qo2qFHgi49nTwGYQaLv9ywwSR6kwRNQQoZFjqXzPmU,120
16
- abstractflow/core/flow.py,sha256=YAEXUwptshR0E2er9vY6s-oSGnPemPjLLTGCLlezWTE,7918
17
- abstractflow/visual/__init__.py,sha256=R8pahi0TZ5-mpxR8PXgni_YUiJKQdJZYcNpE9QjnP9I,965
18
- abstractflow/visual/agent_ids.py,sha256=o3ajBWshM5o3t7uhKfZm8AxWVN0Bnw8ph3KB_UaCLWE,875
19
- abstractflow/visual/builtins.py,sha256=lXqmtAMabNoZJG7ZRQwhsjwSXi9HkXVbAbzpqtfYihM,24336
20
- abstractflow/visual/code_executor.py,sha256=Kc30O5JG0Weh9yHAQclEeCocuEOc7T1Wp7E5cfcgf58,7612
21
- abstractflow/visual/event_ids.py,sha256=NzSry5Omjbxnn163CP5PJ3CQJ2dXo-Flf5sBROLjeYQ,858
22
- abstractflow/visual/executor.py,sha256=VVli7rXSkEFAgPDvS-d8yuhJI8Mv2u2KTf-o9RkLgzM,119068
23
- abstractflow/visual/interfaces.py,sha256=tHRVZAlFAr93W-TJ4tobYKToTlE6h9bXmCa7xb3Ahi8,12817
24
- abstractflow/visual/models.py,sha256=aIPc1l5QixfE-SXoCOJGrHHM2E6isgVwYo805CdZAbY,7356
25
- abstractflow/visual/session_runner.py,sha256=J1qO6poNmWoB8wquj2HF-a_JZtzPw7WfE0wmsBInt7o,6892
26
- abstractflow/visual/workspace_scoped_tools.py,sha256=risXCTPtOdsU_paAtwr27LmINm2sEkGmqBZSXa6F3Vs,9555
27
- abstractflow-0.3.0.dist-info/licenses/LICENSE,sha256=_zpmvJ804El0O63VB5CWtADw0TccHWYvCRLm9c05blM,1076
28
- abstractflow-0.3.0.dist-info/METADATA,sha256=AcinDcHS6-MLHfglnHl4zOUh5AkgMTpmVSooc_hti2c,15914
29
- abstractflow-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
30
- abstractflow-0.3.0.dist-info/entry_points.txt,sha256=Gc916Xwp7HMEOUlxFYHn7lMRrOT3Ah0Q_3tP9S8LHP0,55
31
- abstractflow-0.3.0.dist-info/top_level.txt,sha256=bimZZ-20W8CxqozcCSWc_NlDus4gBMlKsMZC7xQxzww,13
32
- abstractflow-0.3.0.dist-info/RECORD,,