Skip to content
SIHub Guides
Select language
Guides/Work orders and routines
SIHub · Guides

Work orders, approvals and routines

SIHub can save a work order and have it run by a separate agent worker. The result and necessary approvals appear in the portal. The browser does not have to stay open for this. Without a running worker, work orders remain in the queue; the web server does not run them itself.

Prepare an agent

Choose an available model provider and the desired billing source. Assign only the required HTTP tools to the agent. For automatic tool use, Use tools automatically on the agent and Automatic execution on the tool must be enabled. The tool must be active or published and have a valid JSON parameter schema.

For private live work orders, the current agent draft is sufficient if the appropriate subscription and the central AI access are available. When it starts, the work order saves the current configuration as a snapshot; publishing is not required for this. Permissions added later do not extend an existing work order; revoked tool permissions, deactivated tools and changed tool configurations are checked again before execution. In that case, the work order is stopped and must be reviewed again. Public widgets and phone channels still use a published agent version.

Work orders use only the central AI access and approved real tools. Simulated work orders are no longer created or run. A deactivated requester or a revoked API key can no longer have work orders that were already saved run.

Work order and result

Under Work orders you choose an agent, describe the work order and start processing. If automatic tools are enabled, a live conversation in the signed-in playground can also queue a work order. The confirmation in the chat contains its ID; the actual result follows after processing.

By default, a work order may make eight and at most twelve model calls. It can wait for your answer, an approval or a result from a specialist agent. In addition to the work order and result, the action history, errors and the token count reported by the provider are available. This token display is not a provider invoice and not a verified remaining balance.

Team members see their own work orders. Owners and admins can review the workspace's work orders. Canceling stops further steps and the associated specialist agents. A change that has already reached the external system is not undone by this.

Assign customers and analyze AI usage

When you issue a work order, you can search for and select a saved contact, a CRM customer or a client from the tax area. Alternatively, enter your own customer name. The assignment is saved with the work order and carried over to delegated sub-orders and when you save the work order as a routine. You can filter by this customer in the work order overview.

The work order details show the token usage so far for the entire work order, including its sub-orders. Input, output and total are shown separately; reported cache and reasoning tokens are subsets and are not added to the total again. During processing, usage grows after each model call. The final usage cannot be reliably predicted before the work order is complete.

Under Usage & costs you will find the monthly analysis of work orders by customer. Each model call counts exactly once, even if it comes from a specialist agent. The selected calendar month is based on UTC and on the time of each call. A work order that runs across a month boundary can therefore cause usage in both months.

Allowance usage refers to the tokens actually deducted from the SIHub allowance. Calls without an allowance deduction show zero there; their reported tokens still appear on the work order. If the provider does not return complete usage values after an error, the existing billing system may charge the reserved amount. This deduction remains visible and is marked as a reservation charge. Token values that were not reported are shown as missing.

For older work orders, existing token counters remain visible. A historical breakdown by call time and allowance deduction cannot be reliably reconstructed from them after the fact. The analysis marks such gaps. Work orders without a customer assignment appear separately. The statistics cover the work orders visible to you; private work orders of other team members remain protected.

The database additions are applied automatically with the usual Deploy action. Sync with deployment uses the same path. Existing customers, work orders, provider credentials, subscriptions and allowance balances are preserved; running the deploy again does not cause a second deduction. Sync without deployment and build-only activate the change only with the next deploy.

Answer follow-up questions

If the agent lacks required information, it can ask a follow-up question. In the agent team and under Work orders you then see Your input required with the specific question and an answer field. Open follow-up questions are also shown in the overview. A follow-up question from a delegated specialist agent appears on the parent work order.

Enter your answer and click Send answer & continue. SIHub saves it in the existing work history and queues the same work order for the worker. Until then, the work order stays paused, even if you close the browser. Actions that have already been executed are not repeated by the answer. Another open question is displayed again. The answer does not replace a required action approval.

Follow-up questions do not require an additionally configured HTTP tool. They are available for model-based work orders even without automatic external tool use. Answers can contain up to 12,000 characters. After a cancellation, or if the question has already been answered, SIHub does not accept a second answer to the same follow-up question.

Internet access

