Skip to content
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

tracing/logs of all steps #125

Open
threepointone opened this issue Dec 14, 2024 · 2 comments
Open

tracing/logs of all steps #125

threepointone opened this issue Dec 14, 2024 · 2 comments

Comments

@threepointone
Copy link

Just ran surprise_trip.ts locally, and it worked! Very nice. While I see that all the steps are logged to the terminal, the final WorkflowState only has the final messages array. Is there some way to get all the agents/tools executed, prompts, etc? While I could augment my tool functions with some way to log messages some place, I'm curious how I would do it for an agent. Maybe via the provider? Logging all workflow transitions would also be interesting.

@grabbou
Copy link
Collaborator

grabbou commented Dec 15, 2024

Yeah, we don't have this per se right now. We have built-in logger, which gets previous and next state, and that's how he figures the steps out.

I am guessing one way to implement this as of today would be via custom logger, that keeps internal execution state, stores prev/next state. When done, you could read the log from its state. It could also print it to a log file automatically.

We do not log prompts yet, which is something to keep in mind as we work on the provider abstraction. We need to implement token usage and other metrics as well, so whatever is the solution, should do this too!

I was thinking we could add (or replace logger entirely) with a new property telemetry or something on the workflow object, but I quickly got rid of that, as passing workflow object around the entire codebase is definitely not something I like.

Definitely open to ideas and discussion, taking from your functional experience! I am sure there's clean and elegant way this can be done.

@pkarw
Copy link
Collaborator

pkarw commented Dec 15, 2024

Related to: #110

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

No branches or pull requests

3 participants