Skip to content

Conversation

alifarooq9
Copy link

exposes the triggers instance from the agent package, enabling devs to register triggers directly in their own apps on agent component tables

@ianmacartney
Copy link
Contributor

ianmacartney commented Sep 6, 2025

Unfortunately this won't behave as expected - changes to the triggers global do not propagate when the component is invoked - the component is loaded in its own isolated environment without your code, and without access to your tables

@alifarooq9 alifarooq9 closed this by deleting the head repository Sep 27, 2025
@ianmacartney
Copy link
Contributor

If we were to capture this as a new feature - maybe having an "onSaveMessages" mutation that's called in the same transaction as messages being saved would be good? You could do things transactionally with your own data when messages are saved / updated. This could be a big win for folks who want to generate associated data when tool calls happen, e.g. for human-in-the-loop usecases.
Would that achieve what you're looking for @alifarooq9 ?

@alifarooq9
Copy link
Author

If we were to capture this as a new feature - maybe having an "onSaveMessages" mutation that's called in the same transaction as messages being saved would be good? You could do things transactionally with your own data when messages are saved / updated. This could be a big win for folks who want to generate associated data when tool calls happen, e.g. for human-in-the-loop usecases. Would that achieve what you're looking for @alifarooq9 ?

Yes, this would be a better approach.

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.

2 participants