openai-agents 0.2.11__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of openai-agents might be problematic. Click here for more details.

Files changed (40) hide show
  1. agents/_debug.py +15 -4
  2. agents/_run_impl.py +34 -37
  3. agents/agent.py +18 -2
  4. agents/extensions/handoff_filters.py +2 -0
  5. agents/extensions/memory/__init__.py +42 -15
  6. agents/extensions/memory/encrypt_session.py +185 -0
  7. agents/extensions/models/litellm_model.py +62 -10
  8. agents/function_schema.py +45 -3
  9. agents/memory/__init__.py +2 -0
  10. agents/memory/openai_conversations_session.py +0 -3
  11. agents/memory/util.py +20 -0
  12. agents/models/chatcmpl_converter.py +74 -15
  13. agents/models/chatcmpl_helpers.py +6 -0
  14. agents/models/chatcmpl_stream_handler.py +29 -1
  15. agents/models/openai_chatcompletions.py +26 -4
  16. agents/models/openai_responses.py +30 -4
  17. agents/realtime/__init__.py +2 -0
  18. agents/realtime/_util.py +1 -1
  19. agents/realtime/agent.py +7 -0
  20. agents/realtime/audio_formats.py +29 -0
  21. agents/realtime/config.py +32 -4
  22. agents/realtime/items.py +17 -1
  23. agents/realtime/model_events.py +2 -0
  24. agents/realtime/model_inputs.py +15 -1
  25. agents/realtime/openai_realtime.py +421 -130
  26. agents/realtime/session.py +167 -14
  27. agents/result.py +47 -20
  28. agents/run.py +191 -106
  29. agents/tool.py +1 -1
  30. agents/tracing/processor_interface.py +84 -11
  31. agents/tracing/spans.py +88 -0
  32. agents/tracing/traces.py +99 -16
  33. agents/util/_json.py +19 -1
  34. agents/util/_transforms.py +12 -2
  35. agents/voice/input.py +5 -4
  36. agents/voice/models/openai_stt.py +15 -8
  37. {openai_agents-0.2.11.dist-info → openai_agents-0.3.1.dist-info}/METADATA +4 -2
  38. {openai_agents-0.2.11.dist-info → openai_agents-0.3.1.dist-info}/RECORD +40 -37
  39. {openai_agents-0.2.11.dist-info → openai_agents-0.3.1.dist-info}/WHEEL +0 -0
  40. {openai_agents-0.2.11.dist-info → openai_agents-0.3.1.dist-info}/licenses/LICENSE +0 -0
agents/tracing/spans.py CHANGED
@@ -16,24 +16,84 @@ TSpanData = TypeVar("TSpanData", bound=SpanData)
16
16
 
17
17
 
18
18
  class SpanError(TypedDict):
19
+ """Represents an error that occurred during span execution.
20
+
21
+ Attributes:
22
+ message: A human-readable error description
23
+ data: Optional dictionary containing additional error context
24
+ """
25
+
19
26
  message: str
20
27
  data: dict[str, Any] | None
21
28
 
22
29
 
23
30
  class Span(abc.ABC, Generic[TSpanData]):
31
+ """Base class for representing traceable operations with timing and context.
32
+
33
+ A span represents a single operation within a trace (e.g., an LLM call, tool execution,
34
+ or agent run). Spans track timing, relationships between operations, and operation-specific
35
+ data.
36
+
37
+ Type Args:
38
+ TSpanData: The type of span-specific data this span contains.
39
+
40
+ Example:
41
+ ```python
42
+ # Creating a custom span
43
+ with custom_span("database_query", {
44
+ "operation": "SELECT",
45
+ "table": "users"
46
+ }) as span:
47
+ results = await db.query("SELECT * FROM users")
48
+ span.set_output({"count": len(results)})
49
+
50
+ # Handling errors in spans
51
+ with custom_span("risky_operation") as span:
52
+ try:
53
+ result = perform_risky_operation()
54
+ except Exception as e:
55
+ span.set_error({
56
+ "message": str(e),
57
+ "data": {"operation": "risky_operation"}
58
+ })
59
+ raise
60
+ ```
61
+
62
+ Notes:
63
+ - Spans automatically nest under the current trace
64
+ - Use context managers for reliable start/finish
65
+ - Include relevant data but avoid sensitive information
66
+ - Handle errors properly using set_error()
67
+ """
68
+
24
69
  @property
25
70
  @abc.abstractmethod
26
71
  def trace_id(self) -> str:
72
+ """The ID of the trace this span belongs to.
73
+
74
+ Returns:
75
+ str: Unique identifier of the parent trace.
76
+ """
27
77
  pass
28
78
 
29
79
  @property
30
80
  @abc.abstractmethod
31
81
  def span_id(self) -> str:
82
+ """Unique identifier for this span.
83
+
84
+ Returns:
85
+ str: The span's unique ID within its trace.
86
+ """
32
87
  pass
33
88
 
34
89
  @property
35
90
  @abc.abstractmethod
36
91
  def span_data(self) -> TSpanData:
92
+ """Operation-specific data for this span.
93
+
94
+ Returns:
95
+ TSpanData: Data specific to this type of span (e.g., LLM generation data).
96
+ """
37
97
  pass
38
98
 
39
99
  @abc.abstractmethod
@@ -67,6 +127,11 @@ class Span(abc.ABC, Generic[TSpanData]):
67
127
  @property
