Skip to content

Commit 930c25d

Browse files
Google Team Membercopybara-github
authored andcommitted
fix(cli): pin base_agent and id in agent create example
The `create` example set on `CreateAgent` in `gen.lock` carried synthesized `<value>` and `<id>` placeholders for `base_agent` and `id`. Because named example sets are rendered in compact help and take priority over schema property examples, `gemini-api agent create --help` printed `gemini-api agent create --base-agent <value> --id <id>`. Add a `create` request-body example (`base_agent: antigravity-preview-05-2026`, `id: research-assistant`, matching `agent get` and `agent delete`) on `POST /{api_version}/agents` in `overlays/cli/examples.yaml`, and regenerate the CLI. PiperOrigin-RevId: 991030646
1 parent 2854781 commit 930c25d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,32 +474,32 @@ Commands are grouped the way `gemini-api --help` shows them. Every command accep
474474
<!-- Start Request Body Input [stdinpiping] -->
475475
## Request Body Input
476476
477-
Commands that accept a request body take it three ways, with a clear priority chain. The examples use `gemini-api environments create`; every body-bearing command works the same way and prints its exact request schema with `--schema`.
477+
Commands that accept a request body take it three ways, with a clear priority chain. The examples use `gemini-api agent create`; every body-bearing command works the same way and prints its exact request schema with `--schema`.
478478
479479
### `--body` flag
480480
481481
Provide the entire request body as a JSON string:
482482
483483
```bash
484-
gemini-api environments create --body '{"network":{"allowlist":[{"domain":"github.com","transform":[{"Authorization":"Bearer your-token"}]},{"domain":"*.googleapis.com"}]}}'
484+
gemini-api agent create --body '{"base_agent":"antigravity-preview-05-2026","id":"research-assistant"}'
485485
```
486486
487487
### Stdin piping (lowest priority)
488488
489489
Pipe JSON into any command that accepts a request body:
490490
491491
```bash
492-
echo '{"network":{"allowlist":[{"domain":"github.com","transform":[{"Authorization":"Bearer your-token"}]},{"domain":"*.googleapis.com"}]}}' | gemini-api environments create
492+
echo '{"base_agent":"antigravity-preview-05-2026","id":"research-assistant"}' | gemini-api agent create
493493
```
494494
495495
This is useful for chaining commands, reading from files, or scripting:
496496
497497
```bash
498498
# Read body from a file
499-
gemini-api environments create < request.json
499+
gemini-api agent create < request.json
500500
501501
# Pipe from another command
502-
curl -s https://example.com/request.json | gemini-api environments create
502+
curl -s https://example.com/request.json | gemini-api agent create
503503
```
504504
505505
### Priority

‎internal/cli/agent/create.go‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)