-
Notifications
You must be signed in to change notification settings - Fork 7
API to manage debugging info (steps, full request/responses) #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Agreed! I actually think we should get rid of steps, so long as there's sufficient data available on the I avoided surfacing a way to get the steps or manage them b/c I wanted them to be an implementation detail I could change. But not deleting the steps when deleting the thread is a bug, and exposing vacuuming steps would be nice since they're somewhat heavy-weight. Do you get anything special out of steps? Any objection to phasing them out? |
Steps show the real conversation thread sent to the model, together will exact tool specs etc. It is helping me tremendously for investigation purposes. I don't think I would ever have a need for it other than for investigations though. |
What if those were logged extensively so you could capture and investigate
and even copy the json and turn the logging on/off when you aren’t
investigating?
Or have a flag to dump all requests and responses in full to a dedicated
table?
…On Sat, May 10, 2025 at 1:19 PM apostolisCodpal ***@***.***> wrote:
*apostolisCodpal* left a comment (get-convex/agent#42)
<#42 (comment)>
Steps show the real conversation thread sent to the model, together will
exact tool specs etc. It is helping me tremendously for investigation
purposes. I don't think I would ever have a need for it other than for
investigations though.
—
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACZQW65Q4NDVHIPVRSBARD25ZGLXAVCNFSM6AAAAAB4ZCTPFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNRZGEYTSNZQGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Those are great suggestions. Database might be easier for a "quick" lookup but logs are lighter and we have integrations that can stream them outside of convex so that direction might make more sense. LLMs can be quite unpredictable at times as-it-is. Having the ability to log/dump the real JSON and know that you see what they see is crucial to understanding seemingly "unexpected" behaviour. |
I just had a thought that puts a bit more work on the user, but gives more control over the behavior without the library needing to be overly opinionated / configurable: const agent = new Agent(components.agent, {
...
onLLMResponse: async (ctx, { request, response, agentName, userId, threadId, ...? }) => {
// log it in your preferred format to introspect yourself
console.log({ request, response });
// and/or dump to a table conditionally
if (process.env.CAPTURE_RAW_REQUESTS) {
await ctx.db.insert("rawRequests", { request, response });
}
}
}); Not sure about the naming for |
That's a great thought @ianmacartney. If you are doing with this direction I would urge to include also |
Pre-processing messages is possible at the start of the |
I need to work with it a bit more to formulate a stronger opinion. Let's leave this for now, if I see any limitations that can be resolved I'll open a separate ticket. |
"convex": "^1.23.0"
"@convex-dev/agent": "0.0.15-alpha.2"
This is not urgent, but would become a problem over time.
I couldn't find an API for deleting the
steps
in thesteps
table.Calling
components.agent.messages.deleteAllForThreadIdAsync
orthe Sync
version deletes all messages and embeddings. It makes sense to have the steps separately but there should still be an API to delete them. Perhaps by deleted threads.The text was updated successfully, but these errors were encountered: