๐ŸŒ Banana Py Platform

One Python system satisfy all technical and business requirement
Version 2.0.0 - Production Ready

๐ŸŸข Live System Status

๐Ÿš€ System Running Successfully

Status: โœ… HEALTHY & OPERATIONAL

Server: Running at http://localhost:5050

API Model: gourav-check model via https://01ct5lsg-11434.inc1.devtunnels.ms/api/generate + Google TTS

Platform: Banana Py Platform v2.0.0

Tagline: One Python system satisfy all technical and business requirement

3
Products Available
6
Features Active
100%
System Ready

๐Ÿ—๏ธ System Architecture Overview

The Banana Py Platform is a comprehensive AI-powered voice system featuring Agent-to-Agent (A2A) communication, Retrieval-Augmented Generation (RAG), multi-AI provider support, and real-time chat capabilities. Built for production deployment on Google Cloud Run with memory optimization and scalable architecture.

โœ… Currently Active Features

๐Ÿค– A2A RAG System
Agent-to-Agent communication with RAG knowledge base
๐Ÿ“š AR Story Books
Interactive AR-powered storybooks for K8 students
๐ŸŽฎ Learnverse Gaming
Immersive learning environment with gameplay
๐Ÿ‘ฉโ€๐Ÿซ AI Teacher Helper
AI-powered assistant for educators
๐ŸŽค Voice Interaction
Real-time voice processing with Google TTS
๐Ÿ“Š User Analytics
Comprehensive user interaction tracking
6
AI Providers
4+
Agent Types
50+
API Endpoints
3
Products
1GB
Memory Limit
100%
Cloud Ready

๐Ÿงฉ Core Components

A2A Agent System

  • Intelligent call routing
  • Dynamic agent creation
  • Specialized agents (Customer Service, Sales, Technical Support, Product Expert)
  • Real-time agent switching
  • Performance analytics
  • Memory optimization

Multi-AI Provider System

  • OpenAI (GPT-4, GPT-3.5)
  • Anthropic Claude (Sonnet, Haiku, Opus)
  • Google Gemini (Pro, Flash)
  • Perplexity AI (Llama-3.1)
  • Ollama (Local models)
  • Custom API integration
  • Automatic fallback
  • Load balancing

RAG Knowledge Base

  • Document upload & processing
  • Intelligent chunking strategies
  • Semantic search with embeddings
  • MongoDB storage with fallback
  • Multi-format support (Text, Code, JSON, CSV)
  • Context-aware responses
  • Memory-efficient processing

Voice & Phone System

  • Twilio integration
  • Inbound/outbound calls
  • Google TTS integration
  • Real-time audio processing
  • WebSocket media streams
  • Call routing & management
  • Voice response optimization

Multi-Client Chat System

  • Client isolation
  • Session persistence
  • Dynamic agent orchestration
  • Document-aware conversations
  • Web search integration
  • Real-time chat rooms
  • Participant management

LangChain & LangGraph

  • Advanced RAG workflows
  • Multi-agent orchestration
  • Workflow management
  • Tool integration
  • State management
  • Conditional logic
  • Conversational memory

๐Ÿค– AI Providers & Models

OpenAI

GPT-4o, GPT-4o-mini, GPT-4-turbo, GPT-4, GPT-3.5-turbo

Anthropic Claude

Claude-3.5-Sonnet, Claude-3.5-Haiku, Claude-3-Opus, Claude-3-Sonnet

Google Gemini

Gemini-1.5-Pro, Gemini-1.5-Flash, Gemini-1.0-Pro

Perplexity AI

Llama-3.1-Sonar (Small/Large/Huge)

Ollama

Llama3.1:8b, Llama3.1:70b, Mistral:7b, CodeLlama:7b

Custom API

Any custom model integration

๐Ÿ”— API Endpoints

Core Platform

