Skip to content
Back to skills

Agent Construction

ASecurity

"Build and troubleshoot ADK Python Agent/LlmAgent definitions,

  • 247 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 8, 2026
toolspythongonodeapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill agent-construction --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Construction?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Construction
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-agent-construction/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-agent-construction)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-construction
description: "Build and troubleshoot ADK Python Agent/LlmAgent definitions,
  model settings, modes, callbacks, schemas, and multi-agent delegation."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# ADK Python Agent Construction

Use this sub-skill when a user asks to define, revise, or debug Python ADK agents built with `google.adk.Agent` or `google.adk.agents.LlmAgent`.

## Route Here

- Create a minimal `root_agent`, add `model`, `instruction`, `description`, tools, callbacks, or schemas.
- Choose between `mode="chat"`, `mode="task"`, and `mode="single_turn"` for LLM agents and sub-agents.
- Build hierarchical multi-agent systems with `sub_agents`, delegation descriptions, `task` agents, or `single_turn` helper agents.
- Add structured input/output with Pydantic schemas, `output_schema`, `input_schema`, and `output_key`.
- Diagnose constructor validation errors, missing model credentials, callback ordering, schema/tool interactions, and sub-agent context isolation.

## Route Elsewhere

- Workflow graph nodes, `Workflow`, `BaseNode`, graph edges, dynamic nodes, joins, and workflow HITL: use `workflow-orchestration`.
- ADK CLI commands, YAML app loading, `adk run`, `adk web`, deployment, and config schema generation: use `cli-configuration-deployment`.
- Tool internals, toolsets, MCP/OpenAPI/Google API tools, auth flows, and optional integration extras: use `tools-and-integrations`.
- Runner services, sessions, memory, artifacts, plugins, telemetry, and code executors: use `runtime-services`.
- Modifying the ADK source repository itself, style, focused tests, docs, or samples: use `repo-development`.

## Quick Start

1. Import from the public package: `from google.adk import Agent` or `from google.adk.agents import LlmAgent, RunConfig`.
2. Name agents with valid Python identifiers; never use `user` as an agent name.
3. Put model behavior in `instruction`, static generation options in `generate_content_config`, tools in `tools`, and final response schemas in `output_schema`.
4. Expose a Python app by defining `root_agent = Agent(...)` in an importable module.
5. Use a `Runner` only after selecting runtime services and creating or auto-creating sessions; this sub-skill focuses on the agent definitions.

```python
from google.adk import Agent


def get_weather(city: str) -> str:
  """Return a simple weather summary."""
  return f"Weather for {city}: sunny."


root_agent = Agent(
    name="weather_agent",
    model="gemini-3.5-flash",
    instruction="Answer weather questions and call tools when needed.",
    tools=[get_weather],
)
```

## References

- [API reference](references/api-reference.md) — constructor fields, imports, validation rules, callbacks, schemas, `RunConfig`, and `Runner.run` invocation shape.
- [Workflows](references/workflows.md) — recipes for minimal agents, sample app layout, callbacks, structured output, `task` and `single_turn` sub-agents, and multi-agent delegation.
- [Troubleshooting](references/troubleshooting.md) — fixes for generation config errors, schema/tool behavior, model credentials, branch isolation, callback order, and tool error callbacks.
- [Inspection script](scripts/inspect_agent_api.py) — safe local diagnostic that prints installed ADK signatures and constructs a no-network minimal agent.

## Agent-Construction Checklist

- Agent tree has unique, identifier-safe names and clear one-line `description` strings for delegatable sub-agents.
- Root `LlmAgent` runs in chat mode; `task` and `single_turn` are usually child agents exposed to the parent as tools.
- `output_schema` is used for final structured responses; `generate_content_config.response_schema` is not used on `LlmAgent`.
- Tool callables have docstrings and typed parameters; deeper toolset/auth issues route to `tools-and-integrations`.
- Callback functions return `None` to continue, or the documented override shape to short-circuit or replace model/tool behavior.
- Model/provider credentials and optional extras are treated as deployment assumptions, not as requirements for constructing an in-memory agent object.

Files in this skill

  • SKILL.md4.1 KB
  • references/api-reference.md11.5 KB
  • references/troubleshooting.md9.2 KB
  • references/workflows.md11.7 KB
  • scripts/inspect_agent_api.py2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…