"One companion. An entire swarm of intelligence."
SwarmDroid is an advanced multi-agent AI ecosystem for Android featuring an adorable, fully animated 3D AI companion mascot.
Rather than presenting users with a generic chatbot or a static loading spinner, SwarmDroid provides an interactive 3D robot companion that blinks, breathes, walks, waves, talks, and reacts emotionally, visually communicating what a collaborative swarm of specialized AI agents is doing in real-time.
๐ Product Website: https://swarm-droid.github.io/swarmdroid/
๐ฑ Android APK Deliverable: Download app-debug.apk (18.5 MB, API 34+ Ready)
๐ช Contract Address (CA): Soon Available (Official launch will be announced exclusively on this repository and the official website. Beware of fake tokens)
๐ฆ Latest Release: v1.0.0 Release
-
Cute 3D Companion Mascot:
- Real-time 3D rendering using OpenGL ES 3.0 / GLSurfaceView seamlessly embedded in Jetpack Compose.
- PBR metallic-roughness lighting, specular highlights, and emissive electric cyan/lavender glow.
- 14 Full Animation States:
IDLE,HAPPY,THINKING,LISTENING,SPEAKING,WORKING,WALKING,RUNNING,WAVING,CELEBRATING,SLEEPING,ERROR,SURPRISED,SAD. - Natural secondary procedural animation: breathing sine wave, periodic eye blinks, ear twitches, hover bobbing, and speech-synchronized lip-sync waveform modulation.
- Interactive touch: Tap triggers emotional celebration; drag rotates companion in 3D.
- Floating Companion Mode: Android Foreground Service with system overlay (
TYPE_APPLICATION_OVERLAY) allowing the companion to float over any app!
-
Multi-Agent Intelligence Engine:
- Master Agent (Aegis Prime): Analyzes natural-language requests, decomposes goals into a Directed Acyclic Graph (DAG) with explicit dependencies, delegates to agents, and presents final results through the 3D companion.
- Specialized Agents:
BrowserAgent(Aura Browser): Web research, search, and page content extraction.CommunicationAgent(Echo Communicator): Email and message drafting with strict human approval gates.CodingAgent(ByteForge Coder): Code analysis, generation, and safe restricted sandbox execution.SocialMediaAgent(Nexus Social): Social post composition and calendars with human approval.DeviceAgent(DroidLink Controller): Approved Android system actions (apps, settings, TTS, sharing).ResearchAgent(Chronos Researcher): Deep multi-source fact-checking and structured report synthesis.MemoryAgent(Mnemosyne Memory): Semantic context retrieval and memory management.SecurityAgent(Aegis Guardian): Prompt injection defense, tool allowlists, and secret redaction.
- Dynamic Agent Creation: When a novel capability is needed (e.g.
DocumentationAgent), the Master Agent instantiates a new agent from an approved template with sandboxed tool scopes. - Interactive Swarm Visualizer: Real-time animated Compose Canvas node graph displaying the Master Agent at the center, orbiting specialized agents, glowing pulse lines, and moving data packets.
-
Security & Privacy by Design:
- Hardware-backed local credential encryption via Android Keystore (
EncryptedSharedPreferences). - Strict Human-in-the-Loop confirmation for sensitive operations (sending emails, posting to social media, modifying system settings).
- Multi-provider AI support: Google Gemini, OpenAI, Anthropic Claude, Ollama (Local), OpenRouter, and Custom OpenAI-compatible endpoints.
- Zero silent data collection; inspectable and deletable Room SQLite memory store.
- Hardware-backed local credential encryption via Android Keystore (
SwarmDroid/
โโโ android/ # Android Native Application
โ โโโ app/
โ โ โโโ src/main/java/com/swarmdroid/app/
โ โ โ โโโ core/ # DI (AppContainer), Room DB, Theme, OkHttp
โ โ โ โโโ character/ # 3D GLSurfaceView, 14-State Animation SM, Floating Service
โ โ โ โโโ voice/ # SpeechRecognizer (STT) & TextToSpeech (TTS)
โ โ โ โโโ device/ # Android Intent Bridge & System Capabilities
โ โ โ โโโ security/ # Android Keystore EncryptedSharedPreferences
โ โ โ โโโ domain/ # Domain Models (AgentInfo, SwarmTaskItem, SwarmGraph)
โ โ โ โโโ presentation/ # Compose Screens, SwarmVisualizerView, Navigation
โ โ โโโ src/main/assets/ # 3D GLB Mascot Asset (swarmdroid_mascot.glb)
โ โ โโโ src/test/ # Android JUnit Unit Tests
โ โโโ build.gradle.kts
โ โโโ settings.gradle.kts
โ
โโโ backend/ # Multi-Agent Python Backend
โ โโโ api/ # FastAPI REST endpoints (/chat, /agents, /tasks, /models)
โ โโโ websocket/ # Real-time WebSocket connection manager & event streaming
โ โโโ orchestration/ # TaskDAG, ExecutionEngine, SwarmOrchestrator
โ โโโ agents/ # MasterAgent, 8 Core Agents, DynamicAgentManager
โ โโโ models/ # LLM Provider Abstraction (Gemini, OpenAI, Anthropic, Ollama)
โ โโโ memory/ # MemoryStore (SQLite) & VectorIndex (Cosine Similarity)
โ โโโ tools/ # WebSearch, FetchUrl, SandboxCode, DraftEmail, DeviceIntent
โ โโโ security/ # PromptDefense, SecretRedactor, PermissionScope, AuditLogger
โ โโโ main.py # FastAPI entrypoint
โ
โโโ assets/ # 3D Mascot Assets
โ โโโ characters/swarmdroid_mascot.glb # Valid glTF 2.0 Binary Model
โ โโโ generate_mascot_glb.py # Binary GLB Procedural Generator
โ
โโโ docs/ # Architecture & Engineering Documentation
โ โโโ ARCHITECTURE.md # Complete Architecture Deep Dive
โ โโโ PRD.md # Product Requirements Document
โ โโโ SECURITY.md # Threat Model, Sandboxing & Keystore Encryption
โ โโโ PRIVACY.md # Privacy, Minimum Privilege & Data Governance
โ โโโ API.md # REST & WebSocket API Specification
โ
โโโ tests/ # Test Suites
โโโ backend/ # Python Backend & Orchestrator Pytest Suite
โโโ android/ # Android Unit Test Suite
- Python: 3.10+
- Android SDK: API 34+
- JDK: 21 LTS
# Set up Python virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt
# Run the backend server
python3 -m uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reloadThe FastAPI documentation will be available at http://localhost:8000/docs.
PYTHONPATH=. .venv/bin/pytest tests/backend/ -vcd android
./gradlew testDebugUnitTest- Prompt Injection Defense: Scanned via
PromptDefense.evaluate(). - Credential Protection: Secrets redacted before logging using
SecretRedactor. - Tool Allowlist: Strict validation against
PermissionScope. - Human Approval: Sensitive tasks trigger
ApprovalDialogon Android before execution.
Apache License 2.0. Built with pride for Android and the autonomous multi-agent future.