-
Notifications
You must be signed in to change notification settings - Fork 1.5k
docs: add AGENTS.md for AI contributors #989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wustwyh
wants to merge
1
commit into
GoogleCloudPlatform:main
Choose a base branch
from
wustwyh:docs/add-agents-md
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Agent Starter Pack — Notes for AI Contributors | ||
|
|
||
| This file contains quick-reference information for agents (and humans) contributing to the Agent Starter Pack (ASP). | ||
|
|
||
| ## Project Overview | ||
|
|
||
| ASP is a **template generator**, not a runtime framework. The CLI scaffolds standalone agent projects that users customize and deploy on Google Cloud. | ||
|
|
||
| > ⚠️ **Maintenance mode**: Active development has moved to [`agents-cli`](https://github.com/google/agents-cli). ASP receives critical fixes only. New projects should use `agents-cli`. | ||
|
|
||
| ## Repository Layout | ||
|
|
||
| | Path | Purpose | | ||
| |------|---------| | ||
| | `agent_starter_pack/base_templates/<language>/` | Core Jinja scaffolding (Python, Go, more coming) | | ||
| | `agent_starter_pack/deployment_targets/` | Environment-specific overrides (`cloud_run`, `gke`, `agent_engine`) | | ||
| | `agent_starter_pack/frontends/` | UI-specific files | | ||
| | `agent_starter_pack/agents/` | Agent-specific logic and configurations (`adk`, `adk_a2a`, `adk_live`, `langgraph`, `agentic_rag`, etc.) | | ||
| | `agent_starter_pack/cli/` | CLI command implementations and shared utilities | | ||
| | `tests/` | Unit and integration tests | | ||
|
|
||
| ## Development Commands | ||
|
|
||
| Uses [`uv`](https://docs.astral.sh/uv/) for dependency management. | ||
|
|
||
| ```bash | ||
| # First-time setup | ||
| make install | ||
|
|
||
| # Run linters (ruff + ty + codespell) | ||
| make lint | ||
|
|
||
| # Run unit tests | ||
| make test | ||
|
|
||
| # Lint generated templates for a specific combination | ||
| _TEST_AGENT_COMBINATION="adk,cloud_run,--session-type,in_memory" make lint-templated-agents | ||
| ``` | ||
|
|
||
| ## Template Development Workflow | ||
|
|
||
| When modifying Jinja templates: | ||
|
|
||
| 1. Generate a test instance: | ||
| ```bash | ||
| uv run agent-starter-pack create mytest -p -s -y -d cloud_run --output-dir target | ||
| ``` | ||
| 2. Iterate in `target/mytest/` using `make lint` and running the code. | ||
| 3. Backport changes to the source Jinja templates in `agent_starter_pack/`. | ||
| 4. Validate across combinations: | ||
| ```bash | ||
| _TEST_AGENT_COMBINATION="adk,cloud_run" make lint-templated-agents | ||
| _TEST_AGENT_COMBINATION="adk,agent_engine" make lint-templated-agents | ||
| _TEST_AGENT_COMBINATION="adk_live,cloud_run" make lint-templated-agents | ||
| ``` | ||
|
|
||
| See [`CONTRIBUTING.md`](./CONTRIBUTING.md) and [`GEMINI.md`](./GEMINI.md) for full details, including critical Jinja whitespace patterns. | ||
|
|
||
| ## Code Style | ||
|
|
||
| - Python: `ruff` (line length 88, target `py311`), `ty` type checker, `codespell`. | ||
| - Go templates: follow the conventions in `base_templates/go/`. | ||
| - Keep generated output deterministic and backward-compatible. | ||
|
|
||
| ## Contribution Tips for Agents | ||
|
|
||
| - Prefer small, focused PRs. | ||
| - Do not change core schema/agent/model tools unless required by an open issue. | ||
| - Run `make lint` and `make test` before pushing. | ||
| - When in doubt, generate a test project and verify the rendered output compiles. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path to the Go templates is
agent_starter_pack/base_templates/go/rather thanbase_templates/go/. Let's update this to use the full path from the repository root to avoid confusion for contributors and AI agents.