68
128
  @abc.abstractmethod
69
129
  def parent_id(self) -> str | None:
130
+ """ID of the parent span, if any.
131
+
132
+ Returns:
133
+ str | None: The parent span's ID, or None if this is a root span.
134
+ """
70
135
  pass
71
136
 
72
137
  @abc.abstractmethod
@@ -76,6 +141,11 @@ class Span(abc.ABC, Generic[TSpanData]):
76
141
  @property
77
142
  @abc.abstractmethod
78
143
  def error(self) -> SpanError | None:
144
+ """Any error that occurred during span execution.
145
+
146
+ Returns:
147
+ SpanError | None: Error details if an error occurred, None otherwise.
148
+ """
79
149
  pass
80
150
 
81
151
  @abc.abstractmethod
@@ -85,15 +155,33 @@ class Span(abc.ABC, Generic[TSpanData]):
85
155
  @property
86
156
  @abc.abstractmethod
87
157
  def started_at(self) -> str | None:
158
+ """When the span started execution.
159
+
160
+ Returns:
161
+ str | None: ISO format timestamp of span start, None if not started.
162
+ """
88
163
  pass
89
164
 
90
165
  @property
91
166
  @abc.abstractmethod
92
167
  def ended_at(self) -> str | None:
168
+ """When the span finished execution.
169
+
170
+ Returns:
171
+ str | None: ISO format timestamp of span end, None if not finished.
172
+ """
93
173
  pass
94
174
 
95
175
 
96
176
  class NoOpSpan(Span[TSpanData]):
177
+ """A no-op implementation of Span that doesn't record any data.
178
+
179
+ Used when tracing is disabled but span operations still need to work.
180
+
181
+ Args:
182
+ span_data: The operation-specific data for this span.
183
+ """
184
+
97
185
  __slots__ = ("_span_data", "_prev_span_token")
98
186
 
99
187
  def __init__(self, span_data: TSpanData):
agents/tracing/traces.py CHANGED
@@ -11,8 +11,35 @@ from .scope import Scope
11
11
 
12
12
 
13
13
  class Trace(abc.ABC):
14
- """
15
- A trace is the root level object that tracing creates. It represents a logical "workflow".
14
+ """A complete end-to-end workflow containing related spans and metadata.
15
+
16
+ A trace represents a logical workflow or operation (e.g., "Customer Service Query"
17
+ or "Code Generation") and contains all the spans (individual operations) that occur
18
+ during that workflow.
19
+
20
+ Example:
21
+ ```python
22
+ # Basic trace usage
23
+ with trace("Order Processing") as t:
24
+ validation_result = await Runner.run(validator, order_data)
25
+ if validation_result.approved:
26
+ await Runner.run(processor, order_data)
27
+
28
+ # Trace with metadata and grouping
29
+ with trace(
30
+ "Customer Service",
31
+ group_id="chat_123",
32
+ metadata={"customer": "user_456"}
33
+ ) as t:
34
+ result = await Runner.run(support_agent, query)
35
+ ```
36
+
37
+ Notes:
38
+ - Use descriptive workflow names
39
+ - Group related traces with consistent group_ids
40
+ - Add relevant metadata for filtering/analysis
41
+ - Use context managers for reliable cleanup
42
+ - Consider privacy when adding trace data
16
43
  """
17
44
 
18
45
  @abc.abstractmethod
@@ -25,51 +52,92 @@ class Trace(abc.ABC):
25
52
 
26
53
  @abc.abstractmethod
27
54
  def start(self, mark_as_current: bool = False):
28
- """
29
- Start the trace.
55
+ """Start the trace and optionally mark it as the current trace.
30
56
 
31
57
  Args:
32
- mark_as_current: If true, the trace will be marked as the current trace.
58
+ mark_as_current: If true, marks this trace as the current trace
59
+ in the execution context.
60
+
61
+ Notes:
62
+ - Must be called before any spans can be added
63
+ - Only one trace can be current at a time
64
+ - Thread-safe when using mark_as_current
33
65
  """
34
66
  pass
35
67
 
36
68
  @abc.abstractmethod
37
69
  def finish(self, reset_current: bool = False):
38
- """
39
- Finish the trace.
70
+ """Finish the trace and optionally reset the current trace.
40
71
 
41
72
  Args:
42
- reset_current: If true, the trace will be reset as the current trace.
73
+ reset_current: If true, resets the current trace to the previous
74
+ trace in the execution context.
75
+
76
+ Notes:
77
+ - Must be called to complete the trace
78
+ - Finalizes all open spans
79
+ - Thread-safe when using reset_current
43
80
  """
44
81
  pass
45
82
 
46
83
  @property
47
84
  @abc.abstractmethod
48
85
  def trace_id(self) -> str:
49
- """
50
- The trace ID.
86
+ """Get the unique identifier for this trace.
87
+
88
+ Returns:
89
+ str: The trace's unique ID in the format 'trace_<32_alphanumeric>'
90
+
91
+ Notes:
92
+ - IDs are globally unique
93
+ - Used to link spans to their parent trace
94
+ - Can be used to look up traces in the dashboard
51
95
  """
52
96
  pass
53
97
 
54
98
  @property
55
99
  @abc.abstractmethod
56
100
  def name(self) -> str:
