Features
- Built with Google ADK framework
- Email sending via Resend API
- LiteLLM model integration
- ADK CLI and Dev UI support
- Production-ready structure
Prerequisites
- Python 3.10 or higher
- Nebius API key from Nebius AI Studio
- Resend API key from Resend
Installation
Implementation
Email Tool
Create a tool for sending emails:agent.py
Model Configuration
agent.py
Agent Definition
agent.py
Usage
Run with ADK CLI
Run Directly
Technical Details
Google ADK Components
Agent
Core agent class with name, model, and tools
LiteLlm
Model provider supporting multiple LLM backends
Tools
Python functions exposed to the agent
ADK CLI
Command-line interface for running agents
Agent Configuration
ADK CLI Commands
Development
Agent Testing
The ADK Dev UI provides:- Interactive chat interface
- Tool execution visualization
- Debug logs
- Request/response inspection
Extending the Agent
Add More Tools
Customize Email Content
Use Different Models
Add Multi-Agent System
Best Practices
Tool Design
Tool Design
- Keep tools focused and simple
- Provide clear docstrings
- Handle errors gracefully
- Return structured responses
Agent Configuration
Agent Configuration
- Write clear descriptions
- Provide specific instructions
- Use descriptive names
- Test with ADK Dev UI
Email Integration
Email Integration
- Use verified sender addresses
- Validate recipient emails
- Handle API rate limits
- Log email status
Error Handling
Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
NEBIUS_API_KEY | Nebius API key | - | Yes |
NEBIUS_API_BASE | Nebius API endpoint | https://api.studio.nebius.ai/v1 | Yes |
RESEND_API_KEY | Resend API key | - | Yes |
ADK Dev UI Features
- Chat Interface: Test agent interactions
- Tool Visualization: See tool calls in real-time
- Debug Console: View logs and errors
- Request Inspector: Examine LLM requests/responses
- Agent Switcher: Test multiple agents
Next Steps
Advanced ADK
Build complex multi-agent systems
Tool Integration
Connect more external services