A lightweight Kotlin library that lets Android developers integrate Google’s Gemini AI into their apps with ease. Supports text, image, and multi-modal inputs, persistent chat history, and agentic task detection with JSON-based structured responses for automation.
# Prexo - AI
**Integrate Google Gemini AI into your Android apps — now with Agentic Task Detection**
PrexoAI is a lightweight Kotlin library that makes it effortless to bring Gemini AI’s capabilities to your Android projects. With support for **text, image, and multi-modal inputs**, persistent conversation history, and **smart agentic task detection**, you can go beyond chat — automate actions, parse structured JSON commands, and build futuristic AI-powered experiences.
---
## Features
* Simple Gemini integration with minimal setup.
* Multi-modal support for text, images, and combined inputs.
* Agentic task detection returning structured JSON.
* Persistent memory for contextual conversations.
* Configurable model, safety settings, and system prompts.
* Quick and lightweight.
---
## Installation
Add JitPack to your `settings.gradle.kts`:
```kotlin
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
```
And include the dependency in your `build.gradle.kts`:
```kotlin
dependencies {
implementation("com.github.binarybeam:Prexo-Ai:1.3.0")
}
```
---
## Quick Start
```kotlin
val ai = Ai()
ai.updateModel(apiKey = "YOUR_API_KEY", agentMode = true)
ai.sendMessage("Turn on the flashlight", object : AiCallback {
override fun onNormalResponse(message: String) { println("AI: $message") }
override fun onAgenticResponse(message: String, jsonObject: List<JSONObject>) {
println("Agentic Task: $message")
println("Actions: $jsonObject")
}
override fun onError(error: String) { println("Error: $error") }
})
```
---
## Agentic Mode
When enabled, responses for actionable tasks are returned in JSON format only.
```json
{
"id": "wifi",
"state": "on",
}
```
---
## Configuration
```kotlin
ai.updateModel(
apiKey = "YOUR_API_KEY",
modelName = "gemini-2.5-flash",
Google's AI-powered research notebook that ingests your documents and becomes an expert on your content. Generates audio overviews, study guides, FAQs, and interactive discussions from uploaded sources.
Google DeepMind's experimental AI agent that can navigate websites, fill forms, and complete multi-step browser tasks autonomously. Uses Gemini's multimodal understanding to interact with web interfaces.
Google DeepMind's universal AI assistant prototype that can see, hear, and respond in real-time through your device camera and microphone. Demonstrates the future of multimodal AI interaction.
Google Cloud's enterprise platform for building, deploying, and managing AI agents powered by Gemini. Supports multi-agent orchestration, tool integration, and enterprise governance.
Gemini's agentic research capability that autonomously browses the web, synthesizes information from dozens of sources, and produces comprehensive research reports on any topic.
Interactive coding and content creation agent that generates, previews, and iterates on code, documents, and interactive applications in a side panel. Supports HTML/CSS/JS, Python, and more.