Google CloudProfessional Agentic Architect2026-092.2 Customizing coding agents for enterprise workflows
Drive Agents CLI with an agent or a human
Completed by the knowledge check
Learning objective
Use Agents CLI through a coding agent or directly as a human operator, and choose the appropriate interaction style across the agent lifecycle. This lesson focuses on who drives the workflow, not on how to author Agents CLI skills or select a deployment target.
Core idea
Think of agent mode and human mode as two controllers for the same lifecycle:
- In agent mode, you describe the outcome to a coding agent. Installed Agents CLI skills give that agent lifecycle guidance, and the coding agent chooses commands, edits files, reads results, and proposes the next action.
- In human mode, you invoke the standalone CLI, edit the agent, and interpret results yourself.
These are workflows, not two execution engines. The official documentation calls them “with a coding agent” and “without a coding agent”; every CLI command also works standalone (Getting started). Google also describes these paths explicitly as Agent Mode and Human Mode (Agents CLI launch post). Changing the controller does not change the generated project, evaluation standard, deployed runtime, or Identity and Access Management (IAM) policy.
Agent mode is also not a global --agent-mode setting. The coding agent uses the same agents-cli executable that a person uses.
How it works across the lifecycle
Agents CLI organizes work as a repeating lifecycle: specify, scaffold, build, orchestrate, evaluate, deploy, publish when needed, and observe. Not every phase has a dedicated CLI verb. For example, a developer or coding agent writes the agent body, while the CLI manages the surrounding scaffold, evaluation, and deployment workflow (Agents CLI lifecycle).
The controller changes how each phase starts, but not what evidence completes it:
| Lifecycle phase | Agent mode | Human mode | Completion evidence |
|---|---|---|---|
| Specify | State the goal and constraints; review the coding agent’s proposed specification | Write and review the specification directly | Agreed requirements, tools, constraints, and success criteria |
| Scaffold and build | Ask the coding agent to create the project; it selects and runs the appropriate scaffold commands, then edits the agent | Run agents-cli scaffold create and edit the generated files | Reviewable code and configuration that match the specification |
| Test and evaluate | Ask the coding agent to run smoke tests and evaluations, analyze failures, and propose fixes | Run agents-cli run, agents-cli playground, and agents-cli eval run; inspect the results | Required behavior passes the agreed evaluation threshold |
| Deploy and publish | Let the coding agent prepare and preview commands; approve production-changing actions according to policy | Run agents-cli deploy --dry-run, deploy, and optionally publish directly | Correct target, reviewed change, successful deployment, and registration if required |
| Observe and iterate | Ask the coding agent to analyze telemetry and turn failures into code or evaluation changes | Inspect telemetry and make the changes yourself | Production evidence feeds the next specification and evaluation cycle |
Agent mode usually reduces command-discovery and coordination effort. The installed skills teach a compatible coding agent how to work across scaffolding, evaluation, deployment, publishing, and observability (Agents CLI repository). It is useful when the desired outcome is clear but the operator does not want to remember every command and artifact.
Human mode offers direct, step-by-step control. It is useful for learning, debugging an unexpected command, creating tightly reviewed automation, or performing a sensitive operation under a runbook. It costs more operator time and requires stronger CLI knowledge.
Key distinctions and trade-offs
The important design choice is who decides and interprets, not which mode is more powerful. Agent mode delegates command selection and iteration to a coding agent. Human mode keeps those decisions with the person at the terminal. Both can use interactive or non-interactive CLI commands.
Agent mode adds one decision-maker between you and the same agents-cli executable.
Neither mode is a security boundary. A coding agent can run with narrow tools, approval gates, and least-privilege credentials. A human can accidentally run a destructive command with broad credentials. Protect important effects with IAM, isolated environments, command previews, CI/CD controls, and explicit approvals rather than relying on the controller’s identity.
The modes can be mixed within one lifecycle. A common pattern is agent mode for scaffolding and repeated evaluation fixes, followed by a human review before deployment. Another is human mode for a reproducible CI command while a coding agent analyzes the resulting failures. Switching controllers does not require recreating the project.
Architecture / decision scenario
A bank is building an internal support agent. During development, engineers use agent mode to turn an approved specification into a scaffolded project, add tools, and repeat agents-cli eval run after each fix. This shortens the feedback loop and lets the coding agent apply the lifecycle skills.
The release pipeline uses direct CLI commands instead. It runs the recorded evaluation suite, previews the deployment, and pauses for an authorized human approval before production. After release, engineers inspect traces and give a coding agent selected failure cases to reproduce and fix.
This hybrid design uses the coding agent where exploration and iteration are valuable, and direct commands where reproducibility and separation of duties matter. The bank does not treat human mode as the control itself: IAM, CI permissions, evaluation gates, and deployment approval enforce the boundary.
Common exam traps
- Treating agent mode as a different Agents CLI runtime or as a global CLI flag. It is a coding-agent-driven workflow over the same CLI.
- Confusing human mode with the scaffold command’s interactive prompts. Interactive versus non-interactive input is a command behavior; agent versus human describes who drives the lifecycle.
- Confusing
agents-cli run --url URL --mode adkwith agent mode. In that command,--mode adkselects the protocol used to query a deployed agent, not whether a coding agent or a person controls the CLI (runcommand source). - Assuming agent mode removes review or approval requirements. Delegation does not authorize production changes.
- Assuming human mode is automatically reproducible. Reproducibility comes from explicit commands, pinned inputs, version control, and CI records.
- Choosing one mode for the entire lifecycle when a phase-by-phase hybrid provides better speed and control.
What to remember
- Agent mode delegates lifecycle navigation to a skill-equipped coding agent; human mode keeps it with the terminal operator.
- Both modes use the same CLI, project artifacts, evaluations, and deployment targets.
- Choose the controller separately for each lifecycle phase.
- Treat approval, IAM, isolation, and CI/CD as controls; the mode itself is not a security boundary.
- Do not confuse operator mode with interactive prompts or the
run --modeprotocol option.
Knowledge check
A project was scaffolded and evaluated through a coding agent using Agents CLI. Release operators now need to run recorded commands directly. What does this switch require?
A release pipeline must run evaluations through Agents CLI without a coding agent reinterpreting the task. A reviewer proposes adding --mode adk to agents-cli run to switch the run to human mode. What should the pipeline do?
--mode adk so the CLI ignores installed skills--mode selects a protocol--mode selects the query protocol, there is no global mode flag, and installed skills only matter to a coding agent.References
- Google Agents CLI, Getting started
- Google Agents CLI, The lifecycle
- Google Developers Blog, Agents CLI in Agent Platform: Create to production in one CLI
- Google, Agents CLI GitHub repository
- Google Codelabs, Agents CLI in Agent Platform: From development to production