Skip to content

feat(hooks): Add assistant_message to Stop hook payload#716

Open
github-actions[bot] wants to merge 1 commit intomainfrom
letta/issue-715-20260128-0326
Open

feat(hooks): Add assistant_message to Stop hook payload#716
github-actions[bot] wants to merge 1 commit intomainfrom
letta/issue-715-20260128-0326

Conversation

@github-actions
Copy link
Contributor

Summary

  • Adds assistant_message field to the Stop hook payload, containing the assistant's final message text
  • Makes Stop hooks more useful by allowing consumers to access the agent's response

Before:

{
  "event_type": "Stop",
  "stop_reason": "end_turn",
  "message_count": 50,
  "tool_call_count": 17
}

After:

{
  "event_type": "Stop",
  "stop_reason": "end_turn",
  "message_count": 50,
  "tool_call_count": 17,
  "assistant_message": "Here is my response to your question."
}

Test plan

  • Added test for assistant_message field in integration.test.ts
  • Manual test: Configure a Stop hook that uses the assistant_message field

Fixes #715

🤖 Generated with Letta Code

The Stop hook now includes the assistant's final message text in the payload,
making it easier for hook consumers to access the agent's response.

New payload field:
- assistant_message: The final assistant message text (if any)

Fixes #715

Co-authored-by: Cameron <cpfiffer@users.noreply.github.com>

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop hook does not include an assistant message

1 participant