57
- """
58
- The name of the workflow being traced.
101
+ """Get the human-readable name of this workflow trace.
102
+
103
+ Returns:
104
+ str: The workflow name (e.g., "Customer Service", "Data Processing")
105
+
106
+ Notes:
107
+ - Should be descriptive and meaningful
108
+ - Used for grouping and filtering in the dashboard
109
+ - Helps identify the purpose of the trace
59
110
  """
60
111
  pass
61
112
 
62
113
  @abc.abstractmethod
63
114
  def export(self) -> dict[str, Any] | None:
64
- """
65
- Export the trace as a dictionary.
115
+ """Export the trace data as a serializable dictionary.
116
+
117
+ Returns:
118
+ dict | None: Dictionary containing trace data, or None if tracing is disabled.
119
+
120
+ Notes:
121
+ - Includes all spans and their data
122
+ - Used for sending traces to backends
123
+ - May include metadata and group ID
66
124
  """
67
125
  pass
68
126
 
69
127
 
70
128
  class NoOpTrace(Trace):
71
- """
72
- A no-op trace that will not be recorded.
129
+ """A no-op implementation of Trace that doesn't record any data.
130
+
131
+ Used when tracing is disabled but trace operations still need to work.
132
+ Maintains proper context management but doesn't store or export any data.
133
+
134
+ Example:
135
+ ```python
136
+ # When tracing is disabled, traces become NoOpTrace
137
+ with trace("Disabled Workflow") as t:
138
+ # Operations still work but nothing is recorded
139
+ await Runner.run(agent, "query")
140
+ ```
73
141
  """
74
142
 
75
143
  def __init__(self):
@@ -101,13 +169,28 @@ class NoOpTrace(Trace):
101
169
 
102
170
  @property
103
171
  def trace_id(self) -> str:
172
+ """The trace's unique identifier.
173
+
174
+ Returns:
175
+ str: A unique ID for this trace.
176
+ """
104
177
  return "no-op"
105
178
 
106
179
  @property
107
180
  def name(self) -> str:
181
+ """The workflow name for this trace.
182
+
183
+ Returns:
184
+ str: Human-readable name describing this workflow.
185
+ """
108
186
  return "no-op"
109
187
 
110
188
  def export(self) -> dict[str, Any] | None:
189
+ """Export the trace data as a dictionary.
190
+
191
+ Returns:
192
+ dict | None: Trace data in exportable format, or None if no data.
193
+ """
111
194
  return None
112
195
 
113
196
 
agents/util/_json.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Literal
3
+ from collections.abc import Iterable
4
+ from typing import Any, Literal
4
5
 
5
6
  from pydantic import TypeAdapter, ValidationError
6
7
  from typing_extensions import TypeVar
@@ -29,3 +30,20 @@ def validate_json(json_str: str, type_adapter: TypeAdapter[T], partial: bool) ->
29
30
  raise ModelBehaviorError(
30
31
  f"Invalid JSON when parsing {json_str} for {type_adapter}; {e}"
31
32
  ) from e
33
+
34
+
35
+ def _to_dump_compatible(obj: Any) -> Any:
36
+ return _to_dump_compatible_internal(obj)
37
+
38
+
39
+ def _to_dump_compatible_internal(obj: Any) -> Any:
40
+ if isinstance(obj, dict):
41
+ return {k: _to_dump_compatible_internal(v) for k, v in obj.items()}
42
+
43
+ if isinstance(obj, (list, tuple)):
44
+ return [_to_dump_compatible_internal(x) for x in obj]
45
+
46
+ if isinstance(obj, Iterable) and not isinstance(obj, (str, bytes, bytearray)):
47
+ return [_to_dump_compatible_internal(x) for x in obj]
48
+
49
+ return obj
@@ -1,11 +1,21 @@
1
1
  import re
2
2
 
3
+ from ..logger import logger
4
+
3
5
 
4
6
  def transform_string_function_style(name: str) -> str:
5
7
  # Replace spaces with underscores
6
8
  name = name.replace(" ", "_")
7
9
 
8
10
  # Replace non-alphanumeric characters with underscores
9
- name = re.sub(r"[^a-zA-Z0-9]", "_", name)
11
+ transformed_name = re.sub(r"[^a-zA-Z0-9_]", "_", name)
12
+
13
+ if transformed_name != name:
14
+ final_name = transformed_name.lower()
15
+ logger.warning(
16
+ f"Tool name {name!r} contains invalid characters for function calling and has been "
17
+ f"transformed to {final_name!r}. Please use only letters, digits, and underscores "
18
+ "to avoid potential naming conflicts."
19
+ )
10
20
 
11
- return name.lower()
21
+ return transformed_name.lower()
agents/voice/input.py CHANGED
@@ -13,7 +13,7 @@ DEFAULT_SAMPLE_RATE = 24000
13
13
 
14
14
 
15
15
  def _buffer_to_audio_file(
16
- buffer: npt.NDArray[np.int16 | np.float32],
16
+ buffer: npt.NDArray[np.int16 | np.float32 | np.float64],
17
17
  frame_rate: int = DEFAULT_SAMPLE_RATE,
18
18
  sample_width: int = 2,
19
19
  channels: int = 1,
@@ -77,12 +77,13 @@ class StreamedAudioInput:
77
77
  """
78
78
 
79
79
  def __init__(self):
80
- self.queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32]] = asyncio.Queue()
80
+ self.queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32] | None] = asyncio.Queue()
81
81
 
