kibana/docs/extend
Pierre Gayvallet 29a81d8972
[workchat] prepare the workflow framework (#218138)
## Summary

Setup the foundations of the workflow framework, adding types and
initial implementation.


## Examples

### Looping over some input to call the LLM

**workflow**
```typescript
{
      id: 'my_test_workflow',
      name: 'Just a test workflow',
      type: 'graph',
      inputs: [
        {
          name: 'input',
          type: 'array',
          required: true,
        },
      ],
      steps: [
        {
          id: 'mainLoop',
          type: NodeType.loop,
          configuration: {
            inputList: 'input',
            itemVar: 'prompt',
            output: {
              source: 'output',
              destination: 'results',
            },
            steps: [
              {
                id: 'step1',
                type: NodeType.prompt,
                configuration: {
                  prompt:
                    'How much is {prompt}? Please just output the result without anything else',
                  output: 'output',
                },
              },
            ],
          },
        },
      ],
      outputs: [
        {
          name: 'results',
          ref: 'results',
        },
      ],
    }
``` 

**Running**
```ts
workchatFramework.workflows.run({
    id: 'my_test_workflow',
    inputs: { input: ['3 + 3', '7 - 1', '4 * 6'] },
    request,
})
```

**Output**

```ts
 {
  runId: '6f254746-57fc-4fd3-8bfa-25014725f53f',
  output: { results: [ '6', '6', '24' ] }
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-22 22:04:26 +02:00
..
images [docs] Miscellaneous docs clean up (#215260) 2025-03-25 12:57:00 +00:00
add-data-tutorials.md
advanced.md
application-service.md
building-kibana.md
ci-metrics.md
configuration-service.md
contributing.md
core-packages.md
dashboard-enhanced-plugin.md
dependencies-versions.md [Docs] Add link to dependencies page (#218588) 2025-04-21 14:54:05 -04:00
development-basepath.md
development-best-practices.md
development-documentation.md
development-getting-started.md
development-github.md
development-plugin-resources.md
development-pull-request.md
development-security.md
development-telemetry.md
development-tests.md update package testing script after /test was moved to src/platform/test (#214730) 2025-03-17 17:27:47 +01:00
development-visualize-index.md
elasticsearch-service.md
enhanced-embeddables-plugin.md
external-plugin-development.md
external-plugin-functional-tests.md SKA: Relocate /test to /src/platform/test (#210956) 2025-03-14 16:57:23 +00:00
external-plugin-localization.md
http-service.md
index.md [Docs] Add link to dependencies page (#218588) 2025-04-21 14:54:05 -04:00
interpreting-ci-failures.md [docs] Fix image paths for docs-assembler (#218344) 2025-04-15 16:59:57 -05:00
kibana-architecture.md
kibana-dashboard-plugin.md
kibana-debugging.md [docs] Fix image paths for docs-assembler (#218344) 2025-04-15 16:59:57 -05:00
kibana-expressions-plugin.md [docs] Fix image paths for docs-assembler (#218344) 2025-04-15 16:59:57 -05:00
kibana-issue-reporting.md
kibana-linting.md
kibana-navigation.md [docs] Miscellaneous docs clean up (#215260) 2025-03-25 12:57:00 +00:00
kibana-platform-api.md
kibana-platform-plugin-api.md
legacy-url-aliases.md
logging-config-changes.md
logging-service.md
monorepo-packages.md
patterns.md
plugin-list.md [workchat] prepare the workflow framework (#218138) 2025-04-22 22:04:26 +02:00
plugin-performance.md
plugin-tooling.md
pr-review.md
reporting-integration.md
running-elasticsearch.md
running-kibana-advanced.md
sample-data.md
saved-objects-service.md
security-best-practices.md
sharing-saved-objects.md [docs] Fix image paths for docs-assembler (#218344) 2025-04-15 16:59:57 -05:00
stability.md
testing-kibana-plugin.md
toc.yml [Docs] Add link to dependencies page (#218588) 2025-04-21 14:54:05 -04:00
translations-plugin.md
typescript.md
ui-settings-service.md
uiactions-plugin.md [docs] Remove jsx from typescript code blocks (#213955) 2025-03-11 15:48:24 +00:00
upgrading-nodejs.md