AppFunctionAppMetadata


public final class AppFunctionAppMetadata


Metadata describing how an app exposes its functions for use by an AI agent or large language model (LLM).

This class corresponds to the androidx.appfunctions.R.styleable.AppFunctionAppMetadata styleable in the XML linked to property android.app.appfunctions.app_metadata in the app's manifest.

Summary

Public constructors

AppFunctionAppMetadata(
    @NonNull String instructions,
    @NonNull String displayDescription
)

Public methods

boolean
equals(Object other)
final @NonNull String

A short, user-visible description of what the app functions enable the agent to do.

final @NonNull String

App-provided instructions for the LLM on how to use the app's functions together.

int
@NonNull String

Public constructors

AppFunctionAppMetadata

Added in 1.0.0-beta01
public AppFunctionAppMetadata(
    @NonNull String instructions,
    @NonNull String displayDescription
)

Public methods

equals

public boolean equals(Object other)

getDisplayDescription

Added in 1.0.0-beta01
public final @NonNull String getDisplayDescription()

A short, user-visible description of what the app functions enable the agent to do.

Corresponds to the displayDescription attribute in the androidx.appfunctions.R.styleable.AppFunctionAppMetadata styleable. Defaults to empty string if not specified.

getInstructions

Added in 1.0.0-beta01
public final @NonNull String getInstructions()

App-provided instructions for the LLM on how to use the app's functions together.

Agents should use these instructions as context when planning calls to the app's functions, for example to follow a required order across functions (such as searching for an entity before updating or deleting it) or to respect constraints that apply across functions. Instructions complement, and do not replace, the descriptions of individual functions.

Corresponds to the instructions attribute in the androidx.appfunctions.R.styleable.AppFunctionAppMetadata styleable. Defaults to empty string if not specified.

hashCode

public int hashCode()

toString

public @NonNull String toString()