82
- async def add_audio(self, audio: npt.NDArray[np.int16 | np.float32]):
82
+ async def add_audio(self, audio: npt.NDArray[np.int16 | np.float32] | None):
83
83
  """Adds more audio data to the stream.
84
84
 
85
85
  Args:
86
- audio: The audio data to add. Must be a numpy array of int16 or float32.
86
+ audio: The audio data to add. Must be a numpy array of int16 or float32 or None.
87
+ If None passed, it indicates the end of the stream.
87
88
  """
88
89
  await self.queue.put(audio)
@@ -88,7 +88,7 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
88
88
  self._trace_include_sensitive_data = trace_include_sensitive_data
89
89
  self._trace_include_sensitive_audio_data = trace_include_sensitive_audio_data
90
90
 
91
- self._input_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32]] = input.queue
91
+ self._input_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32] | None] = input.queue
92
92
  self._output_queue: asyncio.Queue[str | ErrorSentinel | SessionCompleteSentinel] = (
93
93
  asyncio.Queue()
94
94
  )
@@ -163,11 +163,16 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
163
163
  await self._websocket.send(
164
164
  json.dumps(
165
165
  {
166
- "type": "transcription_session.update",
166
+ "type": "session.update",
167
167
  "session": {
168
- "input_audio_format": "pcm16",
169
- "input_audio_transcription": {"model": self._model},
170
- "turn_detection": self._turn_detection,
168
+ "type": "transcription",
169
+ "audio": {
170
+ "input": {
171
+ "format": {"type": "audio/pcm", "rate": 24000},
172
+ "transcription": {"model": self._model},
173
+ "turn_detection": self._turn_detection,
174
+ }
175
+ },
171
176
  },
172
177
  }
173
178
  )
@@ -226,7 +231,10 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
226
231
  break
227
232
 
228
233
  event_type = event.get("type", "unknown")
229
- if event_type == "input_audio_transcription_completed":
234
+ if event_type in [
235
+ "input_audio_transcription_completed", # legacy
236
+ "conversation.item.input_audio_transcription.completed",
237
+ ]:
230
238
  transcript = cast(str, event.get("transcript", ""))
231
239
  if len(transcript) > 0:
232
240
  self._end_turn(transcript)
@@ -242,7 +250,7 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
242
250
  await self._output_queue.put(SessionCompleteSentinel())
243
251
 
244
252
  async def _stream_audio(
245
- self, audio_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32]]
253
+ self, audio_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32] | None]
246
254
  ) -> None:
247
255
  assert self._websocket is not None, "Websocket not initialized"
248
256
  self._start_turn()
@@ -275,7 +283,6 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
275
283
  "wss://api.openai.com/v1/realtime?intent=transcription",
276
284
  additional_headers={
277
285
  "Authorization": f"Bearer {self._client.api_key}",
278
- "OpenAI-Beta": "realtime=v1",
279
286
  "OpenAI-Log-Session": "1",
280
287
  },
281
288
  ) as ws:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openai-agents
3
- Version: 0.2.11
3
+ Version: 0.3.1
4
4
  Summary: OpenAI Agents SDK
5
5
  Project-URL: Homepage, https://openai.github.io/openai-agents-python/
6
6
  Project-URL: Repository, https://github.com/openai/openai-agents-python
@@ -21,11 +21,13 @@ Classifier: Typing :: Typed
21
21
  Requires-Python: >=3.9
22
22
  Requires-Dist: griffe<2,>=1.5.6
23
23
  Requires-Dist: mcp<2,>=1.11.0; python_version >= '3.10'
24
- Requires-Dist: openai<2,>=1.104.1
24
+ Requires-Dist: openai<2,>=1.107.1
25
25
  Requires-Dist: pydantic<3,>=2.10
26
26
  Requires-Dist: requests<3,>=2.0
27
27
  Requires-Dist: types-requests<3,>=2.0
28
28
  Requires-Dist: typing-extensions<5,>=4.12.2
29
+ Provides-Extra: encrypt
30
+ Requires-Dist: cryptography<46,>=45.0; extra == 'encrypt'
29
31
  Provides-Extra: litellm
30
32
  Requires-Dist: litellm<2,>=1.67.4.post1; extra == 'litellm'
31
33
  Provides-Extra: realtime
@@ -1,12 +1,12 @@
1
1
  agents/__init__.py,sha256=Kr6-8HItTfnz5HFS9x7PVD99v_Lu9VxlE27UjX3BH8M,8000
2
2
  agents/_config.py,sha256=ANrM7GP2VSQehDkMc9qocxkUlPwqU-i5sieMJyEwxpM,796
3
- agents/_debug.py,sha256=7OKys2lDjeCtGggTkM53m_8vw0WIr3yt-_JPBDAnsw0,608
4
- agents/_run_impl.py,sha256=cEGeEQDc3NCNGwwfpKWnTCXgxyznSmWgDpQkRq-6JgM,46461
5
- agents/agent.py,sha256=IINVHZyO5iFTN3rf94YB9Hv3hUIOouVUFt9cagSJwvQ,19120
3
+ agents/_debug.py,sha256=dRe2dUlA9bCLp6f8bAdiX7JfGyJuHyS_DRdW0kZshl0,856
4
+ agents/_run_impl.py,sha256=9mW1kh9_WC9GvTgo4GyroMhthzaH-qKpTKIZxE15kEE,46352
5
+ agents/agent.py,sha256=P5AzwKz3FiQJjzfautF0R9JzxkTXEeItcEkJgn8z5mM,19832
6
6
  agents/agent_output.py,sha256=teTFK8unUN3esXhmEBO0bQGYQm1Axd5rYleDt9TFDgw,7153