GET /
Platform information and status
GET /health
System health check with feature status
GET /products
Banana Py products information
POST /chat
Simple chat with intelligent A2A routing

Voice & Phone System

POST /make-call
Initiate outbound calls with A2A processing
POST /make-simple-call
Simple outbound calls without AI processing
GET /call-status/{call_sid}
Get call status and details

A2A Agent System

GET /a2a/status
A2A system status and agent information
GET /a2a/agents
List all available agents
POST /a2a/route-call
Route calls to appropriate agents
GET /a2a/analytics
System analytics and performance metrics

Multi-Client Chat System

POST /multi-client/chat
Multi-client chat with dynamic agent creation
POST /multi-client/documents/upload
Upload documents for RAG processing
POST /multi-client/documents/search
Search uploaded documents
GET /multi-client/documents/{chat_id}
List uploaded documents for a chat session

AI Provider Management

GET /ai-providers/status
Get available AI providers and models
POST /ai-providers/test
Test AI provider connectivity
POST /ai-providers/chat
Chat with specific AI provider and model

LangChain & LangGraph

GET /langchain/status
LangChain system status
POST /langchain/chat
Advanced chat with LangChain workflows
GET /langchain/providers
List available providers for LangChain

Room Management

POST /api/rooms
Create new chat rooms
GET /api/rooms
List all chat rooms
GET /api/rooms/stats
Get room system statistics

API Key Security

GET /api-keys
List all API keys (admin only)
POST /api-keys/generate
Generate new API keys with permissions
POST /api-keys/revoke
Revoke API keys (admin only)

๐Ÿ”„ System Flow & Architecture

Voice Call Processing Flow

1. Call Initiation
User receives call โ†’ Twilio webhook โ†’ /user-message endpoint
2. A2A Orchestration
Message analyzed โ†’ Route to appropriate agent โ†’ Dynamic agent creation if needed
3. AI Processing
Agent processes with RAG context โ†’ Multi-AI provider selection โ†’ Response generation
4. Voice Response
Text-to-speech conversion โ†’ Audio streaming โ†’ User receives response

Chat & Document Processing Flow

1. Chat Request
User sends message โ†’ API authentication โ†’ Multi-client routing
2. Document Context
Search uploaded documents โ†’ RAG retrieval โ†’ Context integration
3. Agent Selection
Analyze requirements โ†’ Select/create appropriate agent โ†’ Load balancing
4. Response Generation
LangChain/LangGraph processing โ†’ Multi-AI provider โ†’ Contextual response

๐ŸŒ Banana Py Products

AR Story Book

  • Target: K8 Students
  • Interactive AR storytelling
  • Educational content
  • Age-appropriate themes
  • Voice-guided learning

Learnverse

  • Target: Students seeking deep learning
  • Gamified learning environment
  • Interactive challenges
  • Progress tracking
  • Adaptive difficulty

AI Teacher Helper

  • Target: Teachers and Educators
  • Lesson planning assistance
  • Activity suggestions
  • Student assessment tools
  • Curriculum alignment

๐Ÿš€ Deployment & Configuration

Google Cloud Run Deployment

Optimized for Cloud Run with 1024MiB memory limit and production-ready configuration.

# Quick Deployment export PROJECT_ID="your-gcp-project-id" chmod +x deploy_cloudrun.sh ./deploy_cloudrun.sh # Manual Deployment gcloud builds submit --tag gcr.io/$PROJECT_ID/banana-py-platform --file Dockerfile . gcloud run deploy banana-py-platform \ --image gcr.io/$PROJECT_ID/banana-py-platform \ --platform managed \ --region us-central1 \ --memory 1Gi \ --cpu 1 \ --concurrency 10 \ --max-instances 10 \ --allow-unauthenticated

Environment Variables

