Notes from the app
session.note(text) tells the agent what happened in the app outside the chat, such as what the user did on the screen.
Each run sends the latest five notes in one AG-UI context entry, app_notes. The entry separates new notes from those a completed run already received. A failed or broken run leaves its notes marked new.
Adding a note does not start a run, change the session status or add a chat item. A note does not count as a change to ..
A button or field in a drawn view adds its method, arguments and answer to these notes automatically. That action does not wake the agent. Call session. for other changes the agent should hear about.
Let the agent respond
session. asks the agent to respond to activity in the app. It sends a short UserMessage marked fromApp, which the example chat hides.
If the session is idle, the wake starts a run. While a run is open or an approval is pending, the message waits and goes with the next run. It does not approve, reject or cancel a pending request. If the user stops the run it was waiting for, the wake waits for the user's next message.