@sommatic/react-sdk is the package the Sommatic AI portal itself is built with. With it your React app can read and
change workflows, knowledge and tasks through the API, follow runs and task assignments in real time, embed the
Command Center, and show tasks to the people who must resolve them.
What is in the package
| Part | What you get |
|---|---|
| Configuration | configureSommatic: one call that points every service and stream at your backend. |
| Services | One class per API resource (WorkflowOrchestrationFlowDefinitionService, WorkManagementTaskService…) built on BaseApi, plus stream classes for server-sent events. |
| Components | The Command Center panel, the workflow canvas and its live console, task views, notifications and knowledge editors. |
| Hooks | useCommandCenter, the useSommatic* registration hooks, useTaskInbox, useEventStream, useSseConsole and more. |
Install
Add the package and its peers
npm install @sommatic/react-sdk @link-loom/react-sdk @veripass/react-sdk luxon @mui/x-date-pickersThe SDK runs on React 17, 18 or 19 with React Router 5, 6 or 7. Identity comes from @veripass/react-sdk, and shared
interface primitives from @link-loom/react-sdk.
Point it at your backend
import { configureSommatic } from '@sommatic/react-sdk';
configureSommatic({ baseUrl: 'https://api.sommatic.ai' });Call it once, before the first render. See Configuration.
Use a service
import { WorkflowOrchestrationFlowDefinitionService } from '@sommatic/react-sdk';
const service = new WorkflowOrchestrationFlowDefinitionService({ apiKey: token });
const response = await service.getByParameters({ queryselector: 'id', search: 'wf-flow-definition-…' });
if (response?.success) {
const [definition] = response.result.items;
}The package is published on npm as @sommatic/react-sdk under the Apache-2.0 license, written in JavaScript with
CommonJS and ES module builds.