Improved Tool Calling Context #5741
EItanya
started this conversation in
Feature suggestions
Replies: 1 comment 7 replies
-
For OTEL, we can follow what we do for LLMCallEvent and emit a See: autogen/python/packages/autogen-core/src/autogen_core/logging.py Lines 9 to 10 in dd0781a And where it is emitted: Created #5745 |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently autogen studio supports Otel tracing for its agent runtime, however this support does not extend for any other network calls in the system. In order to perform distributed tracing it would be wonderful to be able to pass the trace context through to LLM calls as well as any tool calls.
In addition to passing tracing context, this system could be generic enough to allow for passing generic context variables through the call stack for authentication scenarios. For example, let's say you created an agent using
agentchat
which you wanted to perform function calls using the credentials of the user who initiated the task, it's currently impossible because tool calls only take in the function args, and a cancellation token.I am by no means a Python expert, and I'm not sure how
Context
is usually handled, but I am suggesting modifying the tool interface to be something like:Again I want to make clear that the above example is probably not the most
Pythonic
code ever, so this is more meant to start the discussion rather than be a fixed solution.I also want to point out that
opentelemetry
has aContext
idea that we already use for tracing in the runtimes, so we could extend that concept for this use-case. I'm happy to do deeper research into how we can extend the existingTracing
work to be more generic, but I wanted to open the conversation first.@victordibia and @ekzhu this is further work that I think could help productionize agentchat/studio. Happy to work more on it but wanted feedback first.
Beta Was this translation helpful? Give feedback.
All reactions