Custom domain
Add an entirely new domain (inventory, devices, workflows) without any ReQlo product changes.
A logistics company adds agents for inventory and devices. Nothing in ReQlo is specific to logistics: they register their own actions and write rules.
1. Register actions and resource types
In the dashboard, open Actions & resources. Register each resource type, then each action. To paste an attribute schema, switch the attribute editor to JSON.
Resource type sku: attributes
{
"warehouse_id": { "type": "id", "required": true }
}Resource type device: attributes
{
"site_id": { "type": "id", "required": true }
}Action inventory.adjust on sku: context attributes
{
"quantity_delta": { "type": "integer", "required": true, "minimum": -1000, "maximum": 1000 }
}Action devices.restart on device: context attributes
{
"maintenance_window": { "type": "boolean", "required": true }
}Action workflows.trigger on device, no context attributes
2. Policy
Replace <YOUR_POLICY_ID> with a new policy ID, then
validate, test and publish it with reqlo policies push --publish.
id: <YOUR_POLICY_ID>
name: Operations
rules:
- id: small-adjustments
effect: allow
actions: [inventory.adjust]
agents: { tags: [warehouse] }
subjects: { kinds: [none] }
condition: context.quantity_delta >= -50 && context.quantity_delta <= 50
- id: restart-in-window
effect: allow
actions: [devices.restart]
agents: { tags: [fleet_ops] }
subjects: { kinds: [none] }
condition: context.maintenance_window3. Authorize on the server
await reqlo.enforce({
agent: { id: "agt_warehouse_bot" }, // autonomous: no subject
action: "inventory.adjust",
resource: { type: "sku", id: sku.id, attributes: { warehouse_id: sku.warehouseId } },
context: { quantity_delta: args.delta },
});Notes
- Autonomous agents omit
subject; rules opt in withsubjects: { kinds: [none] }. - New domains are just new actions, resource types and rules on the same API.
Every example uses the same request model; only the customer-defined actions, resources and attributes differ. See Core concepts.
Something wrong or unclear? Report an issue with this page.