StoneSoup is a comprehensive, open-source platform designed for AI workflows and experimentation. It leverages [Lite
StoneSoup is an open-source platform designed for AI workflows and experimentation, built upon the LiteGraph.js framework. It focuses on plugin-centric development and easy testing of various AI methods and parameters, providing a user-friendly environment for AI innovation.
-
Core Structure:
- Client-Side Components:
- Main Application (
client/main.py
): This is the entry point of the client application, built using FastAPI. It serves HTML content, mounts static files, and generates necessary script and link tags for the frontend. - Plugins and System Scripts: Located under
client/plugins
andclient/system/default/js
, these scripts extend the functionality of LiteGraph.js to support additional features like exporting workflows (workflowImage.js
), custom node color settings (running_node_color.js
), and core functionalities required by the editor (ss_editor.js
).
- Main Application (
- Client-Side Components:
-
Graph and Node Management:
- Node Templates and Core Nodes:
- Node Templates (
node.js
): Provides a base template for nodes, including methods for serialization, widget management, and event handling. - Core Nodes: Implement basic functionalities such as loops (
node_for_loop.js
), image preview (node_preview.js
), start and stop controls (node_start.js
,node_stop.js
), and image upload (node_upload_image.js
).
- Node Templates (
- Node Templates and Core Nodes:
-
Server-Side Components:
- Main Server (
server/main.py
): Manages the backend services, including API endpoints and integration with FastAPI. - Node Implementation:
- Python Nodes: Extend the platform by defining server-side logic for AI tasks (
node_accumulation.py
,node_addition.py
,node_preview.py
,node_stop.py
,node_upload_image.py
).
- Python Nodes: Extend the platform by defining server-side logic for AI tasks (
- Main Server (
-
Custom and Example Nodes:
- Example Nodes (
nodes/example_custom_nodes
): Demonstrate how to create custom nodes that can communicate with both frontend (JavaScript) and backend (Python) components.
- Example Nodes (
StoneSoup's workflow execution involves the following steps:
-
Graph Definition and Execution:
- Users define workflows using a visual editor based on LiteGraph.js.
- Nodes represent various tasks and data processing steps, which are connected to form a directed acyclic graph (DAG).
-
Node Processing:
- Each node processes its inputs, performs computations or actions, and passes outputs to connected nodes.
- Nodes can trigger events (
onTrigger
), execute actions (onAction
), and handle data inputs and outputs.
-
Server-Side Integration:
- Nodes can communicate with the server to perform more complex computations or access external resources.
- Server-side nodes use FastAPI endpoints to receive inputs, process data, and return results to the client.
StoneSoup is designed to be extensible:
- Plugins: Users can create and integrate plugins to extend the functionality of the platform.
- Custom Nodes: New nodes can be defined in JavaScript and Python, allowing for tailored AI methods and experiments.
- Server-Side Extensions: The backend can be extended with additional API endpoints and processing logic to support new AI tasks and workflows.
StoneSoup provides a flexible and powerful environment for developing, testing, and deploying AI workflows. Its integration of LiteGraph.js for visual workflow definition, combined with server-side processing capabilities, makes it a robust tool for AI experimentation and innovation.