# AgentEvent

# AgentEvent


```
public sealed interface AgentEvent
```

<br />

Known direct subclasses [AgentEvent.FunctionCall](https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.FunctionCall.md.txt), [AgentEvent.FunctionResponse](https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.FunctionResponse.md.txt), [AgentEvent.TextMessage](https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.TextMessage.md.txt)

|---|---|
| `AgentEvent.FunctionCall` | Emitted immediately before a function is invoked by the runner. |
| `AgentEvent.FunctionResponse` | Emitted immediately after a function invocation completes. |
| `AgentEvent.TextMessage` | The text message generated by the agent for the user. |

*** ** * ** ***

Events emitted by the Agent during an execution session.

## Summary

| ### Nested types |
|---|
| `public final class AgentEvent.FunctionCall implements AgentEvent` Emitted immediately before a function is invoked by the runner. |
| `public final class AgentEvent.FunctionResponse implements AgentEvent` Emitted immediately after a function invocation completes. |
| `public final class AgentEvent.TextMessage implements AgentEvent` The text message generated by the agent for the user. |