# AgentEvent.TextMessage


```
public final class AgentEvent.TextMessage implements AgentEvent
```

<br />

*** ** * ** ***

The text message generated by the agent for the user.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.TextMessage#TextMessage(kotlin.String,kotlin.Boolean)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html text, boolean isPartial)` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.TextMessage#getText()()` The textual content emitted by the agent. |
| `final boolean` | `https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.TextMessage#getIsPartial()()` Whether this event represents a partial streaming chunk. |

## Public constructors

### TextMessage

```
public TextMessage(@NonNull String text, boolean isPartial)
```

## Public methods

### getText

```
public final @NonNull String getText()
```

The textual content emitted by the agent.

### isPartial

```
public final boolean isPartial()
```

Whether this event represents a partial streaming chunk.