diff --git a/docs/tracing.md b/docs/tracing.md index 98574d3..a1f83ec 100644 --- a/docs/tracing.md +++ b/docs/tracing.md @@ -35,6 +35,9 @@ By default, the SDK traces the following: - Function tool calls are each wrapped in `function_span()` - Guardrails are wrapped in `guardrail_span()` - Handoffs are wrapped in `handoff_span()` +- Audio inputs (speech-to-text) are wrapped in a `transcription_span()` +- Audio outputs (text-to-speech) are wrapped in a `speech_span()` +- Related audio spans may be parented under a `speech_group_span()` By default, the trace is named "Agent trace". You can set this name if you use `trace`, or you can can configure the name and other properties with the [`RunConfig`][agents.run.RunConfig]. @@ -76,7 +79,11 @@ Spans are automatically part of the current trace, and are nested under the near ## Sensitive data -Some spans track potentially sensitive data. For example, the `generation_span()` stores the inputs/outputs of the LLM generation, and `function_span()` stores the inputs/outputs of function calls. These may contain sensitive data, so you can disable capturing that data via [`RunConfig.trace_include_sensitive_data`][agents.run.RunConfig.trace_include_sensitive_data]. +Certain spans may capture potentially sensitive data. + +The `generation_span()` stores the inputs/outputs of the LLM generation, and `function_span()` stores the inputs/outputs of function calls. These may contain sensitive data, so you can disable capturing that data via [`RunConfig.trace_include_sensitive_data`][agents.run.RunConfig.trace_include_sensitive_data]. + +Similarly, Audio spans include base64-encoded PCM data for input and output audio by default. You can disable capturing this audio data by configuring [`RunConfig.trace_include_sensitive_audio_data`][agents.run.RunConfig.trace_include_sensitive_audio_data]. ## Custom tracing processors diff --git a/examples/basic/hello_world.py b/examples/basic/hello_world.py index e972e37..a9514f3 100644 --- a/examples/basic/hello_world.py +++ b/examples/basic/hello_world.py @@ -1,18 +1,12 @@ import asyncio -from agents import Agent, Runner, ModelSettings, OpenAIResponsesModel +from agents import Agent, Runner async def main(): agent = Agent( - name="English agent", - instructions="You only speak English", - model=OpenAIResponsesModel( - model="gpt-4o", - model_settings=ModelSettings( - store=False, - ) - ) + name="Assistant", + instructions="You only respond in haikus.", ) result = await Runner.run(agent, "Tell me about recursion in programming.") @@ -23,4 +17,4 @@ async def main(): if __name__ == "__main__": - asyncio.run(main()) + asyncio.run(main()) \ No newline at end of file