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 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. Any active Runs for the specified Cases are interrupted:--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 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-reprocess,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
- Starting Runs — full command reference for
duvo runs - Managing Agents — creating Agents 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