ZxiesZ
Convex Community5mo ago
4 replies
Zxies

Trigger on agent component tables

Hi Convex team,

I'm working with agent component but running in some problem, the problem is because the tables are maintained internally, I'm not able to use trigger with type safty

// register a function to run when a `ctx.db.insert`, `ctx.db.patch`, `ctx.db.replace`, or `ctx.db.delete` changes the "users" table
triggers.register("users", async (ctx, change) => {
  console.log("user changed", change);
});



I want to use the
messages
table from agent component here but I'm getting type error, what could I do?

Thanks
Was this page helpful?