Android Application Engine
Relevant source files
The following files were used as context for generating this wiki page:
The Android Application Engine provides the mobile runtime environment for the Agent Studio MCP Engine. It allows the multi-platform AI Plugin and Model Manager to operate as a native Android application using Capacitor v7. The engine facilitates web-to-native bridges, allowing the core React-based UI to access mobile hardware and local storage while maintaining consistency with the desktop Tauri-based versions.
The mobile implementation encapsulates the web assets within a native wrapper, identified by the package name com.agentstudio.mcpengine. It supports standard Android features such as deep linking via custom URL schemes and secure file sharing through the Android FileProvider.
Sources: BUILDING.md:12, public/manifest.json:8, android/app/src/main/res/values/strings.xml:4-5
Build and Deployment Architecture
The Android build pipeline utilizes Capacitor to sync web assets into a specialized Android Studio project. The engine transforms a standard Vite-based web build into a mobile-ready APK or AAB.
Mobile Build Process
The following diagram illustrates the workflow for converting web source code into a functional Android application.
The diagram shows the transition from web assets to native Android binaries via Capacitor and Android Studio.
Sources: BUILDING.md:65-80, package.json:16-19
Developer Automation Scripts
The project provides several npm scripts to manage the Android lifecycle:
| Script | Action |
|---|---|
npm run cap:sync | Syncs current web builds to the Android project. |
npm run cap:android | Builds web assets, syncs them, and opens Android Studio. |
npm run cap:icons | Generates all required density icons (mdpi to xxxhdpi) and splash screens. |
Sources: package.json:16-19, BUILDING.md:73-80
Manifest and Configuration
The application defines its identity and permissions within the AndroidManifest.xml and standard resource files. It identifies itself as Agent Studio and requires internet access to communicate with remote LLM providers.
Application Identity
| Property | Value | Source |
|---|---|---|
| Package Name | com.agentstudio.mcpengine | strings.xml:4 |
| Application Label | Agent Studio | strings.xml:2 |
| Launcher Theme | AppTheme.NoActionBarLaunch | AndroidManifest.xml:10 |
| Launch Mode | singleTask | AndroidManifest.xml:11 |
Security and Permissions
The engine enforces specific security constraints to protect user data and ensure stable operation:
- Internet Access: The application explicitly requests
android.permission.INTERNETto connect to LLM APIs. - File Provider: A
FileProvideris configured to grant URI permissions for secure file sharing, preventing unauthorized access to the application's internal storage. - CORS Management: For mobile builds, environment variables like
GEMINI_API_KEYare embedded viacapacitor.config.ts.
Sources: android/app/src/main/AndroidManifest.xml:22-30, android/app/src/main/AndroidManifest.xml:34, BUILDING.md:104-106
UI and Asset Integration
The Android Engine renders the same high-fidelity UI used in the desktop version by wrapping the Vite distribution.
Web Manifest Integration
The engine utilizes a manifest.json to define the standalone display behavior and theme colors consistent with the "Nebula Dark" design language.
{
"name": "Agent Studio MCP Engine",
"short_name": "Agent Studio",
"display": "standalone",
"background_color": "black",
"theme_color": "#09090b"
}
Sources: public/manifest.json:2-7
Iconography
The engine supports multiple icon densities and maskable formats to ensure high-quality visuals on various Android devices.
- Source: A 1024x1024
resources/icon.pngis used as the master asset. - Generated Outputs: The
cap:iconscommand produces sizes ranging from 48x48 to 512x512. - Visuals: Supports dark-mode specific splash screens and background colors.
Sources: BUILDING.md:73-75, public/manifest.json:10-45
Conclusion
The Android Application Engine serves as the mobile bridge for Agent Studio, enabling technical architects and developers to manage MCP tools and AI models on the go. By leveraging Capacitor v7 and a robust build pipeline, it maintains feature parity with the desktop environment while adhering to Android's security and performance standards.