fastworkflow 2.8.20__py3-none-any.whl → 2.8.21__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.
@@ -178,7 +178,7 @@ class CommandDirectory(BaseModel):
178
178
  commands_root_folder = Path(workflow_folderpath) / "_commands"
179
179
 
180
180
  if not commands_root_folder.is_dir():
181
- if 'fastworkflow' not in workflow_folderpath:
181
+ if not workflow_folderpath.endswith('fastworkflow'):
182
182
  raise RuntimeError(f"Internal error: workflow_folderpath '{workflow_folderpath}' does not contain '_commands'")
183
183
  return command_directory
184
184
 
@@ -18,11 +18,6 @@ from fastworkflow.command_context_model import CommandContextModel
18
18
 
19
19
 
20
20
  def train_workflow(workflow_path: str):
21
- commands_dir = os.path.join(workflow_path, "_commands")
22
- if not os.path.isdir(commands_dir):
23
- logger.info(f"No _commands directory found at {workflow_path}, skipping training")
24
- return
25
-
26
21
  # Ensure context model is parsed so downstream helpers have contexts
27
22
  CommandContextModel.load(workflow_path)
28
23
  RoutingDefinition.build(workflow_path)
@@ -44,7 +39,9 @@ def train_workflow(workflow_path: str):
44
39
  print(f"{Fore.YELLOW}Training child workflow: {child_workflow_path}{Style.RESET_ALL}")
45
40
  train_workflow(child_workflow_path)
46
41
 
47
- if "fastworkflow/fastworkflow" in workflow_path and "_workflows" not in workflow_path:
42
+ commands_dir = os.path.join(workflow_path, "_commands")
43
+ if not os.path.isdir(commands_dir):
44
+ logger.info(f"No _commands directory found at {workflow_path}, skipping training")
48
45
  return
49
46
 
50
47
  # create a workflow and train the main workflow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastworkflow
3
- Version: 2.8.20
3
+ Version: 2.8.21
4
4
  Summary: A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX
5
5
  License: Apache-2.0
6
6
  Keywords: fastworkflow,ai,workflow,llm,openai
