abstractflow 0.3.0__tar.gz → 0.3.1__tar.gz
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.
- {abstractflow-0.3.0 → abstractflow-0.3.1}/CHANGELOG.md +19 -15
- abstractflow-0.3.1/PKG-INFO +186 -0
- abstractflow-0.3.1/README.md +133 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/__init__.py +2 -2
- abstractflow-0.3.1/abstractflow/adapters/agent_adapter.py +5 -0
- abstractflow-0.3.1/abstractflow/adapters/control_adapter.py +5 -0
- abstractflow-0.3.1/abstractflow/adapters/effect_adapter.py +5 -0
- abstractflow-0.3.1/abstractflow/adapters/event_adapter.py +5 -0
- abstractflow-0.3.1/abstractflow/adapters/function_adapter.py +5 -0
- abstractflow-0.3.1/abstractflow/adapters/subflow_adapter.py +5 -0
- abstractflow-0.3.1/abstractflow/adapters/variable_adapter.py +5 -0
- abstractflow-0.3.1/abstractflow/cli.py +89 -0
- abstractflow-0.3.1/abstractflow/compiler.py +23 -0
- abstractflow-0.3.1/abstractflow/core/flow.py +11 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/runner.py +59 -5
- abstractflow-0.3.1/abstractflow/visual/agent_ids.py +5 -0
- abstractflow-0.3.1/abstractflow/visual/builtins.py +5 -0
- abstractflow-0.3.1/abstractflow/visual/code_executor.py +5 -0
- abstractflow-0.3.1/abstractflow/visual/executor.py +968 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/visual/interfaces.py +103 -10
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/visual/models.py +26 -1
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/visual/session_runner.py +23 -9
- abstractflow-0.3.1/abstractflow/visual/workspace_scoped_tools.py +29 -0
- abstractflow-0.3.1/abstractflow/workflow_bundle.py +290 -0
- abstractflow-0.3.1/abstractflow.egg-info/PKG-INFO +186 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow.egg-info/SOURCES.txt +19 -1
- {abstractflow-0.3.0 → abstractflow-0.3.1}/pyproject.toml +1 -1
- abstractflow-0.3.1/tests/test_gateway_connection_config.py +57 -0
- abstractflow-0.3.1/tests/test_gateway_token_resolution.py +38 -0
- abstractflow-0.3.1/tests/test_kg_ingest_output_budget_defaults.py +57 -0
- abstractflow-0.3.1/tests/test_ltm_ai_kg_extract_triples_defaults.py +38 -0
- abstractflow-0.3.1/tests/test_ltm_ai_kg_extract_triples_gate_normalization.py +126 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_role_workflows_are_valid_and_sota.py +7 -9
- abstractflow-0.3.1/tests/test_runtime_visualflow_compiler_shim.py +53 -0
- abstractflow-0.3.1/tests/test_semantic_extraction_multi_source_evidence_bundle.py +157 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_agent_scratchpad_output.py +10 -1
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_agent_system_prompt_and_tools_override.py +12 -1
- abstractflow-0.3.1/tests/test_visual_format_tool_results_node.py +84 -0
- abstractflow-0.3.1/tests/test_visual_interfaces.py +156 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_llm_call_integration.py +22 -3
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_llm_call_tools_and_result_output.py +16 -6
- abstractflow-0.3.1/tests/test_visual_memory_kg_nodes.py +436 -0
- abstractflow-0.3.1/tests/test_visual_memory_kg_session_scope.py +180 -0
- abstractflow-0.3.1/tests/test_visual_models_accept_add_message_node.py +7 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_answer_user.py +1 -2
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_memory_effects.py +1 -2
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_memory_rehydrate_effect.py +1 -2
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_subflow.py +4 -4
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_waiting.py +1 -1
- abstractflow-0.3.1/tests/test_visualflow_to_workflow_artifact_compiler.py +38 -0
- abstractflow-0.3.1/tests/test_web_execution_workspace.py +33 -0
- abstractflow-0.3.1/tests/test_web_memory_kg_query_api.py +160 -0
- abstractflow-0.3.1/tests/test_web_workspace_scoped_tools.py +108 -0
- abstractflow-0.3.1/tests/test_workflow_artifact_compiles_all_web_flows.py +25 -0
- abstractflow-0.3.1/tests/test_workflow_artifact_executes_real_visualflow_json.py +47 -0
- abstractflow-0.3.1/tests/test_workflow_bundle_pack.py +52 -0
- abstractflow-0.3.0/PKG-INFO +0 -413
- abstractflow-0.3.0/README.md +0 -360
- abstractflow-0.3.0/abstractflow/adapters/agent_adapter.py +0 -124
- abstractflow-0.3.0/abstractflow/adapters/control_adapter.py +0 -615
- abstractflow-0.3.0/abstractflow/adapters/effect_adapter.py +0 -645
- abstractflow-0.3.0/abstractflow/adapters/event_adapter.py +0 -307
- abstractflow-0.3.0/abstractflow/adapters/function_adapter.py +0 -97
- abstractflow-0.3.0/abstractflow/adapters/subflow_adapter.py +0 -74
- abstractflow-0.3.0/abstractflow/adapters/variable_adapter.py +0 -317
- abstractflow-0.3.0/abstractflow/cli.py +0 -44
- abstractflow-0.3.0/abstractflow/compiler.py +0 -2027
- abstractflow-0.3.0/abstractflow/core/flow.py +0 -247
- abstractflow-0.3.0/abstractflow/visual/agent_ids.py +0 -29
- abstractflow-0.3.0/abstractflow/visual/builtins.py +0 -789
- abstractflow-0.3.0/abstractflow/visual/code_executor.py +0 -214
- abstractflow-0.3.0/abstractflow/visual/executor.py +0 -2789
- abstractflow-0.3.0/abstractflow/visual/workspace_scoped_tools.py +0 -261
- abstractflow-0.3.0/abstractflow.egg-info/PKG-INFO +0 -413
- abstractflow-0.3.0/tests/test_visual_interfaces.py +0 -82
- abstractflow-0.3.0/tests/test_web_workspace_scoped_tools.py +0 -51
- {abstractflow-0.3.0 → abstractflow-0.3.1}/LICENSE +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/MANIFEST.in +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/__main__.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/adapters/__init__.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/core/__init__.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/py.typed +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/visual/__init__.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow/visual/event_ids.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow.egg-info/dependency_links.txt +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow.egg-info/entry_points.txt +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow.egg-info/requires.txt +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/abstractflow.egg-info/top_level.txt +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/setup.cfg +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/setup.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_compiler.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_flow.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_python_code_node_params.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_runner.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_sequence_parallel_nodes.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_switch_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_system_datetime_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_agent_reentry_re_resolves_inputs.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_agent_structured_output_pin.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_agent_tool_serialization.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_agent_trace_report_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_bool_var_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_custom_events.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_file_nodes.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_for_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_if_branching.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ignores_unreachable_nodes.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_llm_call_structured_output_pin.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_loop_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_loop_pure_node_invalidation.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_parse_json_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_pin_defaults.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_pure_nodes.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_resume_rehydrates_node_outputs.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_set_var_typed_defaults.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_split_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_stringify_json_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_subflow_recursion.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_subflow_registry_reachability.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_tool_calls_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_tools_allowlist_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_var_decl_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_variables_nodes.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_while_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_while_pure_node_invalidation.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_workflow_io.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_agent_node_lifecycle.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_custom_events_order.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_delay_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_nested_subworkflow_descendants.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_observability.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_on_schedule_node.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_run_controls.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_run_controls_responsive.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_run_ids_for_child_runs.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_visual_ws_trace_update_streaming.py +0 -0
- {abstractflow-0.3.0 → abstractflow-0.3.1}/tests/test_web_backend_dev_import_paths.py +0 -0
|
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
|
-
- **AbstractCode UI event demo flows** (`
|
|
11
|
+
- **AbstractCode UI event demo flows** (`web/flows/*.json`):
|
|
12
12
|
- `acagent_message_demo.json`: `abstractcode.message`
|
|
13
13
|
- `acagent_ask_demo.json`: durable ask+wait via `wait_event.prompt`
|
|
14
14
|
- `acagent_tool_events_demo.json`: `abstractcode.tool_execution` + `abstractcode.tool_result`
|
|
@@ -19,15 +19,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
19
|
- `Stringify JSON` (`stringify_json`): Render JSON (or JSON-ish strings) into text with a `mode` dropdown (`none` | `beautify` | `minified`). Implementation delegates to `abstractruntime.rendering.stringify_json` for consistent host behavior.
|
|
20
20
|
- `Agent Trace Report` (`agent_trace_report`): Render an agent scratchpad (`node_traces`) into a condensed Markdown timeline of LLM calls and tool actions (full tool args + results, no truncation). Implementation delegates to `abstractruntime.rendering.render_agent_trace_markdown`.
|
|
21
21
|
|
|
22
|
+
### Changed
|
|
23
|
+
- **Run Flow modal (array parameters)**: Array pins now render as a Blueprint-style item list (add/remove items) with a "Raw JSON (advanced)" escape hatch for non-string arrays.
|
|
24
|
+
|
|
22
25
|
### Fixed
|
|
23
26
|
- **FlowRunner SUBWORKFLOW auto-drive**: `FlowRunner.run()` no longer hangs if the runtime registry contains only subworkflow specs (common in unit tests). It now falls back to the runner’s own root `WorkflowSpec` when resuming/bubbling parents.
|
|
24
27
|
|
|
28
|
+
## [0.3.1] - 2026-02-04
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- **User-facing documentation set** for public release:
|
|
32
|
+
- Core docs: `README.md`, `docs/getting-started.md`, `docs/architecture.md`, `docs/api.md`, `docs/faq.md`
|
|
33
|
+
- Repo policies: `CONTRIBUTING.md`, `SECURITY.md`, `ACKNOWLEDMENTS.md`
|
|
34
|
+
- Agentic index: `llms.txt`, `llms-full.txt`
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
- **Documentation accuracy + structure**: refreshed docs to match the implemented code (VisualFlow portability, runtime wiring, CLI bundle tooling, web editor layout) and improved cross-references for first-time users.
|
|
38
|
+
|
|
25
39
|
## [0.3.0] - 2025-01-06
|
|
26
40
|
|
|
27
41
|
### Added
|
|
28
42
|
- **VisualFlow Interface System** (`abstractflow/visual/interfaces.py`): Declarative workflow interface markers for portable host validation, enabling workflows to be run as specialized capabilities with known IO contracts
|
|
29
|
-
- `abstractcode.agent.v1` interface: Host-configurable
|
|
30
|
-
- Interface validation with required/recommended pin specifications (provider/model/tools/
|
|
43
|
+
- `abstractcode.agent.v1` interface: Host-configurable prompt → response contract for running a workflow as an AbstractCode agent
|
|
44
|
+
- Interface validation with required/recommended pin specifications (provider/model/tools/prompt/response)
|
|
31
45
|
- Auto-scaffolding support: enabling `abstractcode.agent.v1` auto-creates `On Flow Start` / `On Flow End` nodes with required pins
|
|
32
46
|
- **Structured Output Support**: Visual `LLM Call` and `Agent` nodes accept optional `response_schema` input pin (JSON Schema object) for schema-conformant responses
|
|
33
47
|
- New literal node `JSON Schema` (`json_schema`) to author schema objects
|
|
@@ -133,7 +147,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
133
147
|
- Run history replay synthesizes missing `node_complete` events for steps left open in durable ledger
|
|
134
148
|
- **Canvas Highlighting**: Robust to fast child-run emissions (race with `node_start` before `runId` state update fixed)
|
|
135
149
|
- **WebSocket Subworkflow Waits**: Correctly close waiting node when run resumes past `WAITING(reason=SUBWORKFLOW)`
|
|
136
|
-
- **Web Run History**: Reliably shows persisted runs regardless of server working directory (backend defaults to `
|
|
150
|
+
- **Web Run History**: Reliably shows persisted runs regardless of server working directory (backend defaults to `web/runtime` unless `ABSTRACTFLOW_RUNTIME_DIR` set)
|
|
137
151
|
- **Cancel Run**: No longer surfaces as `flow_error` from `asyncio.CancelledError` (treated as expected control-plane operation)
|
|
138
152
|
- **Markdown Code Blocks**: "Copy" now copies original raw code (preserves newlines/indentation) after syntax highlighting
|
|
139
153
|
|
|
@@ -147,15 +161,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
147
161
|
- 12 new example workflow JSON files in `web/flows/`
|
|
148
162
|
|
|
149
163
|
### Notes
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
### Planned
|
|
153
|
-
- Visual workflow editor with drag-and-drop interface
|
|
154
|
-
- Real-time workflow execution and monitoring
|
|
155
|
-
- Integration with AbstractCore for multi-provider LLM support
|
|
156
|
-
- Custom node development SDK
|
|
157
|
-
- Cloud deployment capabilities
|
|
158
|
-
- Collaborative workflow development features
|
|
164
|
+
- This repository includes the published Python package (`abstractflow/`) and a reference visual editor app (`web/`).
|
|
159
165
|
|
|
160
166
|
## [0.1.0] - 2025-01-15
|
|
161
167
|
|
|
@@ -170,5 +176,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
170
176
|
- This is a placeholder release to secure the `abstractflow` name on PyPI
|
|
171
177
|
- No functional code is included in this version
|
|
172
178
|
- Follow the GitHub repository for development updates and release timeline
|
|
173
|
-
|
|
174
|
-
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: abstractflow
|
|
3
|
+
Version: 0.3.1
|
|
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, **durable** AI workflows for Python.
|
|
57
|
+
|
|
58
|
+
AbstractFlow provides:
|
|
59
|
+
- A portable workflow format (`VisualFlow` JSON) and helpers to execute it from any host (`abstractflow.visual`).
|
|
60
|
+
- A simple programmatic API (`Flow`, `FlowRunner`) backed by **AbstractRuntime**.
|
|
61
|
+
- A reference visual editor app in `web/` (FastAPI backend + React frontend).
|
|
62
|
+
|
|
63
|
+
Project status: **Pre-alpha** (`pyproject.toml`: `Development Status :: 2 - Pre-Alpha`). Expect breaking changes.
|
|
64
|
+
|
|
65
|
+
## Capabilities (implemented)
|
|
66
|
+
|
|
67
|
+
- Execute programmatic flows (`Flow` → `FlowRunner`) with a default in-memory runtime.
|
|
68
|
+
- Execute portable `VisualFlow` JSON from any host process (`abstractflow.visual`).
|
|
69
|
+
- Durable waits and resumption via AbstractRuntime (e.g. user/event/schedule waits).
|
|
70
|
+
- Package a flow tree as a WorkflowBundle (`.flow`) via the CLI.
|
|
71
|
+
- Author/run VisualFlows in the reference web editor (`web/`).
|
|
72
|
+
|
|
73
|
+
Evidence (code): `abstractflow/runner.py`, `abstractflow/visual/executor.py`, `abstractflow/cli.py`, `web/backend/routes/ws.py`.
|
|
74
|
+
|
|
75
|
+
## Docs
|
|
76
|
+
|
|
77
|
+
- Start here: `docs/getting-started.md`
|
|
78
|
+
- API reference: `docs/api.md`
|
|
79
|
+
- VisualFlow format: `docs/visualflow.md`
|
|
80
|
+
- Visual editor: `docs/web-editor.md`
|
|
81
|
+
- CLI: `docs/cli.md`
|
|
82
|
+
- FAQ: `docs/faq.md`
|
|
83
|
+
- Architecture: `docs/architecture.md`
|
|
84
|
+
- Docs index: `docs/README.md`
|
|
85
|
+
|
|
86
|
+
## Installation
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip install abstractflow
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Requirements: Python **3.10+** (`pyproject.toml`: `requires-python`).
|
|
93
|
+
|
|
94
|
+
Optional extras:
|
|
95
|
+
- Agent nodes (ReAct workflows): `pip install "abstractflow[agent]"`
|
|
96
|
+
- Dev tools (tests/formatting): `pip install "abstractflow[dev]"`
|
|
97
|
+
|
|
98
|
+
Notes:
|
|
99
|
+
- `abstractflow` depends on `AbstractRuntime` and `abstractcore[tools]` (see `pyproject.toml`).
|
|
100
|
+
- Some VisualFlow node types require additional packages (e.g. `memory_kg_*` nodes need `abstractmemory`).
|
|
101
|
+
|
|
102
|
+
## Quickstart (programmatic)
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from abstractflow import Flow, FlowRunner
|
|
106
|
+
|
|
107
|
+
flow = Flow("linear")
|
|
108
|
+
flow.add_node("double", lambda x: x * 2, input_key="value", output_key="doubled")
|
|
109
|
+
flow.add_node("add_ten", lambda x: x + 10, input_key="doubled", output_key="final")
|
|
110
|
+
flow.add_edge("double", "add_ten")
|
|
111
|
+
flow.set_entry("double")
|
|
112
|
+
|
|
113
|
+
result = FlowRunner(flow).run({"value": 5})
|
|
114
|
+
print(result) # {"success": True, "result": 20}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Quickstart (execute a VisualFlow JSON)
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
import json
|
|
121
|
+
from abstractflow.visual import VisualFlow, execute_visual_flow
|
|
122
|
+
|
|
123
|
+
with open("my-flow.json", "r", encoding="utf-8") as f:
|
|
124
|
+
vf = VisualFlow.model_validate(json.load(f))
|
|
125
|
+
result = execute_visual_flow(vf, {"prompt": "Hello"}, flows={vf.id: vf})
|
|
126
|
+
print(result) # {"success": True, "waiting": False, "result": ...}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
If your flow uses subflows, load all referenced `*.json` into the `flows={...}` mapping (see `docs/getting-started.md`).
|
|
130
|
+
|
|
131
|
+
## Visual editor (from source)
|
|
132
|
+
|
|
133
|
+
The visual editor is a dev/reference app in `web/` (not shipped as a Python package on PyPI).
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
git clone https://github.com/lpalbou/AbstractFlow.git
|
|
137
|
+
cd AbstractFlow
|
|
138
|
+
|
|
139
|
+
python -m venv .venv
|
|
140
|
+
source .venv/bin/activate
|
|
141
|
+
pip install -e ".[server,agent]"
|
|
142
|
+
|
|
143
|
+
# Terminal 1: Backend (FastAPI)
|
|
144
|
+
cd web && python -m backend --reload --port 8080
|
|
145
|
+
|
|
146
|
+
# Terminal 2: Frontend (Vite)
|
|
147
|
+
cd web/frontend && npm install && npm run dev
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Open the frontend at http://localhost:3003 (default Vite port). See `docs/web-editor.md`.
|
|
151
|
+
|
|
152
|
+
## CLI (WorkflowBundle `.flow`)
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
abstractflow bundle pack web/flows/ac-echo.json --out /tmp/ac-echo.flow
|
|
156
|
+
abstractflow bundle inspect /tmp/ac-echo.flow
|
|
157
|
+
abstractflow bundle unpack /tmp/ac-echo.flow --dir /tmp/ac-echo
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
See `docs/cli.md` and `abstractflow/cli.py`.
|
|
161
|
+
|
|
162
|
+
## Related projects
|
|
163
|
+
|
|
164
|
+
- AbstractRuntime (durable execution kernel): https://github.com/lpalbou/AbstractRuntime
|
|
165
|
+
- AbstractCore (providers/models/tools): https://github.com/lpalbou/AbstractCore
|
|
166
|
+
- AbstractAgent (ReAct/CodeAct): https://github.com/lpalbou/AbstractAgent
|
|
167
|
+
|
|
168
|
+
## Changelog
|
|
169
|
+
|
|
170
|
+
See `CHANGELOG.md`.
|
|
171
|
+
|
|
172
|
+
## Contributing
|
|
173
|
+
|
|
174
|
+
See `CONTRIBUTING.md`.
|
|
175
|
+
|
|
176
|
+
## Security
|
|
177
|
+
|
|
178
|
+
See `SECURITY.md`.
|
|
179
|
+
|
|
180
|
+
## Acknowledgments
|
|
181
|
+
|
|
182
|
+
See `ACKNOWLEDMENTS.md`.
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
MIT. See `LICENSE`.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# AbstractFlow
|
|
2
|
+
|
|
3
|
+
Diagram-based, **durable** AI workflows for Python.
|
|
4
|
+
|
|
5
|
+
AbstractFlow provides:
|
|
6
|
+
- A portable workflow format (`VisualFlow` JSON) and helpers to execute it from any host (`abstractflow.visual`).
|
|
7
|
+
- A simple programmatic API (`Flow`, `FlowRunner`) backed by **AbstractRuntime**.
|
|
8
|
+
- A reference visual editor app in `web/` (FastAPI backend + React frontend).
|
|
9
|
+
|
|
10
|
+
Project status: **Pre-alpha** (`pyproject.toml`: `Development Status :: 2 - Pre-Alpha`). Expect breaking changes.
|
|
11
|
+
|
|
12
|
+
## Capabilities (implemented)
|
|
13
|
+
|
|
14
|
+
- Execute programmatic flows (`Flow` → `FlowRunner`) with a default in-memory runtime.
|
|
15
|
+
- Execute portable `VisualFlow` JSON from any host process (`abstractflow.visual`).
|
|
16
|
+
- Durable waits and resumption via AbstractRuntime (e.g. user/event/schedule waits).
|
|
17
|
+
- Package a flow tree as a WorkflowBundle (`.flow`) via the CLI.
|
|
18
|
+
- Author/run VisualFlows in the reference web editor (`web/`).
|
|
19
|
+
|
|
20
|
+
Evidence (code): `abstractflow/runner.py`, `abstractflow/visual/executor.py`, `abstractflow/cli.py`, `web/backend/routes/ws.py`.
|
|
21
|
+
|
|
22
|
+
## Docs
|
|
23
|
+
|
|
24
|
+
- Start here: `docs/getting-started.md`
|
|
25
|
+
- API reference: `docs/api.md`
|
|
26
|
+
- VisualFlow format: `docs/visualflow.md`
|
|
27
|
+
- Visual editor: `docs/web-editor.md`
|
|
28
|
+
- CLI: `docs/cli.md`
|
|
29
|
+
- FAQ: `docs/faq.md`
|
|
30
|
+
- Architecture: `docs/architecture.md`
|
|
31
|
+
- Docs index: `docs/README.md`
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install abstractflow
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Requirements: Python **3.10+** (`pyproject.toml`: `requires-python`).
|
|
40
|
+
|
|
41
|
+
Optional extras:
|
|
42
|
+
- Agent nodes (ReAct workflows): `pip install "abstractflow[agent]"`
|
|
43
|
+
- Dev tools (tests/formatting): `pip install "abstractflow[dev]"`
|
|
44
|
+
|
|
45
|
+
Notes:
|
|
46
|
+
- `abstractflow` depends on `AbstractRuntime` and `abstractcore[tools]` (see `pyproject.toml`).
|
|
47
|
+
- Some VisualFlow node types require additional packages (e.g. `memory_kg_*` nodes need `abstractmemory`).
|
|
48
|
+
|
|
49
|
+
## Quickstart (programmatic)
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from abstractflow import Flow, FlowRunner
|
|
53
|
+
|
|
54
|
+
flow = Flow("linear")
|
|
55
|
+
flow.add_node("double", lambda x: x * 2, input_key="value", output_key="doubled")
|
|
56
|
+
flow.add_node("add_ten", lambda x: x + 10, input_key="doubled", output_key="final")
|
|
57
|
+
flow.add_edge("double", "add_ten")
|
|
58
|
+
flow.set_entry("double")
|
|
59
|
+
|
|
60
|
+
result = FlowRunner(flow).run({"value": 5})
|
|
61
|
+
print(result) # {"success": True, "result": 20}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Quickstart (execute a VisualFlow JSON)
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
import json
|
|
68
|
+
from abstractflow.visual import VisualFlow, execute_visual_flow
|
|
69
|
+
|
|
70
|
+
with open("my-flow.json", "r", encoding="utf-8") as f:
|
|
71
|
+
vf = VisualFlow.model_validate(json.load(f))
|
|
72
|
+
result = execute_visual_flow(vf, {"prompt": "Hello"}, flows={vf.id: vf})
|
|
73
|
+
print(result) # {"success": True, "waiting": False, "result": ...}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If your flow uses subflows, load all referenced `*.json` into the `flows={...}` mapping (see `docs/getting-started.md`).
|
|
77
|
+
|
|
78
|
+
## Visual editor (from source)
|
|
79
|
+
|
|
80
|
+
The visual editor is a dev/reference app in `web/` (not shipped as a Python package on PyPI).
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/lpalbou/AbstractFlow.git
|
|
84
|
+
cd AbstractFlow
|
|
85
|
+
|
|
86
|
+
python -m venv .venv
|
|
87
|
+
source .venv/bin/activate
|
|
88
|
+
pip install -e ".[server,agent]"
|
|
89
|
+
|
|
90
|
+
# Terminal 1: Backend (FastAPI)
|
|
91
|
+
cd web && python -m backend --reload --port 8080
|
|
92
|
+
|
|
93
|
+
# Terminal 2: Frontend (Vite)
|
|
94
|
+
cd web/frontend && npm install && npm run dev
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Open the frontend at http://localhost:3003 (default Vite port). See `docs/web-editor.md`.
|
|
98
|
+
|
|
99
|
+
## CLI (WorkflowBundle `.flow`)
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
abstractflow bundle pack web/flows/ac-echo.json --out /tmp/ac-echo.flow
|
|
103
|
+
abstractflow bundle inspect /tmp/ac-echo.flow
|
|
104
|
+
abstractflow bundle unpack /tmp/ac-echo.flow --dir /tmp/ac-echo
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
See `docs/cli.md` and `abstractflow/cli.py`.
|
|
108
|
+
|
|
109
|
+
## Related projects
|
|
110
|
+
|
|
111
|
+
- AbstractRuntime (durable execution kernel): https://github.com/lpalbou/AbstractRuntime
|
|
112
|
+
- AbstractCore (providers/models/tools): https://github.com/lpalbou/AbstractCore
|
|
113
|
+
- AbstractAgent (ReAct/CodeAct): https://github.com/lpalbou/AbstractAgent
|
|
114
|
+
|
|
115
|
+
## Changelog
|
|
116
|
+
|
|
117
|
+
See `CHANGELOG.md`.
|
|
118
|
+
|
|
119
|
+
## Contributing
|
|
120
|
+
|
|
121
|
+
See `CONTRIBUTING.md`.
|
|
122
|
+
|
|
123
|
+
## Security
|
|
124
|
+
|
|
125
|
+
See `SECURITY.md`.
|
|
126
|
+
|
|
127
|
+
## Acknowledgments
|
|
128
|
+
|
|
129
|
+
See `ACKNOWLEDMENTS.md`.
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
MIT. See `LICENSE`.
|
|
@@ -39,9 +39,9 @@ For agent-based flows:
|
|
|
39
39
|
>>> result = runner.run({"context": {"task": "Build a REST API"}})
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
|
-
__version__ = "0.3.
|
|
42
|
+
__version__ = "0.3.1"
|
|
43
43
|
__author__ = "Laurent-Philippe Albou"
|
|
44
|
-
__email__ = "contact@
|
|
44
|
+
__email__ = "contact@abstractflow.ai"
|
|
45
45
|
__license__ = "MIT"
|
|
46
46
|
|
|
47
47
|
# Core classes
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""Command-line interface for AbstractFlow.
|
|
2
|
+
|
|
3
|
+
Current implemented features:
|
|
4
|
+
- WorkflowBundle (.flow) pack/inspect/unpack (backlog 314)
|
|
5
|
+
|
|
6
|
+
Other commands are intentionally kept minimal for now.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import argparse
|
|
12
|
+
import json
|
|
13
|
+
import sys
|
|
14
|
+
from typing import List, Optional
|
|
15
|
+
|
|
16
|
+
from .workflow_bundle import inspect_workflow_bundle, pack_workflow_bundle, unpack_workflow_bundle
|
|
17
|
+
from abstractruntime.workflow_bundle import workflow_bundle_manifest_to_dict
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _build_parser() -> argparse.ArgumentParser:
|
|
21
|
+
p = argparse.ArgumentParser(prog="abstractflow", add_help=True)
|
|
22
|
+
sub = p.add_subparsers(dest="command")
|
|
23
|
+
|
|
24
|
+
bundle = sub.add_parser("bundle", help="WorkflowBundle (.flow) tools")
|
|
25
|
+
bundle_sub = bundle.add_subparsers(dest="bundle_cmd")
|
|
26
|
+
|
|
27
|
+
pack = bundle_sub.add_parser("pack", help="Pack a .flow bundle from a root VisualFlow JSON file")
|
|
28
|
+
pack.add_argument("root", help="Path to root VisualFlow JSON (e.g., ./flows/<id>.json)")
|
|
29
|
+
pack.add_argument("--out", required=True, help="Output .flow path")
|
|
30
|
+
pack.add_argument("--bundle-id", default=None, help="Bundle id (default: root flow id)")
|
|
31
|
+
pack.add_argument("--bundle-version", default="0.0.0", help="Bundle version (default: 0.0.0)")
|
|
32
|
+
pack.add_argument("--flows-dir", default=None, help="Directory containing flow JSON files (default: root's directory)")
|
|
33
|
+
pack.add_argument(
|
|
34
|
+
"--entrypoint",
|
|
35
|
+
action="append",
|
|
36
|
+
default=None,
|
|
37
|
+
help="Entrypoint flow id (repeatable). Default: root flow id",
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
insp = bundle_sub.add_parser("inspect", help="Print bundle manifest (JSON)")
|
|
41
|
+
insp.add_argument("bundle", help="Path to .flow (zip) or extracted directory")
|
|
42
|
+
|
|
43
|
+
unpack = bundle_sub.add_parser("unpack", help="Extract a .flow bundle to a directory")
|
|
44
|
+
unpack.add_argument("bundle", help="Path to .flow (zip) or extracted directory")
|
|
45
|
+
unpack.add_argument("--dir", required=True, help="Output directory")
|
|
46
|
+
|
|
47
|
+
return p
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def main(args: Optional[List[str]] = None) -> int:
|
|
51
|
+
if args is None:
|
|
52
|
+
args = sys.argv[1:]
|
|
53
|
+
|
|
54
|
+
parser = _build_parser()
|
|
55
|
+
ns = parser.parse_args(args)
|
|
56
|
+
|
|
57
|
+
if ns.command == "bundle":
|
|
58
|
+
if ns.bundle_cmd == "pack":
|
|
59
|
+
packed = pack_workflow_bundle(
|
|
60
|
+
root_flow_json=ns.root,
|
|
61
|
+
out_path=ns.out,
|
|
62
|
+
bundle_id=ns.bundle_id,
|
|
63
|
+
bundle_version=ns.bundle_version,
|
|
64
|
+
flows_dir=ns.flows_dir,
|
|
65
|
+
entrypoints=list(ns.entrypoint) if isinstance(ns.entrypoint, list) and ns.entrypoint else None,
|
|
66
|
+
)
|
|
67
|
+
sys.stdout.write(str(packed.path) + "\n")
|
|
68
|
+
return 0
|
|
69
|
+
|
|
70
|
+
if ns.bundle_cmd == "inspect":
|
|
71
|
+
man = inspect_workflow_bundle(bundle_path=ns.bundle)
|
|
72
|
+
sys.stdout.write(json.dumps(workflow_bundle_manifest_to_dict(man), indent=2, ensure_ascii=False) + "\n")
|
|
73
|
+
return 0
|
|
74
|
+
|
|
75
|
+
if ns.bundle_cmd == "unpack":
|
|
76
|
+
out = unpack_workflow_bundle(bundle_path=ns.bundle, out_dir=ns.dir)
|
|
77
|
+
sys.stdout.write(str(out) + "\n")
|
|
78
|
+
return 0
|
|
79
|
+
|
|
80
|
+
parser.error("Missing bundle subcommand (pack|inspect|unpack)")
|
|
81
|
+
|
|
82
|
+
parser.print_help()
|
|
83
|
+
return 0
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
if __name__ == "__main__":
|
|
87
|
+
raise SystemExit(main())
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""AbstractFlow compiler shim.
|
|
2
|
+
|
|
3
|
+
AbstractFlow no longer owns workflow compilation semantics. The single source of
|
|
4
|
+
truth for VisualFlow/Flow compilation lives in `abstractruntime.visualflow_compiler`.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from abstractruntime.visualflow_compiler.compiler import (
|
|
10
|
+
_create_visual_agent_effect_handler,
|
|
11
|
+
_sync_effect_results_to_node_outputs,
|
|
12
|
+
compile_flow,
|
|
13
|
+
compile_visualflow,
|
|
14
|
+
compile_visualflow_tree,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"compile_flow",
|
|
19
|
+
"compile_visualflow",
|
|
20
|
+
"compile_visualflow_tree",
|
|
21
|
+
"_create_visual_agent_effect_handler",
|
|
22
|
+
"_sync_effect_results_to_node_outputs",
|
|
23
|
+
]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Flow definition classes for AbstractFlow.
|
|
2
|
+
|
|
3
|
+
This module is a thin re-export of AbstractRuntime's Flow IR so there is a
|
|
4
|
+
single semantics + IR surface shared across hosts.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from abstractruntime.visualflow_compiler.flow import Flow, FlowEdge, FlowNode
|
|
10
|
+
|
|
11
|
+
__all__ = ["Flow", "FlowNode", "FlowEdge"]
|