# Twilio Configuration TWILIO_ACCOUNT_SID=your_twilio_account_sid TWILIO_AUTH_TOKEN=your_twilio_auth_token TWILIO_PHONE_NUMBER=your_twilio_phone_number # AI Provider Configuration OPENAI_API_KEY=sk-your_openai_api_key ANTHROPIC_API_KEY=sk-ant-your_anthropic_api_key GEMINI_API_KEY=your_gemini_api_key PERPLEXITY_API_KEY=pplx-your_perplexity_api_key # MongoDB (Optional - falls back to in-memory) MONGODB_URI=mongodb://localhost:27017/ # Deployment NGROK_URL=your-ngrok-url # For local development

Performance Specifications

1GB
Memory Limit
1
vCPU
10
Concurrency
10
Max Instances

๐Ÿ›ก๏ธ Security Features

API Key Authentication

  • Permission-based access control
  • Rate limiting (configurable)
  • Usage tracking and limits
  • Key expiration dates
  • Revocation and reactivation

Data Protection

  • Client isolation
  • Secure API key handling
  • Input validation with Pydantic
  • CORS middleware
  • Environment variable security

Monitoring & Analytics

  • Health check endpoints
  • System status monitoring
  • Performance analytics
  • Error tracking
  • Usage statistics

๐Ÿ“š Documentation & Guides

๐Ÿงช Live Testing & API Tools

๐Ÿ”— Quick API Testing

Test your Banana Py Platform endpoints directly from this page:

๐Ÿ“Š System Health Check

Endpoint: GET /health

Status: โœ… Available

โ†’ Test Health Endpoint
๐ŸŒ Products Information

Endpoint: GET /products

Status: โœ… Available

โ†’ View Products
๐Ÿ“– API Documentation

Endpoint: GET /docs

Status: โœ… Available

โ†’ Open Swagger UI
๐Ÿ“‹ Alternative Docs

Endpoint: GET /redoc

Status: โœ… Available

โ†’ Open ReDoc

๐Ÿ”‘ API Key Authentication

Many endpoints require API key authentication. Here's how to test them:

# Test with API Key (replace 'your_api_key' with actual key) curl -X GET "http://localhost:5050/a2a-status" \ -H "X-API-Key: your_api_key" # Test chat endpoint curl -X POST "http://localhost:5050/chat" \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"message": "Hello, test the system"}' # Test AI providers curl -X GET "http://localhost:5050/ai-providers/status" \ -H "X-API-Key: your_api_key"

๐Ÿ“ฑ Current System Information

๐ŸŒ Server Details

URL: http://localhost:5050

Status: Running

Server: uvicorn

๐Ÿค– AI Configuration

Model: gourav-check

API: https://01ct5lsg-11434.inc1.devtunnels.ms/api/generate

TTS: Google Text-to-Speech

๐Ÿ“Š System Stats

Products: 3 available

Features: 6 active

Platform: Banana Py v2.0.0

๐Ÿ” Real-time Endpoint Testing

Public Endpoints (No Authentication Required)

GET /
โœ… TESTED & WORKING - Platform information and status
โ†’ Test Now
GET /health
โœ… TESTED & WORKING - System health check with feature status
โ†’ Test Now
GET /products
โœ… TESTED & WORKING - Banana Py products information
โ†’ Test Now
GET /docs
โœ… AVAILABLE - Interactive API documentation (Swagger UI)
โ†’ Open Swagger UI
GET /redoc
โœ… AVAILABLE - Alternative API documentation (ReDoc)
โ†’ Open ReDoc

Protected Endpoints (API Key Required)

Note: These endpoints require API key authentication. Use the format: curl -H "X-API-Key: your_api_key" http://localhost:5050/endpoint

GET /a2a-status
A2A system status and agent information (requires 'a2a' permission)
POST /chat
Simple chat with intelligent A2A routing (requires 'a2a' permission)
GET /ai-providers/status
Get available AI providers and models (requires 'a2a' permission)
POST /make-call
Initiate outbound calls with A2A processing (requires 'calls' permission)