/agentic-engineering:adk-model-and-output-contractsfrom Agentic Engineering Skills
Designs and reviews output_schema contracts, model selection, and failover for Python Google ADK agents. Handles structured output validation, repair loops, Gemini model lifecycle, and quota error retries.
Ships in Agentic Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Decide what the model is asked to emit, which model and settings produce it, and how code proves it. Deliver the smallest change to an existing agent or a review with observable findings. Keep the model deciding and code copying identifiers; keep the schema minimal; keep thinking on; keep every claim tied to the pinned ADK version.
google-adk and google-genai versions from the manifest and lockfile. Most behaviour below is for 2.8.0; compatibility lists what changed in 2.6 to 2.11. Keep pins unchanged unless a version decision is requested.model= arguments, Gemini(...), LiteLlm(...), FallbackModel(...), -latest aliases and the agent default (LlmAgent.DEFAULT_MODEL is gemini-3.5-flash in 2.8.0).generate_content_config, planner, output_schema, output_key, mode and tools on each LlmAgent. Note which agents combine output_schema with tools.GOOGLE_GENAI_USE_ENTERPRISE (the deprecated spelling GOOGLE_GENAI_USE_VERTEXAI still works with a DeprecationWarning in 2.8.0), project and location, or an API key. The backend decides how a schema is enforced (output schema and tools). In an Agents CLI project (agents-cli-manifest.yaml present) the scaffold writes GOOGLE_GENAI_USE_ENTERPRISE=true and gemini-3.8-flash; consult the installed google-agents-cli-adk-code skill (references/adk-python.md) for those conventions; if it is not installed, adk-engineer explains how to get it.SKILL_DIR to this skill's directory. They read source only; they never import the project or call a provider.python "$SKILL_DIR/scripts/audit_model_config.py" --project .
python -c 'from app.schemas import Decision; import json; print(json.dumps(Decision.model_json_schema()))' > .adk-evidence/decision.json
python "$SKILL_DIR/scripts/check_response_schema.py" --schema .adk-evidence/decision.json --pydantic-json
The audit reports model strings with a lifecycle status from a dated table (assets/model-lifecycle-2026-10-01.json, refresh it before trusting it), rejected generate_content_config fields, thinking and temperature mismatches, planner precedence and schema-with-tools combinations. The schema checker reports keywords outside the Gemini documented subset, depth, property and enum counts, nullable styles and unresolved $refs. Both direct inspection; neither certifies provider acceptance. Exit 1 from the audit means a partial scan; exit 1 from the checker means unsupported keywords.
| Mode | Read | Produce |
|---|---|---|
| (a) Design an output contract | output contracts | A minimal schema in the documented subset with a nullable refusal path; the model decides, code copies identifiers |
| (b) Harden an existing contract (fences, prose instead of JSON, nulls, validation failures) | validation and repair, then output schema and tools when tools are present | The 2.8.0 save path understood, a bounded repair loop with an explicit failure outcome, finish reasons handled |
| (c) Choose or escalate a model | model selection | Current model IDs with dates, a measured comparison handed to adk-agent-evaluation's two-stage escalation |
| (d) Configure thinking and sampling | reasoning and sampling | thinking_level on Gemini 3, temperature left at 1.0, one place for thinking config, output limit covering thought tokens |
| (e) Add failover | failover and providers | FallbackModel from 2.9.0 or an application-level alternative on 2.8.0, global endpoint decision, LiteLLM caveats |
| (f) Review | All of the above as needed, plus validation | Findings with file and line, each tied to a source-verified behaviour, with the test that would prove the fix |
Modes compose. A model escalation that changes thinking defaults is (c) plus (d); a schema that stops validating after a model change is (b) plus (c).
LlmAgent.output_schema and the key on output_key. generate_content_config rejects tools, system_instruction and response_schema with a ValueError in 2.8.0, and a base URL in http_options. Keep thinking in one place: a BuiltInPlanner.thinking_config overwrites generate_content_config.thinking_config and ADK warns at construction.exclude_none=True.set_model_response tool and an instruction, which is best-effort. A formatting sub-agent without tools is the dependable alternative.validate_schema strips a whole-payload code fence, then raises on invalid JSON or a Pydantic error; the exception leaves the agent run. Catch it at a boundary you own, retry within an attempt budget with the error as feedback, then emit the explicit failure shape. Record which attempt succeeded.thinking_level, leave temperature at its default of 1.0, and size max_output_tokens for thinking plus output. Prefer minimal or low thinking for classification and lookup; keep thinking on for decisions. Reasoning happens before the constrained answer, in the same call or a prior one.Read validation. Three checks are observable without a live model:
before_model_callback or a transport double) showing which config field carried the schema (response_schema plus response_mime_type in 2.8.0) and whether the tools list contains set_model_response, so the native or workaround path is known rather than assumed.Inspection is read-only, and code generation authorises no deployment, paid call or live test. Before any consequential operation (an API, billing or quota change, a billable resource, a secret, IAM, a data migration, a deployment, a deletion, or a paid or destructive test), read consequential operations, present the exact scope and limits, obtain explicit approval and end the turn to wait for it. Cleanup is a separate confirmed operation on resources this workflow created.
Live model calls, model switches in production and new quota or endpoint settings are among them: present model, backend, project, location, request count and cost ceiling. Keep configuration examples synthetic.
Report what was inspected, what the helpers found, which tests ran and what remains unverified. A scripted-model test is local (mocked). Record every URL with its page date; model availability and defaults change faster than this skill.
Label each result with its tier (offline, local, live or release) and
outcome (pass, fail, blocked or not run) as
evidence labels defines them;
earlier, vendor and documentation-only results are historical,
vendor-measured or guidance, never this session's evidence.
Independent community project; not affiliated with or endorsed by Google.
LICENSE (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/model-lifecycle-2026-10-01.json (opens in a new tab)references/compatibility.md (opens in a new tab)references/failover-and-providers.md (opens in a new tab)references/model-selection.md (opens in a new tab)references/operating-rules.md (opens in a new tab)references/output-contracts.md (opens in a new tab)references/output-schema-and-tools.md (opens in a new tab)references/reasoning-and-sampling.md (opens in a new tab)references/sources.md (opens in a new tab)references/validation-and-repair.md (opens in a new tab)references/validation.md (opens in a new tab)scripts/audit_model_config.py (opens in a new tab)scripts/check_response_schema.py (opens in a new tab)tests/test_audit_model_config.py (opens in a new tab)tests/test_check_response_schema.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub ruslankhis/agentic-engineering-skills --plugin agentic-engineering26 skills in this plugin
/adk-agent-evaluationBuild, adapt or audit a Python ADK agent's test strategy: deterministic tool and Runner tests, live eval sets, simulated conversations, conformance replay, strict result checks and quote or citation support. Use for agent behaviour, regression coverage, eval reliability, fixing a failed stage without re-running paid earlier ones, holdout budgets, error analysis on a labelled dev set to fix wrong decisions, measuring each prompt, exemplar or model change, and subject-matter expert labelling: failure taxonomy, inter-rater agreement and judge calibration. Do not activate for non-agent unit tests, standalone model benchmarks, deployment or cleanup alone, prompt wording or exemplar design (adk-agent-instructions), model settings (adk-model-and-output-contracts), wiring eval gates into CI (adk-release-engineering), production telemetry (adk-agent-observability), adversarial suites (adk-agent-security) or presenting results (adk-presenter)./adk-agent-instructionsDesign, review or repair the instructions of Python Google ADK agents, covering instruction structure and altitude, session-state templating, tool-use guidance inside the prompt, sub-agent descriptions for routing, few-shot exemplar design, the instruction-versus-code division, model-generation prompt notes and prompt-as-code layout with change tests. Use when an agent follows its prompt poorly, over- or under-calls tools, routes to the wrong sub-agent, raises templating KeyErrors, or a prompt must move to a new model generation. Do not activate for the measured evaluation loop (adk-agent-evaluation), orchestration or a key an earlier agent's output_key never wrote (adk-workflow-design), tool docstrings and parameter schemas (adk-tool-interface-design), output schemas or model configuration (adk-model-and-output-contracts), releasing prompt versions (adk-release-engineering), or injection-screening products (protect-adk-sensitive-data)./adk-agent-interoperabilityConnect, expose or audit Python Google ADK agents across process boundaries with MCP and A2A: tool-source selection (FunctionTool, OpenAPIToolset, McpToolset, Toolbox, Application Integration), consuming MCP servers (connection, lifecycle, tool_filter, prefixes, headers, the confirmation flag, SDK pin), exposing an agent as an MCP server, the sub-agents versus remote A2A topology decision, consuming a remote agent with RemoteA2aAgent (agent cards, task states, streaming, timeouts), exposing with to_a2a and registering on Agent Runtime or Gemini Enterprise. Use when an agent must call or be called by another service or framework, or to review MCP and A2A wiring. Do not activate for the MCP threat model, allowlists or pinning policy (adk-agent-security), in-process orchestration (adk-workflow-design), OAuth plumbing (adk-tool-auth-and-secrets), one API call's retry policy (safe-api-tool-calls) or deployment (deploy-adk-on-google-cloud)./adk-agent-observabilityInstrument, monitor, alert on and debug Python Google ADK agents in production: the spans, metrics and logs ADK emits and their environment gates, exporters per host, SLIs, SLOs and alerts including Online Monitors, BigQuery Agent Analytics, feedback capture, production traces into evaluation cases, trace-to-session debugging, operations handover to a client's IT team and blameless agent postmortems. Use for missing or duplicated telemetry, token or cost accounting, alert design, dashboards or a production incident on an ADK agent. Do not activate for content-redaction policy (protect-adk-sensitive-data), GKE exporter allowlists and custom spans (optimise-adk-on-google-cloud), evaluation design (adk-agent-evaluation), enforcing budgets (adk-operational-guardrails), canary and rollback (adk-release-engineering), first deployment (deploy-adk-on-google-cloud) or Terraform and CLI scaffolding of telemetry (Google's agents-cli skills)./adk-agent-securityThreat-model, harden or review a whole Python Google ADK agent against prompt injection, tool and MCP supply-chain compromise, excessive agency, insecure output handling and unsafe code execution: the lethal-trifecta check, injection-resistant structure, MCP allowlists and pinning, tool tiering (which actions need confirmation), code-executor selection and an adversarial suite with forbidden-action assertions, mapped to OWASP IDs. Use when an agent reads untrusted content and can act, before exposing MCP servers or code execution, or for a security review. Do not activate for PII screening and Model Armor (protect-adk-sensitive-data), credential plumbing (adk-tool-auth-and-secrets), approval mechanics and budgets (adk-operational-guardrails), MCP or A2A wiring (adk-agent-interoperability), eval harness runs (adk-agent-evaluation), delimiting documents in drafts (adk-workflow-design) or questionnaire answers (adk-governance-pack)./adk-discoveryFind where AI would pay off in a business and pick the first use case, before any system is designed: with a rough area in mind, locate where the current journey breaks, choose the first workflow to improve and the business outcome to measure with its baseline; with no use case at all, go from what the business does and the KPIs it watches to the processes that drive them and the opportunities in them. Every opportunity gets a technology fit (agent, single LLM call, classical machine learning, rules or scripting, or a process change) and the portfolio is ranked. Ends with a discovery brief and the prompt for adk-system-designer. Do not activate when the use case and its measure are already chosen (adk-system-designer), for a change to an existing agent (adk-engineer), for market or competitor research, or to present results (adk-presenter).