7
7
  agents/computer.py,sha256=XD44UgiUWSfniv-xKwwDP6wFKVwBiZkpaL1hO-0-7ZA,2516
8
8
  agents/exceptions.py,sha256=NHMdHE0cZ6AdA6UgUylTzVHAX05Ol1CkO814a0FdZcs,2862
9
- agents/function_schema.py,sha256=jXdpjl90lODRzdoOR_kUmEbfA3T8Dfa7kkSV8xWQDDo,13558
9
+ agents/function_schema.py,sha256=njtbLt44DOkIU0a0U8TeDNEx-iQZU8oohwy3k7-k4A8,14855
10
10
  agents/guardrail.py,sha256=7P-kd9rKPhgB8rtI31MCV5ho4ZrEaNCQxHvE8IK3EOk,9582
11
11
  agents/handoffs.py,sha256=kDTM3nj3E_0khiJPMJAIN00gektMTRNbaYSbc5ZCnBM,11411
12
12
  agents/items.py,sha256=aHo7KTXZLBcHSrKHWDaBB6L7XmBCAIekG5e0xOIhkyM,9828
@@ -16,82 +16,85 @@ agents/model_settings.py,sha256=7Ul-Xg-aNVXIbK6V4Rm2t5EEfNR0tsy_A9ac_wFqLLk,6828
16
16
  agents/prompts.py,sha256=Ss5y_7s2HFcRAOAKu4WTxQszs5ybI8TfbxgEYdnj9sg,2231
17
17
  agents/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
18
18
  agents/repl.py,sha256=NX0BE5YDnmGQ2rdQsmLm3CKkQZ5m4GC95xXmUsAXJVs,2539
19
- agents/result.py,sha256=YCGYHoc5X1_vLKu5QiK6F8C1ZXI3tTfLXaZoqbYgUMA,10753
20
- agents/run.py,sha256=pPVHg6NexEriaBSAOHjDaioEi5pKnEcUXkSaofIxtNM,62260
19
+ agents/result.py,sha256=Ykf5V-DyufMgLEi2YhKFecMr_G8XDEiL-aIBBRcL5Zg,12050
20
+ agents/run.py,sha256=ZsdKenRgaCZhR9j0qkJeXAHAnr6LPPAWI-DjSD-JFYU,64511
21
21
  agents/run_context.py,sha256=vuSUQM8O4CLensQY27-22fOqECnw7yvwL9U3WO8b_bk,851
22
22
  agents/stream_events.py,sha256=VFyTu-DT3ZMnHLtMbg-X_lxec0doQxNfx-hVxLB0BpI,1700
23
23
  agents/strict_schema.py,sha256=_KuEJkglmq-Fj3HSeYP4WqTvqrxbSKu6gezfz5Brhh0,5775
24
- agents/tool.py,sha256=1B2GgRlPIAhiS4uxzot9mpdaAOJyIKzikzCzIDPawDE,17031
24
+ agents/tool.py,sha256=mk4mKWy-K2eHIygLTNZf447oyIRqLz8Ex1R-wEQ9vS8,17023
25
25
  agents/tool_context.py,sha256=lbnctijZeanXAThddkklF7vDrXK1Ie2_wx6JZPCOihI,1434
26
26
  agents/usage.py,sha256=Tb5udGd3DPgD0JBdRD8fDctTE4M-zKML5uRn8ZG1yBc,1675
27
27
  agents/version.py,sha256=_1knUwzSK-HUeZTpRUkk6Z-CIcurqXuEplbV5TLJ08E,230
28
28
  agents/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- agents/extensions/handoff_filters.py,sha256=Bzkjb1SmIHoibgO26oesNO2Qdx2avfDGkHrSTb-XAr0,2029
29
+ agents/extensions/handoff_filters.py,sha256=CS-k7TGCtT8TW3GeXb04OoFBXKdjg8-85QXswWAYBmI,2095
30
30
  agents/extensions/handoff_prompt.py,sha256=oGWN0uNh3Z1L7E-Ev2up8W084fFrDNOsLDy7P6bcmic,1006
31
31
  agents/extensions/visualization.py,sha256=sf9D_C-HMwkbWdZccTZvvMPRy_NSiwbm48tRJlESQBI,5144
32
- agents/extensions/memory/__init__.py,sha256=Yionp3G3pj53zenHPZUHhR9aIDVEpu0d_PcvdytBRes,534
32
+ agents/extensions/memory/__init__.py,sha256=m2LezCvjjo1PgbdA-grEMCQBnzVKuTpaxfQgioJbnZg,1459
33
+ agents/extensions/memory/encrypt_session.py,sha256=PVnZIEj50bjUq16OLnMKrbZiinLkrVpamPPEw8RnUCA,6485
33
34
  agents/extensions/memory/sqlalchemy_session.py,sha256=H0aykdB4lUikmzKgwWQqI1PSYZBvHA4TDnaj9rP4HDI,11583
34
35
  agents/extensions/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- agents/extensions/models/litellm_model.py,sha256=cDLOcZVojLx-CZbipVJ5dn4RnXdegrXSPROVR-5Lxdc,15883
