Documentation Index
Fetch the complete documentation index at: https://docs.duvo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Beta — This feature is currently in beta and may change.
Introduction
Case Queue is a queue-based work item system for assignments. It lets you feed individual work items — called cases — into a queue, where assignments automatically pick them up, process them, and report results. This is useful when you have a stream of tasks that need to be handled one at a time (or in parallel), such as processing incoming requests, handling tickets, or working through a batch of items.Key Concepts
Queue
A queue is a container that holds cases waiting to be processed. Each team has one default queue, and cases flow through it to be claimed by assignments.Case
A case is an individual work item with a title and associated data. Think of it as a task card — it carries the information an assignment needs to do its work.Case Statuses
| Status | Meaning |
|---|---|
| Pending | Waiting in the queue to be picked up |
| In Progress | An assignment has claimed the case and is working on it |
| Needs Input | The assignment is waiting for a human response before continuing |
| Postponed | Waiting until a scheduled time before being picked up again |
| Completed | The assignment finished processing the case successfully |
| Failed | The assignment could not process the case |
Agent Triggers
An agent trigger connects an assignment to a queue. When a new case arrives, the trigger automatically dispatches the assignment to claim and process it — no manual intervention needed.How It Works
- Cases are added to a queue — either by another assignment or by an external system via the API.
- An assignment with a case trigger automatically claims the next pending case.
- The assignment processes the case using the case data as input.
- The case is resolved — the assignment marks the case as completed or postponed, requests a handover, or the case is marked as failed if the Job ends without any of these actions.
Status Transitions
Case statuses follow a specific lifecycle. Understanding these transitions helps you write better SOPs and troubleshoot processing issues.- Pending → In Progress: When an assignment picks up a case from the queue, the case moves to In Progress. This happens automatically through the case trigger — the assignment claims the next available case and begins working on it.
- In Progress → Needs Input: If the assignment requires human input while processing (via the Human-in-the-Loop feature), the case shows as Needs Input until the human responds.
- In Progress → Completed: The assignment explicitly marks the case as completed after it finishes processing successfully. Your SOP should instruct the assignment on when and how to mark a case as done.
- In Progress → Failed: If the assignment’s Job ends without completing, postponing, or handing over the case, the system automatically marks it as Failed. This means your SOP should always instruct the assignment to explicitly resolve each case — otherwise it will be treated as a failure.
- In Progress → Postponed: The assignment can postpone a case to delay processing until a later time. This is useful when the assignment determines that a case needs to wait — for example, waiting for an external event, a cooling-off period, or a specific business hour. The assignment specifies when the case should be retried, either as a specific time or a relative duration (e.g., “2 hours”, “1 day”). When the postponed time arrives, the case is automatically dispatched for processing again.
Writing SOPs for Case Processing
The assignment decides how to handle a case based on your SOP instructions. To get reliable results, your SOP should clearly tell the assignment:- When to complete a case — define what “done” looks like. For example: “After sending the reply email, mark the case as completed.”
- When to fail a case — define what counts as unprocessable. For example: “If the customer account cannot be found, update the case with the reason and mark it as failed.” Note that if the Job ends without the assignment completing, postponing, or handing over the case, it is automatically marked as Failed — but explicitly failing with a reason is preferred so you can review what went wrong.
- When to postpone a case — define conditions for delaying. For example: “If the report data is not yet available, postpone the case for 2 hours.”
Setting Up Case Queue in the Builder
Case Queue is configured directly from the assignment builder. A dedicated Case Queue section appears in the builder header, separate from Connections, where you link the assignment to the queues it should read from or write to. To connect an assignment to one or more queues:- Open your assignment in the builder.
- In the Case Queue section of the builder header, click the plus button. This opens the Case Queue Setup dialog.
-
In the dialog, choose how the assignment should interact with each queue:
- Processes Cases (Consumer) — the assignment picks up and processes cases from the selected queue.
- Adds Cases (Producer) — the assignment adds new cases to the selected queue.
- On a live revision, after selecting a consumer queue, trigger controls appear inside the dialog. You can enable the case trigger and set concurrency here alongside your queue selection. Changes are saved together when you click Save.
Enabling the Case Trigger
Linking a queue as a consumer lets the assignment access that queue, but it will not start processing cases until the case trigger is enabled. You can manage the case trigger from two places: In the Case Queue Setup dialog (recommended when setting up for the first time):- Open the Case Queue Setup dialog from the builder header.
- Select a queue under Processes Cases (Consumer).
- Enable Runs on new cases to start automatic processing.
- Optionally enable Process cases one at a time to restrict the assignment to processing one case at a time instead of in parallel.
- Click Save — queue setup and trigger settings are saved together.
duvo agents case-triggers list <agent-id>, then toggle it:
Producer and Consumer Pattern
A common pattern is to have one assignment create cases and another process them:- Producer assignment: Runs on a schedule or trigger, identifies work items, and adds them as cases to the queue.
- Consumer assignment: Has a case trigger enabled and automatically picks up and processes each case.
Case Labels
Cases can be tagged with labels to organize and categorize your work. Labels appear as Key: Value pills in the case detail header, making it easy to see how a case has been classified at a glance. Labels are scoped to the queue — when adding a label, an autocomplete popover shows labels already used in that queue, making it easy to apply consistent classifications across cases.Managing Labels
- Assign a label — Open the case detail and click the attributes area. Select an existing attribute and one of its values to apply a label. To create a new label type, enter a new attribute name to add it as a draft, then add values to it — the first saved value promotes the attribute from draft to active.
- Remove a label — Click the × on a label pill to remove it from the case.
- Rename a label — Click the label text to enter inline edit mode. Update the key or value and press Enter to save, or Escape to cancel.
assign_labels tool in their SOP. This lets cases be categorized as part of automated processing — for example, tagging a case with Priority: High or Type: Escalation before completing or handing it over.
Retrying and Updating Cases
You can manually retry or update cases from both the Cases list and the case detail view.- Retry — Cases in Completed, Failed, In Progress, or Needs Input status can be retried. This resets them to Pending — any active Job is stopped first — so they are picked up and processed again. This is useful when a case failed due to a temporary issue, when you want to reprocess a case after updating your assignment’s SOP, or when you need to restart a Job that is stuck or waiting for input.
- Mark as Completed — Manually mark any non-completed case as Completed. Useful when a case was resolved outside the assignment workflow.
- Mark as Failed — Manually mark any non-failed case as Failed. Use this to close out cases that are no longer relevant or cannot be processed.
Delegating Cases to Specific Assignments
You can manually send one or more cases to a specific assignment, bypassing the queue’s automatic trigger. This is useful when a case needs to be handled by a particular assignment — for example, routing to a specialist or re-processing with a different assignment after a failure.Delegating a single case
Open the row actions menu (three-dot icon) on any case and choose Delegate. A dialog opens listing all assignments connected to the queue as consumers. Assignments with their case trigger enabled are labelled Default; those with the trigger disabled are labelled Standalone. Select the target assignment and confirm.Delegating multiple cases
Select the cases you want to delegate using the checkboxes, then click Delegate in the bulk actions bar that appears. Choose the target assignment in the dialog and confirm. Delegation immediately dispatches a Job on the target assignment for each selected case, regardless of the queue’s automatic trigger settings.Human-in-the-Loop with Cases
Cases work with the Human-in-the-Loop feature. If a consumer assignment needs human input while processing a case, it will pause and send a notification to the Activity Inbox. The case shows as Needs Input until the human responds and the assignment completes its work. For guidance on designing escalation patterns, managing Needs Input backlogs, and ramping toward safe autonomy in queue-based workflows, see Designing Human-in-the-Loop Workflows.Organizing Queues
If your team has many queues, you can organize them into folders in the sidebar. Folders help you group related queues together and keep the sidebar manageable as your workload grows.Creating folders
To create a folder, click the + icon next to the Queues heading in the sidebar and choose New folder. Give the folder a name and save it.Moving queues into folders
Drag any queue and drop it onto a folder to move it inside. You can drag from either the sidebar or the main queue overview. A highlighted ring and background on the folder indicate a valid drop target. To move a queue back to the top level, drag it onto the Queues area above all folders. Drag operations require queue management permissions. If you cannot drag a queue, check that your role has permission to manage queues for the team.Queue Statistics
The Queues overview page shows a statistics bar for each queue — a count of cases broken down by status (Total, Pending, Postponed, In Progress, Needs Input, Completed, Failed). These stats help you understand throughput and failure rates at a glance. Use the time period selector (top-right of the overview) to filter statistics to a specific window: All time, Last hour, Last day, Last 7 days, Last 30 days, or Last year. Selecting a period filters the Completed and Failed counts to only cases resolved within that window, so you can see recent throughput rather than all-time totals.Viewing Cases
You can monitor your queue from the Cases page in your team space:- Label columns — Each label group appears as its own column in the cases table, showing the assigned value as a colored chip for every case that has it. This lets you scan and compare label values across cases at a glance without opening each one.
- Filter by status — Show only cases in a specific status: Pending, In Progress, Needs Input, Postponed, Completed, or Failed.
- Filter by labels — Click the Filters button to open the filter dropdown and select one or more label values. Only cases carrying all selected labels are shown. Active filters appear as chips above the table; click the × on any chip to remove it.
- Filter by date — Narrow the list to cases created within a specific date range.
- Search cases by title keyword to find specific items in a large queue.
- Sort cases by date created, last updated, or postponed time — newest first by default.
- Browse pages of results when your queue has many cases (20 per page by default, up to 100).
- View case details including title, data, and processing history.
- Track queue stats to understand throughput and failure rates.
list_cases tool can also filter by label values and a created date range, making it easier to process only a specific subset of cases.
Case Handover
An assignment can hand a case off to another assignment during processing. When the assignment determines that a different specialist should handle the case, it requests a handover instead of completing or failing the case. The case is released and routed to the target assignment, which picks it up and continues processing. This is useful for triage workflows where a general assignment routes cases to specialists, or for escalation paths where routine cases are handled by one assignment and complex ones are escalated to another. The case timeline in the case details view shows which assignment handled each stage. For setup instructions and setup details, see Assignment Handover.Managing Queues and Cases via API
Case queues and cases can be created and managed programmatically using the Duvo Public API. This is useful for provisioning queues, feeding cases from external systems, or triggering processing as part of automation pipelines.Queue operations
- List queues — retrieve all queues for your team
- Create a queue — provision a new queue with a name and description
- Get a queue — fetch details for a specific queue
- Update a queue — rename or update a queue
- Delete a queue — remove a queue
Creating cases via API
You can add cases to a queue directly from an external system using the public API. This is useful when your source of work items lives outside Duvo — for example, a webhook from a CRM, a record created in a database, or the output of a batch job. Endpoint:POST /v1/queues/{queue_id}/cases
You can create a single case or up to 100 cases in one request:
Single case: