Development Server
The ADK Utils Example uses Next.js 16 with the App Router. Follow these steps to run the application locally.Start Development Server
Available Scripts
The project includes several npm scripts for different development tasks:Development Scripts
package.json
| Script | Command | Description |
|---|---|---|
dev | npm run dev | Starts the Next.js development server with hot reload |
build | npm run build | Creates an optimized production build |
start | npm run start | Runs the production build |
lint | npm run lint | Runs ESLint to check code quality |
adk:web | npm run adk:web | Launches the ADK web tool for agent inspection |
ADK Web Tool
The ADK Web Tool is a powerful development utility that allows you to inspect and debug your AI agents.Launching ADK Web Tool
Features
- Agent Inspection: View all configured agents and their properties
- Tool Visualization: See all available tools (e.g.,
get_current_time,create_mermaid_diagram) - Model Configuration: Inspect model settings and parameters
- Interactive Testing: Test agents directly from the web interface
The ADK web tool is especially useful for debugging agent behavior and understanding tool execution flow.
Hot Reload and Development Workflow
Next.js provides fast refresh capabilities for an optimal development experience:What Gets Hot Reloaded?
- React Components: All
.tsxand.jsxfiles in theapp/andcomponents/directories - API Routes: Changes to files in
app/api/trigger server restarts - Agent Configuration: Modifications to agent files in
app/agents/ - Styles: Tailwind CSS classes and global styles update instantly
Development Workflow
- Make Changes: Edit your code in any file
- Instant Feedback: See changes reflected in the browser immediately
- Preserve State: React Fast Refresh maintains component state when possible
- API Testing: Use the chat interface to test agent responses
- Frontend Changes
- Backend Changes
- Agent Changes
Changes to React components, UI elements, and styles are reflected instantly without refreshing the page.
Example: Editing a Component
Development Environment
Requirements
- Node.js: Version 18 or higher
- Package Manager: npm, yarn, or pnpm
- Browser: Modern browser with JavaScript enabled
Port Configuration
By default, the development server runs on port3000. To use a different port:
Troubleshooting
Common Issues
Port Already in UseNext Steps
Testing
Learn how to run unit and E2E tests
Configuration
Configure environment variables and settings