This document explains how to use the new Google Agent Development Kit (ADK) implementation of Tapio Assistant, which provides a more robust, production-ready alternative to the Gradio interface.
The ADK implementation provides:
- Agent-First Architecture: Built specifically for AI agents with conversation state management
- Production-Ready APIs: FastAPI-based backend with comprehensive API endpoints
- Built-in Development UI: Professional debugging and testing interface
- Event-Driven Communication: Proper agent communication and workflow management
- Production Deployment: Ready for containerization and cloud deployment
Google ADK is already included in the project dependencies. If you need to install it separately:
uv add google-adkLaunch the Tapio Assistant using the ADK server:
# Basic usage
uv run -m tapio.cli adk-server
# With custom configuration
uv run -m tapio.cli adk-server --model-name llama3.2 --port 8000 --host 0.0.0.0
# Development mode with auto-reload
uv run -m tapio.cli adk-server --reload --web-ui
# Quick development server
uv run -m tapio.cli devOnce the server is running, you can access:
- Web Development UI:
http://localhost:8000- Interactive agent testing interface - API Documentation:
http://localhost:8000/docs- Swagger/OpenAPI documentation - Health Check:
http://localhost:8000/health- Service health status - Service Info:
http://localhost:8000/info- Service configuration details
Send a POST request to interact with the agent:
curl -X POST "http://localhost:8000/run" \
-H "Content-Type: application/json" \
-d '{
"agentName": "TapioAssistant",
"input": "How do I apply for a residence permit in Finland?",
"sessionId": "user123"
}'For real-time streaming responses:
curl -X POST "http://localhost:8000/run_sse" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"agentName": "TapioAssistant",
"input": "What documents do I need for family reunification?",
"sessionId": "user123"
}'The built-in web interface provides:
- Interactive Chat: Direct conversation with the Tapio Assistant
- Event Inspection: View detailed execution traces, prompts, and tool calls
- Session Management: Track conversation history and state
- Tool Monitoring: See RAG document retrieval and LLM responses
- Performance Metrics: Monitor response times and token usage
The Tapio Assistant agent is configured with:
- RAG Integration: Automatic search of Finnish immigration documents
- Contextual Responses: Maintains conversation history and context
- Source Attribution: Provides document sources for transparency
- Error Handling: Graceful handling of failures with helpful messages
| Feature | Gradio | Google ADK |
|---|---|---|
| Interface | Web UI only | API + Web UI + CLI |
| Production Ready | Development focused | Production ready |
| Event Tracking | Limited | Comprehensive |
| Agent Communication | Not supported | Built-in |
| API Integration | Basic | Full REST/SSE APIs |
| Deployment | Manual | Cloud-native |
| Monitoring | Basic | Advanced telemetry |
| Multi-Agent | Not supported | Native support |
If you're migrating from the Gradio implementation:
- Keep existing commands: All crawl, parse, and vectorize commands work unchanged
- Use new server: Replace
tapio-appwithadk-server - Update integrations: Use REST APIs instead of Gradio's interface
- Enhanced features: Leverage event tracking and agent workflows
-
Start Development Server:
uv run -m tapio.cli dev
-
Access Web UI: Open
http://localhost:8000in your browser -
Test Queries: Use the interactive interface to test various questions
-
Monitor Events: Use the Events tab to debug RAG retrieval and responses
-
API Testing: Use the
/docsendpoint to test API endpoints
The ADK server is designed for production deployment:
# Production-ready server
uv run -m tapio.cli adk-server \
--host 0.0.0.0 \
--port 8000 \
--no-web-uiOr use the Google Cloud deployment tools:
# Deploy to Google Cloud Run (requires ADK CLI tools)
adk deploy --platform cloudrunCommon Issues:
-
Model Not Found: Ensure Ollama is running and the model is pulled:
ollama pull llama3.2
-
ChromaDB Issues: Ensure vectorization has been completed:
uv run -m tapio.cli vectorize
-
Port Conflicts: Use a different port:
uv run -m tapio.cli adk-server --port 8001
Debug Mode:
Enable detailed logging by setting the environment variable:
export LOGGING_LEVEL=DEBUG
uv run -m tapio.cli adk-server --reload- Professional Development: Built-in debugging and monitoring tools
- Production Ready: Proper error handling, logging, and metrics
- Scalable Architecture: Multi-agent workflows and communication
- API-First: Full REST API with comprehensive documentation
- Cloud Native: Easy deployment to Google Cloud and other platforms
- Event-Driven: Comprehensive tracking of agent behavior and performance
The ADK implementation provides a solid foundation for building production-grade AI agent applications while maintaining all the RAG capabilities of the original Tapio Assistant.