3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
i use the convex angent and then myAgent.continueThread(ctx, { threadId: args.threadId }); to continue with this. I expect all previous messages to be included in this thread, but they are not. Seems that the message history is incomplete and i don't know why. First i thought it might be a problem of the agent beeing re-instanciated all the time, because it seems that module context does not survive across multiple convex backend calls. But i now have the impression that this is intended behaviour and that threads should survive outside the in-memory agent. Any help appreciated!!! Thanks a lot
a bit furhter down the debugging road, it seems like a false impression, given by incomplete request-information in the debugging rawRequestResponseHandler: async (ctx, { request, response }) => { ...
BECAUSE, i get all the message history when i inspect the thread via. ctx.runQuery(components.agent.messages.listMessagesByThreadId, { threadId: args.threadId, order: "asc", paginationOpts: { cursor: null, numItems: 100 }, }); So maybe the rawRequestResponseHandler just passes the system prompt and last message instead of the whole message history that probably is passed as context to the underlaying LLM. Don't know which one better reflects the situation.
BECAUSE, i get all the message history when i inspect the thread via. ctx.runQuery(components.agent.messages.listMessagesByThreadId, { threadId: args.threadId, order: "asc", paginationOpts: { cursor: null, numItems: 100 }, }); So maybe the rawRequestResponseHandler just passes the system prompt and last message instead of the whole message history that probably is passed as context to the underlaying LLM. Don't know which one better reflects the situation.
You can look at what messages are stored by using the API or by looking in the dashboard.
If you're passing many messages as input at once, it'll store the last by default, or you can configure storage options to save them all.
By default all messages are created.
Ensure you're on the latest version in case it's a bug that's been fixed!
The #agents channel is a great resource