36
+ agents/extensions/models/litellm_model.py,sha256=D3gmqh60KdCIvSGI4yaK7ASBGaKOz3w0xxbBkcSJrpY,18140
36
37
  agents/extensions/models/litellm_provider.py,sha256=ZHgh1nMoEvA7NpawkzLh3JDuDFtwXUV94Rs7UrwWqAk,1083
37
38
  agents/mcp/__init__.py,sha256=yHmmYlrmEHzUas1inRLKL2iPqbb_-107G3gKe_tyg4I,750
38
39
  agents/mcp/server.py,sha256=4T58xiWCLiCm6JoUy_3jYWz5A8ZNsHiV1hIxjahoedU,26624
39
40
  agents/mcp/util.py,sha256=YVdPst1wWkTwbeshs-FYbr_MtrYJwO_4NzhSwj5aE5c,8239
40
- agents/memory/__init__.py,sha256=H6Nh01MRlinnEFb2Ca0ezqerIzAHuJ1izeXeYhkPrUM,255
41
- agents/memory/openai_conversations_session.py,sha256=Xiod8qk-qX4-348FvLLIG35fy0m_JiQkNqNF_woc_a8,3341
41
+ agents/memory/__init__.py,sha256=EvPDQqQs6TGEYnZi3kyVmyuE3FoTB8dD8Sn2EXMOww0,322
42
+ agents/memory/openai_conversations_session.py,sha256=_qur7ohOIqQdIrqZYvQjNSmM_jNRtSbR56MUmFTqwEM,3316
42
43
  agents/memory/session.py,sha256=pyyFn3r07ydhoy7vn1e_ky9OUa1a_7DKoEo8aZz2d3s,3038
43
44
  agents/memory/sqlite_session.py,sha256=6HGzSL70mQgutITIPZUC2x2Qtj6U4hXiZTceu3Da7TM,10130
45
+ agents/memory/util.py,sha256=ZAHOrNVA36xICFzuNgHgEA1_s_oEMO6Wsu6-EecY8JU,586
44
46
  agents/models/__init__.py,sha256=E0XVqWayVAsFqxucDLBW30siaqfNQsVrAnfidG_C3ok,287
45
47
  agents/models/_openai_shared.py,sha256=4Ngwo2Fv2RXY61Pqck1cYPkSln2tDnb8Ai-ao4QG-iE,836
46
- agents/models/chatcmpl_converter.py,sha256=fZHui5V0KwTr27L_Io-4iQxPXr0ZoEMOv1_kJNxW-y8,20320
47
- agents/models/chatcmpl_helpers.py,sha256=eIWySobaH7I0AQijAz5i-_rtsXrSvmEHD567s_8Zw1o,1318
48
- agents/models/chatcmpl_stream_handler.py,sha256=LEaQ6N9AgzOSczo3fTrv-ckkb1guBGiuNeHBAaoinCE,27429
48
+ agents/models/chatcmpl_converter.py,sha256=nXfMc6dn77kMGb3PLlLSSOpx0DZRGC6pya_m3d2Dtc4,23809
49
+ agents/models/chatcmpl_helpers.py,sha256=nB96IWzIf3-poJBi_j0hFL__xvwcfH20elE8quwBtho,1478
50
+ agents/models/chatcmpl_stream_handler.py,sha256=r8nc-4hJg1plw87y24MD48O23xnfC_2gHKowtOYgO3M,28896
49
51
  agents/models/default_models.py,sha256=mlvBePn8H4UkHo7lN-wh7A3k2ciLgBUFKpROQxzdTfs,2098
50
52
  agents/models/fake_id.py,sha256=lbXjUUSMeAQ8eFx4V5QLUnBClHE6adJlYYav55RlG5w,268
51
53
  agents/models/interface.py,sha256=-AFUHC8iRuGZmtQwguDw4s-M4OPL2y2mct4TAmWvVrU,4057
52
54
  agents/models/multi_provider.py,sha256=aiDbls5G4YomPfN6qH1pGlj41WS5jlDp2T82zm6qcnM,5578
53
- agents/models/openai_chatcompletions.py,sha256=abwQj8CqUHa2KB4NC_DVeJhZOygyAnr4N4maZtYhchU,13321
55
+ agents/models/openai_chatcompletions.py,sha256=ln0krcK6IqjjKHwflOarIj9f7D6Xv2D8QbeqMhOmItk,13978
54
56
  agents/models/openai_provider.py,sha256=vBu3mlgDBrI_cZVVmfnWBHoPlJlsmld3lfdX8sNQQAM,3624
55
- agents/models/openai_responses.py,sha256=MagaTTlq0tpTzQbOiSHHLOURcthu_dnNp71Lwq3lqjs,18222
57
+ agents/models/openai_responses.py,sha256=aJBMRc5HOdsFiqcAxICkuP1LBna_Zz7wwdP6MOYgXF8,19071
56
58
  agents/realtime/README.md,sha256=5YCYXH5ULmlWoWo1PE9TlbHjeYgjnp-xY8ZssSFY2Vk,126
57
- agents/realtime/__init__.py,sha256=7qvzK8QJuHRnPHxDgDj21v8-lnSN4Uurg9znwJv_Tqg,4923
59
+ agents/realtime/__init__.py,sha256=v8SKjD85pqQD1ZPzEQAtmbZb2CRApe0XwrxkRxzCm7c,5013
58
60
  agents/realtime/_default_tracker.py,sha256=4OMxBvD1MnZmMn6JZYKL42uWhVzvK6NdDLDfPP54d78,1765
