Project structure
Here’s a breakdown of the key files in your project after runningadk init:
src
actions
conversations
knowledge
tables
triggers
workflows
evals
.mcp.json
agent.config.ts
agent.json
agent.local.json
AGENTS.md
CLAUDE.md
agent.json file stores the shared production link (workspaceId, botId, and apiUrl) and is safe to commit. The agent.local.json file is gitignored and holds per-developer overrides, including the development bot ID (devId).
The ADK scans src/ and discovers primitives automatically. Each file exports a primitive (a Conversation, Workflow, Action, etc.) and the framework registers it at build time.
agent.config.ts
Everything about your agent is configured in agent.config.ts by calling defineConfig and passing in a configuration object.
Here’s the hello-world template default configuration with all available fields shown:
Models
ThedefaultModels field controls which LLM your agent uses:
| Model | Used by |
|---|---|
autonomous | execute() calls in conversations and workflows |
zai | Zai operations like zai.extract(), zai.check(), zai.text() |
defaultModels, the ADK defaults to openai:gpt-4.1-mini-2025-04-14 for autonomous and openai:gpt-4.1-2025-04-14 for zai.
You can pass an array of models for fallback. If the first model fails, the next one is tried:
execute() call:
State
Thestate field lets you define schemas for data that your agent can persist across a certain scope. There are two available scopes:
| Scope | Persists across | Use for |
|---|---|---|
bot | All conversations and users | Global counters, shared config |
user | All conversations for a given user | Preferences, profile data |
Tags
Thetags field lets you define metadata that you can attach to bots, users, conversations, messages, and workflows:
Secrets
Thesecrets field lets you store sensitive values, like API keys or tokens. They are declared here, but values are managed separately per environment and never committed to version control:
Configuration
Theconfiguration field defines static, deploy-time settings. Unlike state, these are read-only at runtime:
Dependencies
Dependencies declare which integrations your agent uses. Add them with the CLI:agent.config.ts:
Custom events
Theevents field lets you define custom events your agent can emit and subscribe to:
Evals
Theevals field lets you configure how your agent’s automated tests run:
| Field | Description |
|---|---|
idleTimeout | Milliseconds to wait for the agent to respond before timing out |
judgePassThreshold | Pass threshold for LLM judge assertions (1-5) |
judgeModel | Model used for LLM judge assertions |