Skip to main content

Overview

Use agent(name: Optional[str] = None, version: Optional[int] = None, method_name: Optional[str] = None) to mark an agent run. Tasks and tools executed inside the agent are captured beneath this span.

Function usage

Class usage

Parameters

  • name: agent display name; defaults to function/class name
  • version: optional integer version
  • method_name: when decorating a class, the method to wrap

Notes

  • Agent spans set the workflow name context for nested spans