59
- agents/realtime/_util.py,sha256=uawurhWKi3_twNFcZ5Yn1mVvv0RKl4IoyCSag8hGxrE,313
60
- agents/realtime/agent.py,sha256=yZDgycnLFtJcfl7UHak5GEyL2vdBGxegfqEiuuzGPEk,4027
61
- agents/realtime/config.py,sha256=49ZsKY9ySBFRfiL3RGWW1aVNhahzmoNATb3Buj2npJk,5963
61
+ agents/realtime/_util.py,sha256=ehBzUN1RTD2m2TXq73Jm4WohQzJ6y_MfnF5MaK8uu14,341
62
+ agents/realtime/agent.py,sha256=bkegBJ_lc3z3NtnlIyEkVZFxZWBJwVjsQVzpQZAu7PM,4283
63
+ agents/realtime/audio_formats.py,sha256=DBUWVVff4XY5BT6Mol86tF4PFMp5OIS3LmAbqUmQn_k,1019
64
+ agents/realtime/config.py,sha256=ud0GK8ZbcnKRC4oGZNwpsiZI8TZ1OdTSMADfFtM8Z6I,6948
62
65
  agents/realtime/events.py,sha256=eANiNNyYlp_1Ybdl-MOwXRVTDtrK9hfgn6iw0xNxnaY,5889
63
66
  agents/realtime/handoffs.py,sha256=avLFix5kEutel57IRcddssGiVHzGptOzWL9OqPaLVh8,6702
64
- agents/realtime/items.py,sha256=psT6AH65qmngmPsgwk6CXacVo5tEDYq0Za3EitHFpTA,5052
67
+ agents/realtime/items.py,sha256=5EG768FkKpbk-dhe4b_7BfFpdUEFWtxoiVUtNI9KXsc,5517
65
68
  agents/realtime/model.py,sha256=Lnb9pEcvnlIdXJUcldVyioaX5lpmrBou5FZoNJe4XfA,6457
66
- agents/realtime/model_events.py,sha256=YixBKmzlCrhtzCosj0SysyZpyHbZ90455gDr4Kr7Ey8,4338
67
- agents/realtime/model_inputs.py,sha256=OW2bn3wD5_pXLunDUf35jhG2q_bTKbC_D7Qu-83aOEA,2243
68
- agents/realtime/openai_realtime.py,sha256=MVg_OzVLmC7vHWr580P42TJlY32PzGAvY40JaUmM6x0,31676
69
+ agents/realtime/model_events.py,sha256=2NKofzLszKHwtlcsogsNnH6hdeFfO7S96yWDB4AlxB8,4340
70
+ agents/realtime/model_inputs.py,sha256=gRas0-ohirmGbCMWc8tHTo-e3ZPcPn7TK9BauCK9ynA,2657
71
+ agents/realtime/openai_realtime.py,sha256=x3dLSax3DF-hbQDSPXUtvHalN3nlwwcXYBIa36_ZqNo,44307
69
72
  agents/realtime/runner.py,sha256=KfU7utmc9QFH2htIKN2IN9H-5EnB0qN9ezmvlRTnOm4,2511
70
- agents/realtime/session.py,sha256=hPIxQSsVh5whkgYnEpxk_AgvG3suuDVnpPyqVoPJBRM,26822
73
+ agents/realtime/session.py,sha256=_QWX-qGYQ4qyWcXN1xX3MqhXsSGPd1hEexoRzBSmwN8,35103
71
74
  agents/tracing/__init__.py,sha256=5HO_6na5S6EwICgwl50OMtxiIIosUrqalhvldlYvSVc,2991
72
75
  agents/tracing/create.py,sha256=xpJ4ZRnGyUDPKoVVkA_8hmdhtwOKGhSkwRco2AQIhAo,18003
73
76
  agents/tracing/logger.py,sha256=J4KUDRSGa7x5UVfUwWe-gbKwoaq8AeETRqkPt3QvtGg,68
74
- agents/tracing/processor_interface.py,sha256=e1mWcIAoQFHID1BapcrAZ6MxZg98bPVYgbOPclVoCXc,1660
77
+ agents/tracing/processor_interface.py,sha256=_kby-MyaJ9NSInZIoJi9tJlYkWsIlGm2WCeB8DhcPmY,4385
75
78
  agents/tracing/processors.py,sha256=yAGJ2aIlhU5kvdDLBx1R9_Qsbuq3296b0743GYbSnYM,11432
76
79
  agents/tracing/provider.py,sha256=a8bOZtBUih13Gjq8OtyIcx3AWJmCErc43gqPrccx_5k,10098
77
80
  agents/tracing/scope.py,sha256=u17_m8RPpGvbHrTkaO_kDi5ROBWhfOAIgBe7suiaRD4,1445
78
81
  agents/tracing/setup.py,sha256=2h9TH1GAKcXKM1U99dOKKR3XlHp8JKzh2JG3DQPKyhY,612
79
82
  agents/tracing/span_data.py,sha256=nI2Fbu1ORE8ybE6m6RuddTJF5E5xFmEj8Mq5bSFv4bE,9017
