Authentication in CI/CD and scripts
Use an API key, not OAuth
OAuth sessions require a browser login and are bound to a user’s session. For CI/CD pipelines and server-side scripts, use an API key instead. Generate a key at Team Settings → API Keys and store it as a secret environment variable in your CI system (GitHub Actions secrets, GitLab CI variables, AWS Secrets Manager, etc.).Pass the key as an environment variable
The CLI readsDUVO_API_KEY automatically, so you never need to touch a config file or run duvo login in a pipeline:
Rotating API keys
API keys do not expire by default. Rotate them by:- Creating a new key at Team Settings → API Keys.
- Updating the key in your CI secret store.
- Deleting the old key from the dashboard.
GitHub Actions example
Common scripting patterns
Start a Job and wait for it to finish
duvo runs start returns immediately. Poll duvo runs get until the Job reaches a terminal status:
Upload files before starting a Job
When your Assignment needs to process files, create a sandbox, upload the files, and pass the sandbox ID to the run:Bulk-delegate Cases to an Assignment
When you need to route a set of Cases to a specific Assignment — for example, assigning a backlog of items after a new Assignment is deployed:--ids accepts a comma-separated list of up to 100 Case IDs. The --yes flag skips the confirmation prompt, which is required in non-interactive scripts.
Collect Job output from a completed run
After a Job finishes, pull the assistant’s messages to feed the output into downstream systems:Roll out an Assignment config change to multiple Assignments
When a shared config file is updated (for example, a common SOP or tool set), push it as a new Revision across every affected Assignment:Worked examples
Example 1: One-shot Job trigger
Trigger a Job from any shell or pipeline and print the final output. Exit non-zero if the Job fails.Example 2: Nightly Assignment config sync from Git
Store Assignment configs as JSON files in a Git repository and push any changed configs to Duvo on every merge tomain. This lets you version-control your Assignment Setups alongside your application code.
Repository layout:
.github/workflows/sync-assignments.yml):
Example 3: Weekly Job-status report
Run weekly in CI to summarize how many Jobs completed, failed, or are still running across your key Assignments. Post the summary wherever your team receives reports.slack-cli, mail, or any notification tool your team uses.
Tips
- Always add
--yesto bulk operations (bulk-delegate,bulk-update-status,cases delete) in scripts so they don’t block waiting for confirmation. - Combine
--jsonwithjqfor all scripting — human-readable output can change between CLI versions, but JSON is stable. - Set
DUVO_PROFILEto target a non-default profile (e.g., staging) without changing your shell’s default:DUVO_PROFILE=staging duvo runs start --agent "$AGENT_ID" --json. - Run
duvo <command> --helpto see the full flag set for any command.
Related
- Running Jobs — full command reference for
duvo runs - Managing Assignments — creating Assignments and Revisions
- Cases and Queues — bulk Case operations
- Advanced Commands —
duvo api, sandboxes, and raw API access - Public API Reference — REST alternative if you need more than the CLI offers