Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
AIAndroid

Tool activity

Disclose tool status and results.

Public APILumenToolActivityAndroid / Compose

Native example

Use Tool activity

The host runs the tool and updates status and statusLabel. Keep it collapsed unless the result needs attention.

Tool activity rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulatorView dark appearance
kotlin
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import com.santi020k.lumen.*

@Composable
fun SearchToolExample(running: Boolean) {
    LumenToolActivity(
        label = "Search the documentation",
        statusLabel = if (running) "Searching 3 sources…" else "Found 3 results",
        status = if (running) LumenToolStatus.Running else LumenToolStatus.Success
    ) {
        Text("Query: \"prompt composer accessibility\"")
    }
}
Android
A framed, collapsed-by-default record of one tool call whose body shows the politely announced status label and details.

Reference

Public API

The primary shared and platform-specific options exposed by LumenToolActivity.

APIValues or typeDefaultDescription
label / status / statusLabelsummary / tool status / status textrequired / queued / requiredThe host runs the tool and updates status and statusLabel.

Native behavior

Design and accessibility

When to use it

The host runs the tool and updates status and statusLabel. Keep it collapsed unless the result needs attention.

Accessibility

Summary button with expanded state; status label announced politely.

Shared component

Available on other platforms

React NativeApple / SwiftUI Web
Android docsCompose module