{"id":38011590,"url":"https://github.com/dewmal/arunalla-ai-system","last_synced_at":"2026-01-16T19:21:02.605Z","repository":{"id":327993934,"uuid":"1107731278","full_name":"dewmal/arunalla-ai-system","owner":"dewmal","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-10T15:53:13.000Z","size":285,"stargazers_count":2,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-11T01:00:00.009Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dewmal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-01T14:37:18.000Z","updated_at":"2025-12-06T18:18:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dewmal/arunalla-ai-system","commit_stats":null,"previous_names":["dewmal/arunalla-ai-system"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dewmal/arunalla-ai-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewmal%2Farunalla-ai-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewmal%2Farunalla-ai-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewmal%2Farunalla-ai-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewmal%2Farunalla-ai-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dewmal","download_url":"https://codeload.github.com/dewmal/arunalla-ai-system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewmal%2Farunalla-ai-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T19:21:01.601Z","updated_at":"2026-01-16T19:21:02.440Z","avatar_url":"https://github.com/dewmal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Educational Support AI System\n\nA FastAPI-based educational support chatbot system with session management, chat history, and Server-Sent Events (SSE) / WebSocket support.\n\n## Features\n\n- 🚀 FastAPI application with async support\n- 🔐 API key-based authentication\n- 💬 Chat endpoints with SSE and WebSocket support\n- 📝 Session management\n- 📊 Paginated chat history\n- 🏥 Health check endpoints\n- 🔄 CORS support\n\n## Quick Start\n\n### Local Development\n\n```bash\n# Install dependencies with uv\nuv sync\n\n# Run the application\nuv run edu-support-ai-system\n\n# With auto-reload for development\nuv run edu-support-ai-system --reload\n```\n\n### Docker Setup\n\nSee [deployments/docker/DOCKER.md](deployments/docker/DOCKER.md) for comprehensive Docker and Docker Compose instructions.\n\nQuick start with Docker:\n\n```bash\n# Navigate to the docker deployment directory\ncd deployments/docker\n\n# Build and run with Docker Compose\ndocker-compose up -d\n\n# Access the application\n# API: http://localhost:8000\n# Docs: http://localhost:8000/docs\n```\n\n## API Endpoints\n\n- `GET /` - Health check\n- `GET /health` - Detailed health status\n- `POST /init-session` - Initialize a chat session\n- `POST /chat/sse` - Chat with Server-Sent Events\n- `WS /chat/ws/{session_id}` - Chat with WebSocket\n- `GET /history` - Get paginated chat history\n\n## Admin Panel\n\nThe admin panel allows you to configure AI agent system prompts and settings without code changes.\n\n### Accessing the Admin Panel\n\n1. **Set Admin API Key** in your `.env` file:\n\n   ```bash\n   # Generate a secure key\n   python -c \"import secrets; print(secrets.token_urlsafe(32))\"\n\n   # Add to .env\n   ADMIN_API_KEY=your-generated-key-here\n   ```\n\n2. **Access the Panel**: Navigate to `http://localhost:8000/admin/ui`\n\n3. **Login**: Enter your admin API key\n\n### Features\n\n- 🎨 **Modern UI** - Beautiful glassmorphism design with dark mode\n- 🤖 **Agent Management** - Create, edit, and delete AI agents\n- 📝 **System Prompts** - Configure agent behavior and personality\n- ⚙️ **Model Settings** - Adjust temperature, max tokens, and model selection\n- 📊 **Change History** - Track all prompt modifications\n- 🔄 **Hot Reload** - Changes take effect without restart (when using database)\n\n### Admin API Endpoints\n\n- `GET /admin/agents` - List all agents\n- `GET /admin/agents/{name}` - Get agent configuration\n- `POST /admin/agents/{name}` - Create new agent\n- `PUT /admin/agents/{name}` - Update agent configuration\n- `DELETE /admin/agents/{name}` - Delete agent\n- `GET /admin/agents/{name}/history` - Get prompt change history\n\n## Documentation\n\n- **API Documentation**: http://localhost:8000/docs (Swagger UI)\n- **ReDoc**: http://localhost:8000/redoc\n- **Docker Setup**: [deployments/docker/DOCKER.md](deployments/docker/DOCKER.md)\n\n## Configuration\n\nEnvironment variables can be configured in `.env` file (copy from `.env.example`):\n\n### Server Configuration\n\n- `API_HOST` - Server host (default: 0.0.0.0)\n- `API_PORT` - Server port (default: 8000)\n- `CORS_ORIGINS` - Allowed CORS origins (default: \\*)\n- `SESSION_EXPIRATION_SECONDS` - Session timeout (default: 3600)\n- `DEFAULT_PAGE_SIZE` - Default pagination size (default: 20)\n- `MAX_PAGE_SIZE` - Maximum pagination size (default: 100)\n\n### API Key Configuration\n\n- `ALLOW_ALL_API_KEYS` - Allow any API key for development (default: `true`)\n  - Set to `false` in production to enforce API key validation\n- `VALID_API_KEYS` - Comma-separated list of valid API keys (default: `demo-key-123,test-key-456,dev-key-789`)\n  - Example: `VALID_API_KEYS=your-key-1,your-key-2,your-key-3`\n  - Only used when `ALLOW_ALL_API_KEYS=false`\n  - **⚠️ Important:** Use strong, unique keys in production!\n\n**Creating API Keys:**\n\n```bash\n# Generate a secure random API key (Linux/Mac)\nopenssl rand -hex 32\n\n# Or use Python\npython -c \"import secrets; print(secrets.token_urlsafe(32))\"\n\n# Add to .env file\nVALID_API_KEYS=key1,key2,key3\nALLOW_ALL_API_KEYS=false\n```\n\n### Google API Configuration\n\nThe application uses Google Gemini AI for the agent mesh. You **must** configure your Google API key:\n\n- `GOOGLE_API_KEY` - Google API key for Gemini models (required)\n  - Get your key from: https://makersuite.google.com/app/apikey\n  - Example: `GOOGLE_API_KEY=AIzaSy...`\n  - **⚠️ Required:** The application will not start without this key\n\n**Setting up Google API Key:**\n\n```bash\n# 1. Get your API key from Google AI Studio\n# Visit: https://makersuite.google.com/app/apikey\n\n# 2. Add to .env file\necho \"GOOGLE_API_KEY=your-api-key-here\" \u003e\u003e .env\n\n# 3. Restart the application\ndocker-compose restart api  # If using Docker\n# OR\nuv run edu-support-ai-system --reload  # If running locally\n```\n\n### Database Configuration\n\n- `DATABASE_URL` - PostgreSQL connection string (optional, defaults to in-memory storage)\n  - Format: `postgresql://username:password@host:port/database`\n  - Example: `postgresql://eduai:changeme@localhost:5432/eduai_db`\n- `DB_USER` - Database username (default: eduai)\n- `DB_PASSWORD` - Database password (default: changeme) ⚠️ **Change in production!**\n- `DB_NAME` - Database name (default: eduai_db)\n- `DB_PORT` - Database port (default: 5432)\n\n**Note:** If `DATABASE_URL` is not set, the application will use in-memory storage. Data will be lost when the application restarts.\n\n## Database Setup\n\n### With Docker Compose (Recommended)\n\nPostgreSQL is automatically included in the Docker Compose setup:\n\n```bash\n# Start both API and PostgreSQL\ncd deployments/docker\ndocker-compose up -d\n\n# Verify PostgreSQL is running\ndocker-compose logs db\n\n# Initialize database (tables are created automatically on first run)\n# Or manually:\ndocker-compose exec api python -m edu_support_ai_system.init_db\n```\n\n### Local PostgreSQL\n\nIf running the API locally (not in Docker), you'll need a PostgreSQL instance:\n\n```bash\n# 1. Install and start PostgreSQL (or use Docker for just the database)\ndocker run -d \\\n  --name edu-support-db \\\n  -e POSTGRES_USER=eduai \\\n  -e POSTGRES_PASSWORD=changeme \\\n  -e POSTGRES_DB=eduai_db \\\n  -p 5432:5432 \\\n  postgres:15-alpine\n\n# 2. Set DATABASE_URL in your environment\nexport DATABASE_URL=\"postgresql://eduai:changeme@localhost:5432/eduai_db\"\n\n# 3. Run the application\nuv run edu-support-ai-system\n```\n\n### Troubleshooting Database Connection\n\nIf you encounter database connection issues:\n\n1. **Check PostgreSQL is running:**\n\n   ```bash\n   docker-compose logs db\n   ```\n\n2. **Verify DATABASE_URL is set correctly:**\n\n   ```bash\n   docker-compose exec api env | grep DATABASE_URL\n   ```\n\n3. **Check application logs:**\n\n   ```bash\n   docker-compose logs api\n   # Look for \"✓ Using PostgreSQL database backend\"\n   ```\n\n4. **Manually initialize database:**\n   ```bash\n   docker-compose exec api python -m edu_support_ai_system.init_db\n   ```\n\n## License\n\nApache 2.0\n\n## More Information\n\nVisit: https://arunalla.help/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewmal%2Farunalla-ai-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdewmal%2Farunalla-ai-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewmal%2Farunalla-ai-system/lists"}