PluginBench
Rule

google adk

via PatrickJS/awesome-cursorrules

Design patterns and best practices for building agents, tools, and workflows with Google's Agent Development Kit.

What is google adk?

Google ADK rules provide guidance for architecting multi-agent systems, designing tools with proper validation and error handling, managing session state and memory, handling artifacts, and deploying agents safely. Use this rule when building production agents that need clear responsibility boundaries, secure tool integration, and observable behavior.

  • Define agent design patterns: focused goals, personas, and tool sets with configurable model choices
  • Design typed, validated tools with explicit error handling and secret isolation
  • Manage session state, cross-session memory, and artifact storage separately
  • Structure multi-agent systems by responsibility with proper escalation and routing
  • Add tests, traces, and observability for tool behavior, prompt regressions, and deployment safety

Applies to

File patterns this rule matches.

["**/*.py"
**/*.ts
**/*.tsx
**/*.go
**/*.java
pyproject.toml
"package.json"]
Rule definition (reference)

Source of truth, from the repository.

Google ADK Rules

Agent Design

  • Keep each agent focused on a clear goal, persona, and tool set.
  • Use LLM agents for flexible reasoning and workflow agents for deterministic orchestration.
  • Write instructions that define task boundaries, tool-use rules, and escalation behavior.
  • Split multi-agent systems by responsibility rather than by implementation convenience.
  • Keep model choices configurable.

Tools

  • Give tools narrow, typed inputs and outputs.
  • Validate tool arguments before performing side effects.
  • Keep secrets, credentials, and privileged APIs out of agent prompts.
  • Handle tool errors explicitly and return actionable failure messages.
  • Be aware of ADK tool limitations; some built-in tools cannot be combined with other tools on the same agent.

Sessions, State, and Memory

  • Use session state for current-conversation data.
  • Use memory for cross-session recall and retrieval.
  • Keep state small and serializable.
  • Do not store large files or binary payloads in session state.
  • Make state keys stable and documented.

Artifacts

  • Use artifacts for generated files, uploaded files, reports, images, audio, and other binary data.
  • Configure an artifact service in the runner before relying on artifact operations.
  • Version artifact filenames intentionally and avoid overwriting semantically different outputs.
  • Store only references or summaries in state when full content belongs in artifacts.

Evaluation and Deployment

  • Add tests for tool behavior, agent routing, prompt regressions, and unsafe tool calls.
  • Use trace or event logs to debug agent decisions.
  • Keep local development, staging, and production configuration separate.
  • Add observability for latency, tool failures, token use, and handoff failures.

Common Mistakes

  • Do not make one agent responsible for every workflow.
  • Do not let tools accept arbitrary shell, SQL, or HTTP input without validation.
  • Do not rely on prompt text for access control.
  • Do not hide important side effects behind generic tool names.

Related rules

Build graphical LLM applications by chaining reusable Elements with typed Ports and Payloads.

**/*
41k
via PatrickJS/awesome-cursorrules

HarmonyOS ArkTS component structure, state management, layout, and accessibility patterns.

["**/*.ets" +4
41k
via PatrickJS/awesome-cursorrules

Access real-time news, bias analysis, market data, and options pricing via Helium MCP in Cursor.

**/*
41k
via PatrickJS/awesome-cursorrules

TypeScript development rules for Hashgraph Online AI agents on Hedera using RegistryBrokerClient.

**/*
41k
via PatrickJS/awesome-cursorrules

Create clear, step-by-step how-to documentation for non-technical users.

**/*
41k
via PatrickJS/awesome-cursorrules

Expert HTML, Tailwind CSS, and vanilla JavaScript code generation with modern best practices.

**/*
41k
via PatrickJS/awesome-cursorrules