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 Your Profile → API keys — scoped to a single team or to all teams you can access — and store it as a secret environment variable in your CI system (GitHub Actions secrets, GitLab CI variables, AWS Secrets Manager, etc.). Users with the Manager role or above can also create and view a team’s keys at Team Settings → API keys.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:Create a new key
Create a new key at Your Profile → API keys.
Update the CI secret
Update the key in your CI secret store.
Delete the old key
Delete the old key from the dashboard.
GitHub Actions example
Common scripting patterns
Start a Run and wait for it to finish
duvo runs start returns immediately. Poll duvo runs get until the Run reaches a terminal status:
Upload files before starting a Run
When your Agent needs to process files, create a sandbox, upload the files, and pass the sandbox ID to the run:Bulk-reprocess Cases on an Agent
When you need to route a set of Cases to a specific Agent — for example, assigning a backlog of items after a new Agent 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 Run output from a completed run
After a Run finishes, pull the assistant’s messages to feed the output into downstream systems:Roll out an Agent config change to multiple Agents
When a shared config file is updated (for example, a common AOP or tool set), push it as a new Revision across every affected Agent:Worked examples
Example 1: One-shot Run trigger
Trigger a Run from any shell or pipeline and print the final output. Exit non-zero if the Run fails.Example 2: Nightly Agent config sync from Git
Store Agent 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 Agent Setups alongside your application code.
Repository layout:
.github/workflows/sync-assignments.yml):
Example 3: Weekly Run-status report
Run weekly in CI to summarize how many Runs completed, failed, or are still running across your key Agents. Post the summary wherever your team receives reports.slack-cli, mail, or any notification tool your team uses.
Tips
Related
Starting Runs
Full command reference for
duvo runsManaging Agents
Creating Agents and Revisions
Cases and Queues
Bulk Case operations
Advanced Commands
duvo api, sandboxes, and raw API accessPublic API Reference
REST alternative if you need more than the CLI offers