Overview
The ADK CLI provides four main commands for managing your AI agent projects. Each command is designed for specific workflows in the development lifecycle.Global Options
Version
Display the CLI version:Help
Display help information:adk new
Create a new ADK project from a starter template.Usage
Arguments
project-name(optional) - Name of the project directory to create. If omitted, you’ll be prompted.
Options
| Option | Alias | Description |
|---|---|---|
--template <name> | -t | Template to use without prompt |
Available Templates
simple-agent- Basic agent with chat capabilitiesdiscord-bot- Agent integrated with Discordtelegram-bot- Agent integrated with Telegramhono-server- Web server with agent endpointsmcp-starter- Model Context Protocol servershade-agent- Near Shade Agent starternext-js-starter- Full-stack agent app with Next.js and Tailwind
Interactive Workflow
When you runadk new without arguments, the CLI guides you through:
Examples
Interactive mode:Terminal Output
adk run
Start an interactive chat session with an agent in your project.Usage
Arguments
agent-path(optional) - Relative path to a specific agent file
Options
| Option | Alias | Description |
|---|---|---|
--server | -s | Start API server only (no chat interface) |
--host <host> | -h | Host for server or API URL target |
--verbose | Enable verbose logging | |
--hot | Enable hot reloading of agents | |
--watch <paths> | Comma-separated paths to watch for hot reload |
Modes
Interactive Chat (Default)
Starts an interactive terminal chat session with your agent:- Auto-discovers agents in your project
- Markdown rendering in the terminal
- Streaming responses with spinner
- Multi-agent selection when multiple agents exist
- Exit with
Ctrl+Cor typeexit/quit
Server Only Mode
Start the API server without the interactive chat interface:- Running agents as a background service
- Integration with external tools
- Development with custom frontends
Hot Reload Mode
Automatically reload agents when files change:Examples
Basic interactive chat:Terminal Output
adk serve
Start an HTTP API server for agent management and interaction.Usage
Options
| Option | Alias | Description |
|---|---|---|
--port <port> | -p | Port for the server (default: 3210) |
--host <host> | -h | Host address (default: localhost) |
--dir <directory> | -d | Directory to scan for agents (default: cwd) |
--quiet | -q | Reduce logging output |
--swagger | Force enable OpenAPI documentation | |
--no-swagger | Disable OpenAPI documentation |
API Endpoints
The server exposes the following REST endpoints:Health Check
List Agents
Send Message
OpenAPI Documentation
When enabled, Swagger UI is available at:Examples
Start with defaults:Terminal Output
adk web
Start a web interface for testing and interacting with agents visually.Usage
Options
| Option | Alias | Description |
|---|---|---|
--port <port> | -p | Port for API server (default: 3210) |
--host <host> | -h | Host address (default: localhost) |
--dir <directory> | -d | Directory to scan for agents (default: cwd) |
--web-url <url> | Use hosted web UI at specified URL |
Modes
Bundled Mode (Default)
Serves the web UI from bundled assets on the same port as the API:http://localhost:3210.
Hosted Mode
Use the hosted web interface with a local API server:If bundled assets are not available (e.g., during development), the CLI automatically falls back to hosted mode.
Features
- Visual Chat Interface - Rich web-based chat UI
- Agent Selection - Dropdown to switch between agents
- Markdown Rendering - Full markdown support in responses
- Code Highlighting - Syntax highlighting for code blocks
- Session Persistence - Maintains conversation history
- Responsive Design - Works on desktop and mobile
Examples
Start with defaults:Terminal Output
Bundled mode:Environment Variables
The CLI respects these environment variables across all commands:Tips & Best Practices
Development Workflow
Use
adk run --hot during development for instant feedback on agent changesTesting Agents
Use
adk web for visual testing and adk run for quick terminal-based testingProduction Deployment
Use
adk serve --quiet --port 3000 for production API serversMulti-Agent Projects
Organize agents in an
agents/ directory for automatic discovery