@@ -31,19 +31,32 @@ Description-Content-Type: text/markdown
31
31
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
32
32
  [![CI](https://img.shields.io/badge/ci-passing-brightgreen)](<LINK_TO_CI>)
33
33
 
34
- A framework for rapidly building large-scale, deterministic, interactive workflows on top of existing Python applications, featuring a fault-tolerant, conversational UX and AI-powered recommendations.
34
+ Build agents and assistants for complex workflows and large-scale Python applications, with deterministic or AI-powered business logic.
35
35
 
36
36
  ---
37
37
 
38
- ### Who is this for?
38
+ ### Why fastWorkflow?
39
39
 
40
- | `fastWorkflow` is a great fit if... | `fastWorkflow` might be overkill if... |
41
- | :--- | :--- |
42
- |You have an existing Python domain model and want to add a conversational or agentic interface **without** rewriting business logic. | ❌ You just need a standard CRUD REST or GraphQL API. |
43
- |You are building back-office tools that benefit from multi-step, interactive command sequences (e.g., inventory management, data review). | Your system requires ultra-low latency (1k+ TPS) where any NLP overhead is unacceptable. |
44
- |You prefer a *convention-over-configuration* approach and want to auto-generate boilerplate for your CLI/agent interface. | ❌ Your project requires every API endpoint to be handcrafted with bespoke JSON payloads and manual routing. |
40
+ - **Unlimited Tool Scaling**: fastworkflow can scale to an unlimited number of tools
41
+ - **Cost-Effective Performance**: fastWorkFlow with small, free models can match the quality of large expensive models
42
+ -**Reliable Tool Execution**: fastworkflow validation pipeline virtually eliminates incorrect tool calling or parameter extraction, ensuring a reliable tool response
43
+ -**Adaptive Learning**: 1-shot learning from intent detection mistakes. It learns your conversational vocabulary as you interact with it
44
+ -**Interface Flexibility**: Support programmatic, assistant-driven and agent-driven interfaces with the same codebase
45
+ - ✅ **Deep Code Understanding**: fastworkflow understands classes, methods, inheritance and aggregation so you can quickly 'AI-enable' large-scale Python applications
45
46
 
46
- > **See it in Action**: A live terminal chat session of the `hello_world` example is available at [docs/assets/hello_world_demo.gif](docs/assets/hello_world_demo.gif).
47
+ ---
48
+
49
+ ### Key Concepts
50
+
51
+ **Adaptive Intent Understanding**: Misunderstandings are a given in any conversation, no matter how intelligent the participants. Natural language applications should have intent clarification and parameter validation built-in. We have the ability to 1-shot adapt our semantic understanding of words and sentences based on the context of the conversation and clarifications of intent. Applications should also be able to do the same.
52
+
53
+ **Contextual Hierarchies**: Communication is always within a context. And not just one concept but layers of contexts. Interpretation starts with the narrowest context and expands to larger contexts if the narrow context does not 'fit' the interpretation. In programming languages, we express contexts as classes, tools as methods and context hierarchies using inheritance and aggregation. Natural language applications should understand classes, methods, inheritance and aggregation out-of-the-box.
54
+
55
+ **Signatures**: Signatures (ALA Pydantic and DSPy) are the most efficient way of mapping natural language commands to tool implementations, whether programmatic or GenAI. We use signatures as a backbone for implementing commands, enabling seamless integration with DSPy for producing LLM-content within a deterministic programming framework.
56
+
57
+ **Code Generation**: AI-enabling large-scale, complex applications is non-trivial. Build tools that can quickly map natural language commands to application classes and methods are critical if we are to build more than prototypes and demos.
58
+
59
+ **Context Navigation at Runtime**: Classes maintain state, not just methods. Method behaviors can change based on state. These capabilities are the building blocks for creating complex finite-state-machines on which non-trivial workflows are built. We need to support dynamically enabling/disabling methods along with the ability to navigate object instance hierarchies at run-time, if we want to build complex workflows.
47
60
 
48
61
  ---
49
62
 
@@ -52,7 +65,7 @@ A framework for rapidly building large-scale, deterministic, interactive workflo
52
65
  `fastWorkflow` separates the build-time, train-time, and run-time concerns. The `build` tool creates a command interface from your code, the `train` tool builds NLP models to understand commands, and the `run` scripts execute the workflow.
53
66
 
54
67
  ```mermaid
55
- graph TD
68
+ graph LR
56
69
  subgraph A[Build-Time]
57
70
  A1(Your Python App Source) --> A2{fastworkflow.build};
58
71
  A2 --> A3(Generated _commands);
@@ -87,6 +100,8 @@ pip install fastworkflow
87
100
  uv pip install fastworkflow
88
101
  ```
89
102
 
103
+ **Note:** `fastWorkflow` installs PyTorch as a dependency. If you don't already have PyTorch installed, this could take 20-30 minutes depending on your internet connection and system.
104
+
90
105
  ---
91
106
 
92
107
  ## Quick Start: Running an Example in 5 Minutes
@@ -404,11 +419,8 @@ The example workflows are configured to use Mistral's models by default. You can
404
419
  > **`PARAMETER EXTRACTION ERROR`**
405
420
  > This means the LLM failed to extract the required parameters from your command. The error message will list the missing or invalid fields. Rephrase your command to be more specific.
406
421
 
407
- > **`speedict` Permission Denied**
408
- > This can happen if the cache files in `___command_info/` become corrupted. Delete the `___command_info` directory and retrain the workflow.
409
-
410
- > **Slow Training on CPU**
411
- > The first run may be slow due to model downloads from Hugging Face. Subsequent runs will be faster. Set `export HF_HOME=/path/to/cache` to control where models are stored. Training a small workflow takes ~5-8 minutes on a modern CPU.
422
+ > **Slow Training**
423
+ > Training involves generating synthetic utterances, which requires multiple LLM calls, making it inherently time-consuming. The first run may also be slow due to model downloads from Hugging Face. Subsequent runs will be faster. Set `export HF_HOME=/path/to/cache` to control where models are stored. Training a small workflow takes ~5-8 minutes on a modern CPU.
412
424
 
413
425
  > **Missing API Keys**
414
426
  > If you see errors about missing environment variables or API keys, make sure you've added your API keys to the `fastworkflow.passwords.env` file as described in the Quick Start guide.
@@ -420,7 +432,7 @@ The example workflows are configured to use Mistral's models by default. You can
420
432
  Interested in contributing to `fastWorkflow` itself? Great!
421
433
 
422
434
  1. **Clone the repository:** `git clone https://github.com/your-repo/fastworkflow.git`
423
- 2. **Set up the Conda environment:** `conda create --name fastworkflow python=3.11 -y && conda activate fastworkflow`
435
+ 2. **Set up the environment:** Create a virtual environment using your preferred tool (venv, uv, conda, poetry, etc.) with Python 3.11+
424
436
  3. **Install in editable mode with dev dependencies:** `pip install -e ".[dev]"`
425
437
 
426
438
  Please see `CONTRIBUTING.md` for our contribution guidelines and code of conduct.
@@ -33,7 +33,7 @@ fastworkflow/cache_matching.py,sha256=WoSQ7QuVGqOnecsIIdwb3A6gBpt0OJdSzx_a51nHoF
33
33
  fastworkflow/chat_session.py,sha256=lEpJmU_2a-4pB4QR7wACl8jHWZls1ROtQGgdVObY3BA,12308
34
34
  fastworkflow/cli.py,sha256=SVIvd-GEfwAdWQT7om5DC9MC5wLivP_bXlgMF0T5Cjw,21736
35
35
  fastworkflow/command_context_model.py,sha256=nWxLP3TR7WJr3yWCedqcdFOxo_kwae_mS3VRN2cOmK8,13437
36
- fastworkflow/command_directory.py,sha256=S-QRHW66VHH10YIpm3-dQs8fvtXM5VKFyBLocGkduF8,27134
36
+ fastworkflow/command_directory.py,sha256=hWZ0i0noMxogiK0YoItf8SyRoxqxTFRN1hDPhzZi9zE,27141
37
37
  fastworkflow/command_executor.py,sha256=bKqOHBEVhCunE3B-zh6DNLERUiSmEiVJdfEoVVUq-zM,6412
38
38
  fastworkflow/command_interfaces.py,sha256=PWIKlcp0G8nmYl0vkrg1o6QzJL0pxXkfrn1joqTa0eU,460
39
39
  fastworkflow/command_routing.py,sha256=K4WSV_GZVIJCOIuB3nPsGclgxmyjaCuI1_9gWsSQPOo,15737
@@ -129,7 +129,7 @@ fastworkflow/run_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
129
129
  fastworkflow/run_agent/__main__.py,sha256=vpCGO3Ido69kSKzT5Yw-c0oFC2zl482TCKzZEsu9cNw,8068
130
130
  fastworkflow/run_agent/agent_module.py,sha256=Hjej9x3a8IhqAWlST6-EjhsgZb-_BeowG3TRJBffJiM,18899
131
131
  fastworkflow/train/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
132
- fastworkflow/train/__main__.py,sha256=AEbuBhFST-hCgdqwNFTak5tGur1plBjA4gIhtr3GSqc,8536
132
+ fastworkflow/train/__main__.py,sha256=ntWA5bKPXFZxwlreJ-6WTvwc7C8KltOBSxO39AY2QOQ,8429
133
133
  fastworkflow/train/generate_synthetic.py,sha256=Uiv9urpdZ05-apJ88kuOhnCskxBio3fggQZSWZwFklg,5340
134
134
  fastworkflow/user_message_queues.py,sha256=svbuFxQ16q6Tz6urPWfD4IEsOTMxtS1Kc1PP8EE8AWg,1422
135
135
  fastworkflow/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -146,8 +146,8 @@ fastworkflow/utils/pydantic_model_2_dspy_signature_class.py,sha256=w1pvl8rJq48ul
146
146
  fastworkflow/utils/python_utils.py,sha256=Lt6P8lBMbLuLZaP9gd_7Kl7UvSPLm-NKPN6cPUdn53w,8194
147
147
  fastworkflow/utils/signatures.py,sha256=4ksF-65Q-22ZR_SW8O_cv5RhKKk0ecmWgykoAGKxr-k,19957
148
148
  fastworkflow/workflow.py,sha256=URYIgoBObL4Ota1BMdW4kqmepi6E_tCoZBXCFS33qOw,16453
149
- fastworkflow-2.8.20.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
150
- fastworkflow-2.8.20.dist-info/METADATA,sha256=NXjjZOU_Qbq3cPgO8hciPgjEZrBIMOBm_u2jk_X5MJo,15387
151
- fastworkflow-2.8.20.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
152
- fastworkflow-2.8.20.dist-info/entry_points.txt,sha256=m8HqoPzCyaZLAx-V5X8MJgw3Lx3GiPDlxNEZ7K-Gb-U,54
153
- fastworkflow-2.8.20.dist-info/RECORD,,
149
+ fastworkflow-2.8.21.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
150
+ fastworkflow-2.8.21.dist-info/METADATA,sha256=6Dgd7O5yqXAEsK41iNca0ViDF-mk3pBEp0KqomJNe4Y,17306
151
+ fastworkflow-2.8.21.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
152
+ fastworkflow-2.8.21.dist-info/entry_points.txt,sha256=m8HqoPzCyaZLAx-V5X8MJgw3Lx3GiPDlxNEZ7K-Gb-U,54
153
+ fastworkflow-2.8.21.dist-info/RECORD,,