Agents can use public information from the Internet in work orders. There are two built-in, read-only tools available for this. A separate HTTP tool is not necessary for this.

  • Read website retrieves a public page and provides title, text and links. HTML, text, JSON, XML and PDF up to 3 MB can be read. The agent reads long pages in sections.
  • Web search searches the public web and returns hits with an address and a short, documented summary. If Brave Search access is stored in the work area, this will be used, otherwise the web search of the central AI access from Anthropic. Without both just stands Read website ready.

The agent reads an address that you give in the order or in an answer or that comes from a search or page result without approval. An address that the agent puts together himself appears beforehand at Approvals. This means that no order data can be attached to a third-party web address without being noticed. For delegated partial orders, the addresses of the higher-level order apply.

SIHub only retrieves public addresses via standard ports 80 and 443, rechecks each redirect, and does not send cookies or credentials. The agent cannot read pages behind a login; That's what they are for Browser control. Web content is considered unchecked third-party data, not instructions. A maximum of 8 web searches and 25 page views are possible per order.

A web search via the central AI access is a separate model call and counts towards the token consumption of the order, typically 10,000 to 20,000 tokens. Page views themselves do not consume tokens; However, your text flows into the next model call. No additional setup is necessary. After the usual Deploy Orders that are already waiting also receive Internet access the next time the model is called up.

Orders with a fixed private reference, such as MeineKasse, tax or company reading orders, remain limited to your verified reading tools and do not receive Internet access.

Approve external actions

In addition to the built-in web tools, only a GET tool that is explicitly marked as reading is allowed to run without human approval. HTTP -Write actions and suggested memory entries are paused for review. Internal delegation to an already approved specialist agent does not require additional approval; its external changes follow the same rules.

Owners and admins review under Approvals the specific tool and the proposed inputs. They can correct, approve or reject the JSON input. The corrected values must match the tool schema. Approval does not run the action in the browser request; it resumes the work order for the worker. Approving again does not run the same action a second time.

SIHub still checks the current tool permissions and the required action approvals before execution. The operator rules for public HTTPS targets and workspace-bound secrets also apply to agent work orders; see HTTP tools.

Resolve unclear external status

If a write action is interrupted, it cannot be determined with certainty whether the external system has already accepted it. SIHub then shows Check external status and does not automatically run the action again. A worker claim that expired after a process crash can also lead to this state.

First check the target system, such as the CRM ticket that was created or the entry that was actually sent. Then confirm Success confirmed with the verified result or Failure confirmed. The work order processes this confirmation and continues with its remaining steps. Confirming a failed action does not repeat that action. For a new attempt, create a new work order after the check.

Routines

Under Automation you select the agent, task and schedule. New routines are active after saving; with Paused – activate later you can prepare a draft. Results appear under Work orders. A routine belongs to the person or API key that set it up. It can be paused, edited or deleted.

A demonstrated browser workflow can also be used as a work order or routine. To do this, select your own browser session, the reviewed published template and the required inputs. The agent must be approved for browser control and for exactly this template. The routine keeps this assignment and its inputs; each start creates a separate work order with a fixed data snapshot.

Replaying a reviewed browser template does not require an AI model account. The steps are processed in order and wait for the necessary approvals before navigating or interacting with the page. If the template is edited or browser approval is revoked, an existing work order does not silently continue with new permissions or different steps. Unclear external changes are checked before the work order continues.

Trigger Behavior
Interval At least five minutes, at most 30 days between runs. The worker queues work that is due and calculates the next run.
Daily Time and IANA time zone, for example 08:00 and Europe/Vienna. Display and calculation follow this time zone.
One-time Date, time and IANA time zone. The time must be in the future. The worker creates exactly one work order and then pauses the schedule; Reschedule sets a new time.
Event A named event like ticket.created, optionally limited to a specific source agent. A stable event ID prevents duplicate work orders for the same routine.

If a daily Vienna time falls into the hour skipped in spring, the run is moved by one hour; if a time occurs twice in autumn, the later hour is used. After an outage, missed intervals are not all made up. The next run is again in the future.

One-time schedules in the hour skipped in spring are rejected with a notice; if a time occurs twice in autumn, the later hour applies. A one-time schedule that falls due during an outage is made up once after the next worker start. Started confirms that the work order has been queued; you can see its progress and result under Work orders.

