adachsoft / workflow-tool
AI-callable tools for managing and running workflows in AiDevTeam applications.
v0.1.0
2026-11-27 07:14 UTC
Requires
- php: ^8.3
- adachsoft/ai-tool-call: ^2.0
- adachsoft/workflow: ^7.0
- adachsoft/workflow-definition-repository-json: ^4.2
Requires (Dev)
- adachsoft/php-code-style: ^0.7.4
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^12.4
- rector/rector: ^2.9
- symplify/phpstan-rules: ^14.19
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Workflow Tool provides AI-callable tools for managing and running workflows in AiDevTeam applications. It connects workflow definitions and execution services to the adachsoft/ai-tool-call tool interface.
Requirements
- PHP 8.3 or later.
- Composer.
Features
- List workflows and registered step types.
- Read and describe workflow definitions, including the input schema needed to run them.
- Create and update workflow definitions with validation.
- Run workflows directly or in the context of a project.
- Expose these operations through tool factories compatible with the AiToolCall SPI.
Installation
Install the package with Composer:
composer require adachsoft/workflow-tool
Usage
Provide the workflow repository, step registry, and runner services from your application when constructing the relevant tool factory. The manager factory also needs a workflow-definition JSON mapper. Register the resulting factories with the AiToolCall integration used by your application.
use AdachSoft\WorkflowDefinitionRepositoryJson\Mapper\WorkflowDefinitionJsonMapper;
use AdachSoft\WorkflowTool\Manager\WorkflowManagerToolFactory;
use AdachSoft\WorkflowTool\Runner\ProjectWorkflowRunnerToolFactory;
use AdachSoft\WorkflowTool\Runner\WorkflowRunnerToolFactory;
$managerFactory = new WorkflowManagerToolFactory(
$workflowDefinitionRepository,
$stepRegistry,
new WorkflowDefinitionJsonMapper(),
);
$runnerFactory = new WorkflowRunnerToolFactory(
$workflowDefinitionRepository,
$workflowRunner,
$stepRegistry,
);
$projectRunnerFactory = new ProjectWorkflowRunnerToolFactory(
$workflowDefinitionRepository,
$workflowRunner,
$stepRegistry,
);
// Register the factories with your AiToolCall tool registry.
See the examples for the available tools and their intended use.