Skip to content

Examples

Ask the way you would ask a colleague. The agent picks the tools; this page shows which ones it typically uses, so you know what to expect and which permissions each task needs. Tools that change data ask for your confirmation in clients like Claude Code unless you allowed them.

Topics

What topics does rod have open?

topic_search with assigned_to: ["rod"] and only_open: true (or created_by for the topics rod opened). Usernames and user mids both work.

Promote topic 4321 to In Review.

topic_list_next_statuses to see where it may go, then topic_change_status with mid: "4321" and status: "In Review". Statuses go by name.

Why can't I move topic 4321 to Done?

topic_explain_status_change answers with the reasons: the workflow has no such transition (and where the topic can go instead), the roles that allow it against the roles you hold in the topic's projects, a workflow of the topic itself, a status reached only by a deployment job, or a required field that is empty. It changes nothing.

Summarize what happened to topic 4321 this week.

topic_get, topic_get_activity, topic_list_comments and topic_list_jobs, then a summary in its own words.

Jobs and their logs

What was the error in the most recent job of topic 1234?

topic_list_jobs for the topic's jobs, then job_get_root_cause and job_logs with levels: ["error"] on the latest one.

Deploy changeset 101 to QA and tell me when it is done.

job_list_transitions (where it can go), calendar_check_window (when), job_create with bl: "QA" and changesets: ["101"], then job_get and job_logs with the since_id cursor until the job ends.

How many jobs are running for the Web project right now?

project_list or ci_search_global to find the project's mid, then job_list with status: ["RUNNING"] and project: [...]; the answer's total is the count.

Cancel job JOB-00012. Retry the failed step of JOB-00013.

job_cancel; job_trap_action with action: "retry" for a job stopped in a trap, or job_restart with a step for a job that ended.

Rules

Change the rule that job used so it prevents that error.

job_get names the pipeline rule; hcl_get_rule reads it as HCL; the agent edits the text, checks it with hcl_check (syntax, compile and critic), and saves it with hcl_save_rule passing the version_id it read as base_version. If someone saved the rule in between, it gets a conflict instead of overwriting their change. Every save is a new version: rule_list_versions, rule_diff_versions and rule_restore_version undo it.

Which rules react to topic status changes?

rule_list with rule_type: "event", then rule_get on the ones whose event matches; rule_list_events lists the events rules can react to.

Administration

What permissions does user jdoe have?

user_roles_projects (their roles in each project, directly and through groups), then role_get for the actions of each role.

Give jdoe the Developer role in the Web project.

user_assign_roles, which needs the right to grant that role (role_grantable lists the roles you may grant).

Which servers have no working agent?

ci_search on the server collections, then server_check_connection on each.

What do the dispatcher log errors since noon have in common? (administrators)

system_list_logs, then system_read_log on the dispatcher's log with query: "error", and a summary.

Resources, files and commands

Send /opt/files/app.conf from web01 to web02.

file_get from web01, then file_put to web02. For whole directory trees, file_sync copies with rsync.

Restart the app on the QA servers.

ci_search for the servers, then server_execute on each with the command; the answer has the exit code and the output.

Save this as a REPL script, and list the scripts we have. (REPL users)

repl_save_script and repl_list_scripts. Running Perl on the server (repl_eval) is for administrators who also hold the REPL permission.

SBOM and vulnerabilities

Which packages of release 7.24 are vulnerable, and what do we upgrade them to?

sbom_release with the mid of the release topic: the vulnerable packages of the release and of its changesets, the most severe first. Each one has upgrade_to (the lowest version that fixes all its findings), the manifests that declare it (locations[].declared_in) and, for a transitive dependency, brought_by: the direct dependency to update. not_analyzed lists the repositories of the topics with no SBOM yet.

Fix the critical ones in the branch of topic 4321, and check.

With the packages of sbom_release (min_severity: "CRITICAL"), the agent updates the declared versions and lockfiles in the topic branch and pushes it; then sbom_analyze on the topic, sbom_task until its status is done, and sbom_release (or sbom_vulnerabilities with topic) to see the findings gone.

That finding doesn't apply to us, suppress it.

sbom_set_vuln_status with the vuln_id and status: "suppressed".

Tips for good results

  • Name things the way Clarive does: topic mids, job names, rule names, environment names (QA, PROD) and project names.
  • Ask for summaries of long things ("the errors of that log", "the last ten jobs") rather than all of it; agents page through lists with limit and skip.
  • Start agents with a read token when they explore, and give them write access when you are there to approve what they do.