ai-elements-kotlin

mcp
Security Audit
Fail
Health Pass
  • License — License: Apache-2.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 25 GitHub stars
Code Fail
  • rm -rf — Recursive force deletion command in .github/workflows/verify.yml
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Kotlin Compose AI Elements: chat UI elements and agent toolkit on open protocols (AI SDK, AG-UI, MCP, A2A, A2UI, MCP Apps)

README.md
AI Elements logo

AI Elements for Kotlin

Native Compose components for AI conversations and agents.

English · 简体中文

CI
Maven Central
License
Android
UI

Documentation ·
Components ·
Quick start ·
API reference

Light theme: chat, a plan, code and tool approval The same native Compose example in the dark theme

Build a complete chat screen or use just the elements you need. Streaming Markdown, reasoning,
tool approvals, sub-agents, plans, attachments and generated interfaces share one chat model.
Connect your own backend, or run the agent loop inside the app.

Screenshots are rendered from real Android components on an emulator with curated example data.
The catalog includes 65 illustrated scenarios, compiled examples and API links.
This is the Compose counterpart of Vercel AI Elements, on public protocols.

Watch a complete run

Prompt → plan and reasoning → tool approval → on-device execution → streamed reply. Recorded from the real Android app with a deterministic offline demo agent; no model key is needed.

Watch a complete run

Start with a screen

AiElementsTheme {
    Chat(rememberChat { approver ->
        AgUiBackend("https://agents.example.com/api/agui", approver = approver)
    })
}

Follow the quick start for imports, Android permissions,
a runnable reference server and ViewModel ownership. The reference server's scripted model needs no API key.

Choose where the agent runs

Mode Your app adds Start here
Server agent UI + an AI SDK, AG-UI, A2A or ACP backend Pure client
In-app agent UI + a model API and optional harness capabilities In-app agent
Your own implementation Individual elements, or a custom ChatBackend Custom backend

The UI depends only on ai-elements-chat, not the networking modules. Customize the theme, tool/data
renderers and attachment loading without forking the components.

Install

dependencies {
    implementation(platform("io.github.junelegency:ai-elements-bom:0.3.0"))
    implementation("io.github.junelegency:ai-elements-ui")
    implementation("io.github.junelegency:ai-elements-core")
}

Add google() and mavenCentral() to your dependency repositories.
See Installation for all artifacts, minSdk, desugaring and the
exact tested toolchain. Compose and Material 3 Expressive currently include alpha dependencies.
Stable public APIs are preserved from the first public release, including 0.x; see the
compatibility policy.

Explore the elements

Tools and approvals Native generated UI Developer tools
Tool calls A2UI form Terminal
Tools Generative UI Developer tools

Also included: conversation controls, Markdown and diagrams,
media, voice and workflow canvas.

Protocols: AI SDK v5/v6 + v4 compatibility · AG-UI 1.x · MCP · MCP Apps · A2A · ACP · A2UI · Agent Skills.
Optional capabilities include files, planning, memory, shell/sandbox, browser, device integration,
speech and scheduled tasks. Compare backends.

Run and verify

./gradlew :demo:installDebug
./gradlew apiCheck testDebugUnitTest lintDebug
tools/check-published-consumer.sh
tools/build-docs.sh

The same repository contains the library, demo, samples and bilingual GitHub Pages site.
See Testing, Contributing, Releasing,
CHANGELOG and Roadmap.

License and security

Apache-2.0; see LICENSE and NOTICE. harness-sandbox-proot packages PRoot
(GPL-2.0) as a separate executable with its own NOTICE.
Report vulnerabilities as described in SECURITY.md.

For interactive cards, see the A2UI tool-to-card and action round trip.

Reviews (0)

No results found