A connected system can call POST /api/automation/events with event, stable event_id, optional source_agent_id and a size-limited JSON object data as payload. It requires a SIHub API key with chat-scope or an appropriately authorized browser session. The workspace is taken from this sign-in. The event route does not replace an OAuth connection to the source system; that connection must be set up separately.

Existing conversation events can also trigger routines. Use accurate event and source agent filters. Incoming event data is added to the work order as reference data. A routine does not grant additional tool, provider, or live permissions.

An event work order takes at most 6,000 characters of the routine instruction and at most 6,000 characters of the attached event context. Longer texts are truncated. So keep event routines short and preferably send IDs, summaries and links in the event; additional content can be retrieved by an explicitly assigned read tool.

Specialist agents and memory

An agent can delegate subtasks to explicitly assigned specialist agents in the same workspace. Their current configuration is also recorded when the sub-order starts. At most three specialist agents are involved per work order; further delegation from such a child work order is not allowed. The main work order waits for their result and then processes the result or error.

Enable Use memory, which provides stored facts with their sources as reference context. Model suggestions are reviewed by a person before they are saved. Manually created entries can be corrected or deleted.

Area Usage
Private Context only for work orders of the person they belong to; other users do not receive these memory entries.
Agent Facts for the selected agent in the workspace.
Contact Facts for the selected agent and exactly the specified contact reference.
Workspace Shared facts for agents in this workspace.

Private memory does not turn a work order into a private conversation: owners and admins can still review its result and action history. A model may repeat facts it used in the result. Only store content there that is intended to be used in this workflow.

Run workers

The agent worker uses the same MariaDB and operator configuration as the app. Install the application dependencies and start it for a limited run first:

python3 manage.py bot-worker --limit 10

For ongoing processing:

python3 manage.py bot-worker --loop --limit 10 --poll-seconds 5

The limit is 1 to 100 work orders per run, the polling interval 1 to 60 seconds. Run the process under a service manager that restarts it after a failure. Multiple workers use database claims; a completed or unclear external action is not run again because of a restart.

Before a code/schema update, the website and all agent workers are stopped together. The default instances for direct installations are sihub.service, [email protected] and [email protected]. Additional self-configured instances and an existing sihub-browser-worker.service must be stopped as well. After a successful setup, the services are started again. Before an update, the installer checks the website, default workers, browser and trading services, and the inbox, notification and maintenance timers with their services. It names any blocking unit in the error log.

The AppHub deploy helper handles this process for direct installations: it determines the loaded and configured bot worker instances and stops them together with the other SIHub services and timers before the database backup. After the backup and Git update, it stops and checks all affected units again immediately before the runtime and schema update. This also stops services that were restarted in the meantime. If a unit remains active, the deployment aborts before the schema synchronization and names that unit.

After successful configuration, schema, live AI and local health checks, the helper enables and starts the default workers and timers even if they were previously missing or had failed. Additional workers and the optional browser service are restarted if they were previously active or enabled. If the update fails before Git and the runtime are changed, the error path restores the previously active operation. After a preparation error, it starts the current runtime only after the configuration, schema, live AI and local health checks have passed again. Unconfirmed services remain stopped; a public HTTPS error does not shut down locally verified services. The deployment reports the original error even if the recovery succeeds.

The normal AppHub deploy automatically installs changes to the helper. For SIHub updates and retrying failed updates, use the Deploy action for SIHub in AppHub or Sync & deploy. Details on the shared procedure are in Backup and updates.

For direct Apache operation, the service template is located at apache2/[email protected]. The current setup installs and enables two instances, sihub-bot-worker@1 and sihub-bot-worker@2, both using the same protected file /etc/sihub/sihub.env. When updating an existing installation, check whether these units are already set up. For schema changes or a restore, also stop the agent workers and only restart them once finished. The template expects the Python environment /opt/sihub-venv and the working directory /var/www/SIHub.

The Docker setup includes the service bot-worker in deploy/compose.yml, which uses the app configuration from deploy/.env.production as its environment. A new deployment includes it as a running service. The exact operator installation is described under Operations and Server setup.

The worker indicator in the operator administration is based on a recently written heartbeat. It does not confirm a connection to the model provider or target system. The work order overview shows the current processing status and required follow-up questions without technical service details. After a longer interruption, review work orders with an unclear status and paused routines before you start new live work.