feat: log usage tools when called by LLM (#2916)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled

* feat: log usage tools when called by LLM

* feat: print llm tool usage in console
This commit is contained in:
Lucas Gomide
2025-05-29 15:34:34 -03:00
committed by GitHub
parent e676c83d7f
commit 55ed91e313
7 changed files with 363 additions and 21 deletions

View File

@@ -7,11 +7,11 @@ from .base_events import BaseEvent
class ToolUsageEvent(BaseEvent):
"""Base event for tool usage tracking"""
agent_key: str
agent_role: str
agent_key: Optional[str] = None
agent_role: Optional[str] = None
tool_name: str
tool_args: Dict[str, Any] | str
tool_class: str
tool_class: Optional[str] = None
run_attempts: int | None = None
delegations: int | None = None
agent: Optional[Any] = None