80
- agents/tracing/spans.py,sha256=6vVzocGMsdgIma1ksqkBZmhar91xj4RpgcpUC3iibqg,6606
81
- agents/tracing/traces.py,sha256=EU5KNlNOTC9GFBls5ONDA0FkaUdLrM6y-cLK5953kqE,4784
83
+ agents/tracing/spans.py,sha256=FO9dUAUXEjUbWhIU9SbsN_vzEg8i17dQrZeB8XlEIeU,9416
84
+ agents/tracing/traces.py,sha256=3dnEl_I0iA7B8JXhicD6oyCCpTu3dkGjfS0wLY-NiuU,7937
82
85
  agents/tracing/util.py,sha256=J7IZgVDmeW0aZDw8LBSjBKrlQbcOmaqZE7XQjolPwi8,490
83
86
  agents/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
87
  agents/util/_coro.py,sha256=S38XUYFC7bqTELSgMUBsAX1GoRlIrV7coupcUAWH__4,45
85
88
  agents/util/_error_tracing.py,sha256=hdkYNx180b18lP0PSB1toE5atNHsMg_Bm9Osw812vLo,421
86
- agents/util/_json.py,sha256=eKeQeMlQkBXRFeL3ilNZFmszGyfhtzZdW_GW_As6dcg,972
89
+ agents/util/_json.py,sha256=wC2NwwQspxo-PaZ3SmmlKS9KrBO5Gw4qkncpwtf86vA,1526
87
90
  agents/util/_pretty_print.py,sha256=pnrM81KRG4G21jZnYrYBCkPgtUeP8qcnJm-9tpAV1WA,2738
88
- agents/util/_transforms.py,sha256=CZe74NOHkHneyo4fHYfFWksCSTn-kXtEyejL9P0_xlA,270
91
+ agents/util/_transforms.py,sha256=9jbF1QGsUTxjxIDAUNg8HJdz7Z7kdo7KQvXNnzuZuiw,682
89
92
  agents/util/_types.py,sha256=8KxYfCw0gYSMWcQmacJoc3Q7Lc46LmT-AWvhF10KJ-E,160
90
93
  agents/voice/__init__.py,sha256=4VWBUjyoXC6dGFuk-oZQGg8T32bFxVwy371c-zDK-EU,1537
91
94
  agents/voice/events.py,sha256=4aPAZC0__ocgmg_mcX4c1zv9Go-YdKIVItQ2kYgtye0,1216
92
95
  agents/voice/exceptions.py,sha256=QcyfvaUTBe4gxbFP82oDSa_puzZ4Z4O4k01B8pAHnK0,233
93
96
  agents/voice/imports.py,sha256=VaE5I8aJTP9Zl_0-y9dx1UcAP7KPRDMaikFK2jFnn8s,348
94
- agents/voice/input.py,sha256=FSbdHMIdLVKX4vYcmf3WBJ5dAlh5zMDjCAuGfXOZTQs,2910
97
+ agents/voice/input.py,sha256=L4uriQOvMt5Sxn88pNrdeOyyA8KWVz2y4fOyvvVjd9s,3011
95
98
  agents/voice/model.py,sha256=LWnIWEwU0-aFkff3kbTKkxejnYqzS2XHG5Qm2YcrzFI,5956
96
99
  agents/voice/pipeline.py,sha256=F_b9QSPVbIJAlxpDoHqSt3mWqRqLnm8Dbfk4H9sJ-3M,6491
97
100
  agents/voice/pipeline_config.py,sha256=_cynbnzxvQijxkGrMYHJzIV54F9bRvDsPV24qexVO8c,1759
@@ -100,9 +103,9 @@ agents/voice/utils.py,sha256=MrRomVqBLXeMAOue-Itwh0Fc5HjB0QCMKXclqFPhrbI,1309
100
103
  agents/voice/workflow.py,sha256=m_-_4qU1gEE5gcGahiE2IrIimmRW2X1rR20zZEGivSc,3795
101
104
  agents/voice/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
105
  agents/voice/models/openai_model_provider.py,sha256=Khn0uT-VhsEbe7_OhBMGFQzXNwL80gcWZyTHl3CaBII,3587
103
- agents/voice/models/openai_stt.py,sha256=LcVDS7f1pmbm--PWX-IaV9uLg9uv5_L3vSCbVnTJeGs,16864
106
+ agents/voice/models/openai_stt.py,sha256=eZ0dmX_uDywpR1H3Q2N5jrV7NK3bR9l2a1InWM3yegk,17151
104
107
  agents/voice/models/openai_tts.py,sha256=4KoLQuFDHKu5a1VTJlu9Nj3MHwMlrn9wfT_liJDJ2dw,1477
105
- openai_agents-0.2.11.dist-info/METADATA,sha256=Uo-6qX652GabhL5x0gMkYNoLCaXx4maS2xfavemZeJ8,12381
106
- openai_agents-0.2.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
107
- openai_agents-0.2.11.dist-info/licenses/LICENSE,sha256=E994EspT7Krhy0qGiES7WYNzBHrh1YDk3r--8d1baRU,1063
108
- openai_agents-0.2.11.dist-info/RECORD,,
108
+ openai_agents-0.3.1.dist-info/METADATA,sha256=zYqBv7N41mdbmfZjhOITtDpyYdHsvwWVzlfsiQ7Zl6A,12462
109
+ openai_agents-0.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
110
+ openai_agents-0.3.1.dist-info/licenses/LICENSE,sha256=E994EspT7Krhy0qGiES7WYNzBHrh1YDk3r--8d1baRU,1063
111
+ openai_agents-0.3.1.dist-info/RECORD,,