On this page
Sommatic Docs
Open portal

Configuration

Point the React SDK at your backend with configureSommatic, send a Veripass token with each service, and tune timeouts and debug logs.

View as Markdown
Open in

The SDK needs to know one thing before it can talk to Sommatic AI: where to send its requests. Everything else (tokens, timeouts) is set per service instance.

Set the base URL

JavaScript
// main.jsx
import { configureSommatic } from '@sommatic/react-sdk';

configureSommatic({ baseUrl: 'https://api.sommatic.ai' });

createRoot(document.getElementById('root')).render(<App />);

configureSommatic({ baseUrl }) points every service and stream of the SDK at that address. Use the Sommatic AI API, or a backend of yours that forwards requests to it.

Call it once, before the first render. Each service reads the base URL when it is created, so a service created before the call keeps the old value.

SituationBase URL used
configureSommatic({ baseUrl }) was calledThat baseUrl.
It was not calledimport.meta.env.VITE_APP_BACKEND_URL from your Vite build.
Neither is setAn empty string: requests go to your app’s own origin.

resolveSommaticBaseUrl() returns the value currently in use, useful when you build your own requests next to the SDK.

Send a token

Services send Authorization: Bearer <token> when you create them with an apiKey:

JavaScript
import { WorkManagementTaskService } from '@sommatic/react-sdk';

const tasks = new WorkManagementTaskService({ apiKey: accessToken });
const inbox = await tasks.getByParameters({ queryselector: 'inbox', user_id: userIdentity, page: 1, pageSize: 25 });

The token is the one Veripass issues for your organization; see Authentication. The helpers fetchEntityCollection, createEntityRecord, updateEntityRecord and deleteEntityRecord take the same apiKey and pass it to the service they instantiate.

Timeouts

Each service accepts settings with a timeout in milliseconds. The default is 31,000 ms; the Git Sync service uses 180,000 ms because a preview or an apply can take longer.

JavaScript
const definitions = new WorkflowOrchestrationFlowDefinitionService({ apiKey: accessToken, settings: { timeout: 60000 } });

When a create, update, delete or post times out, the service does not throw: it returns { success: false, isTimeout: true, message, code }.

Debug logs of the Command Center

Set VITE_COMMAND_CENTER_DEBUG=true in your development environment to log every plan the Command Center receives and every step it runs in the browser console.

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs