# Useful but Little-Known Features of ADK 2.0
🌍 What if you could define AI agents with just a YAML file — no Python code required?
ADK 2.0's Agent Config lets you declaratively define agents in YAML or JSON configuration files. Build, run, and modify agents without writing code.
📌 Title: Agent Config (Declarative Agent Definition)
🔗 URL:
🧩 Overview
Agent Config lets you declaratively specify an agent's name, model, description, and instructions in YAML or JSON. You can define tools (built-in like google_search, or custom), and sub-agents (referencing other config files via config_path). It supports LlmAgent; the LangGraphAgent and A2aAgent types are not yet supported. Configured agents can be executed via `adk web`, `adk run`, `adk api_server`, or programmatically through `from_config()`.
🛠 How to use it
Define your agent in a YAML file and run it with the ADK CLI.
```yaml
# root_agent.yaml
name: research_assistant
model: gemini-2.0-flash
description: An agent that assists with research
instruction: |
Use the search tool to investigate the latest information
for the user's question and provide a clear answer.
tools:
- name: google_search
sub_agents:
- config_path: ./summarizer.yaml
```
```bash
# Run via CLI
adk web # Interactive browser UI
adk run # Terminal execution
```
For programmatic usage, generate an agent object with `from_config()`.
🏗 Building it into production
・Manage agent definitions as YAML files in Git for full change history tracking
・Maintain separate config files per environment (dev/staging/production)
・Use config_path in sub_agents to build reusable agent modules
・Deploy config-based agents as APIs using `adk api_server`
💡 Use cases
📝 Non-engineers can modify agent behavior by editing YAML alone
🔄 Version-controlled agent definitions with automated CI/CD deployment
🧩 Reuse common sub-agents across multiple projects
🚀 Consistent configuration management from prototype to production
⚠️ Watch out
This feature is currently experimental. It only supports Gemini models — LangGraphAgent and A2aAgent are not yet supported. For complex custom logic or callbacks, the traditional Python code-based approach remains more appropriate. The specification may change in future versions, so check the latest documentation before production adoption.
✨ Agent Config dramatically lowers the barrier to defining and operating agents. It's especially effective for team collaboration and streamlined configuration management.
#
ADK# #
AIAgent#