A native Android chat client for ConnectOnion agents. Connect to any ConnectOnion agent from your mobile device.
- 💬 Real-time chat with ConnectOnion agents
- 🔌 WebSocket connection to agent relay
- 🎨 Material Design 3 with Jetpack Compose
- 🌙 Dark mode support
- 📱 Modern Android architecture (ViewModel, StateFlow, Coroutines)
Coming soon
- Android 8.0 (API 26) or higher
- Android Studio Hedgehog (2023.1.1) or newer
git clone https://github.com/openonion/oo-chat-android.git
cd oo-chat-androidOpen the project in Android Studio and let it sync the Gradle dependencies.
Connect an Android device or start an emulator, then click Run.
- Connect to an Agent: Tap the link icon in the top bar
- Enter Agent Address: e.g.,
my-agentor[email protected] - Start Chatting: Type your message and tap send
app/
├── src/main/java/ai/openonion/oochat/
│ ├── MainActivity.kt # Entry point
│ ├── OOChatApp.kt # App navigation
│ ├── data/
│ │ └── Message.kt # Data models
│ ├── network/
│ │ └── AgentConnection.kt # WebSocket client
│ └── ui/
│ ├── chat/
│ │ ├── ChatScreen.kt # Chat UI
│ │ └── ChatViewModel.kt # Chat logic
│ └── theme/
│ └── Theme.kt # Material theme
- UI: Jetpack Compose + Material 3
- Networking: OkHttp WebSocket
- Serialization: Kotlinx Serialization
- Architecture: MVVM with StateFlow
- Concurrency: Kotlin Coroutines
The app connects to agents through the ConnectOnion relay server:
// Connect to an agent
viewModel.connectToAgent("my-agent")
// The connection URL becomes:
// wss://relay.connectonion.com/connect/my-agentYour ConnectOnion agent should be running with relay mode enabled:
from connectonion import Agent
agent = Agent("my-agent")
agent.host(relay=True) # Announces to relay- Agent discovery (browse available agents)
- Message persistence (local history)
- Push notifications
- Voice input
- File/image sharing
- Multiple chat sessions
- ConnectOnion managed keys (co/ auth)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.