openai-agents 0.0.1__py3-none-any.whl → 0.0.2__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.
- agents/__init__.py +223 -0
- agents/_config.py +23 -0
- agents/_debug.py +17 -0
- agents/_run_impl.py +792 -0
- agents/_utils.py +61 -0
- agents/agent.py +159 -0
- agents/agent_output.py +144 -0
- agents/computer.py +107 -0
- agents/exceptions.py +63 -0
- agents/extensions/handoff_filters.py +67 -0
- agents/extensions/handoff_prompt.py +19 -0
- agents/function_schema.py +340 -0
- agents/guardrail.py +320 -0
- agents/handoffs.py +236 -0
- agents/items.py +246 -0
- agents/lifecycle.py +105 -0
- agents/logger.py +3 -0
- agents/model_settings.py +35 -0
- agents/models/__init__.py +0 -0
- agents/models/_openai_shared.py +34 -0
- agents/models/fake_id.py +5 -0
- agents/models/interface.py +107 -0
- agents/models/openai_chatcompletions.py +952 -0
- agents/models/openai_provider.py +65 -0
- agents/models/openai_responses.py +384 -0
- agents/result.py +220 -0
- agents/run.py +904 -0
- agents/run_context.py +26 -0
- agents/stream_events.py +58 -0
- agents/strict_schema.py +167 -0
- agents/tool.py +286 -0
- agents/tracing/__init__.py +97 -0
- agents/tracing/create.py +306 -0
- agents/tracing/logger.py +3 -0
- agents/tracing/processor_interface.py +69 -0
- agents/tracing/processors.py +261 -0
- agents/tracing/scope.py +45 -0
- agents/tracing/setup.py +211 -0
- agents/tracing/span_data.py +188 -0
- agents/tracing/spans.py +264 -0
- agents/tracing/traces.py +195 -0
- agents/tracing/util.py +17 -0
- agents/usage.py +22 -0
- agents/version.py +7 -0
- openai_agents-0.0.2.dist-info/METADATA +202 -0
- openai_agents-0.0.2.dist-info/RECORD +49 -0
- openai_agents-0.0.2.dist-info/licenses/LICENSE +21 -0
- openai-agents/example.py +0 -2
- openai_agents-0.0.1.dist-info/METADATA +0 -17
- openai_agents-0.0.1.dist-info/RECORD +0 -6
- openai_agents-0.0.1.dist-info/licenses/LICENSE +0 -20
- {openai-agents → agents/extensions}/__init__.py +0 -0
- {openai_agents-0.0.1.dist-info → openai_agents-0.0.2.dist-info}/WHEEL +0 -0
agents/tracing/traces.py
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import abc
|
|
4
|
+
import contextvars
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from . import util
|
|
8
|
+
from .logger import logger
|
|
9
|
+
from .processor_interface import TracingProcessor
|
|
10
|
+
from .scope import Scope
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Trace:
|
|
14
|
+
"""
|
|
15
|
+
A trace is the root level object that tracing creates. It represents a logical "workflow".
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
@abc.abstractmethod
|
|
19
|
+
def __enter__(self) -> Trace:
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
@abc.abstractmethod
|
|
23
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
@abc.abstractmethod
|
|
27
|
+
def start(self, mark_as_current: bool = False):
|
|
28
|
+
"""
|
|
29
|
+
Start the trace.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
mark_as_current: If true, the trace will be marked as the current trace.
|
|
33
|
+
"""
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
@abc.abstractmethod
|
|
37
|
+
def finish(self, reset_current: bool = False):
|
|
38
|
+
"""
|
|
39
|
+
Finish the trace.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
reset_current: If true, the trace will be reset as the current trace.
|
|
43
|
+
"""
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
@abc.abstractmethod
|
|
48
|
+
def trace_id(self) -> str:
|
|
49
|
+
"""
|
|
50
|
+
The trace ID.
|
|
51
|
+
"""
|
|
52
|
+
pass
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
@abc.abstractmethod
|
|
56
|
+
def name(self) -> str:
|
|
57
|
+
"""
|
|
58
|
+
The name of the workflow being traced.
|
|
59
|
+
"""
|
|
60
|
+
pass
|
|
61
|
+
|
|
62
|
+
@abc.abstractmethod
|
|
63
|
+
def export(self) -> dict[str, Any] | None:
|
|
64
|
+
"""
|
|
65
|
+
Export the trace as a dictionary.
|
|
66
|
+
"""
|
|
67
|
+
pass
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class NoOpTrace(Trace):
|
|
71
|
+
"""
|
|
72
|
+
A no-op trace that will not be recorded.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
def __init__(self):
|
|
76
|
+
self._started = False
|
|
77
|
+
self._prev_context_token: contextvars.Token[Trace | None] | None = None
|
|
78
|
+
|
|
79
|
+
def __enter__(self) -> Trace:
|
|
80
|
+
if self._started:
|
|
81
|
+
if not self._prev_context_token:
|
|
82
|
+
logger.error("Trace already started but no context token set")
|
|
83
|
+
return self
|
|
84
|
+
|
|
85
|
+
self._started = True
|
|
86
|
+
self.start(mark_as_current=True)
|
|
87
|
+
|
|
88
|
+
return self
|
|
89
|
+
|
|
90
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
91
|
+
self.finish(reset_current=True)
|
|
92
|
+
|
|
93
|
+
def start(self, mark_as_current: bool = False):
|
|
94
|
+
if mark_as_current:
|
|
95
|
+
self._prev_context_token = Scope.set_current_trace(self)
|
|
96
|
+
|
|
97
|
+
def finish(self, reset_current: bool = False):
|
|
98
|
+
if reset_current and self._prev_context_token is not None:
|
|
99
|
+
Scope.reset_current_trace(self._prev_context_token)
|
|
100
|
+
self._prev_context_token = None
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def trace_id(self) -> str:
|
|
104
|
+
return "no-op"
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def name(self) -> str:
|
|
108
|
+
return "no-op"
|
|
109
|
+
|
|
110
|
+
def export(self) -> dict[str, Any] | None:
|
|
111
|
+
return None
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
NO_OP_TRACE = NoOpTrace()
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class TraceImpl(Trace):
|
|
118
|
+
"""
|
|
119
|
+
A trace that will be recorded by the tracing library.
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
__slots__ = (
|
|
123
|
+
"_name",
|
|
124
|
+
"_trace_id",
|
|
125
|
+
"group_id",
|
|
126
|
+
"metadata",
|
|
127
|
+
"_prev_context_token",
|
|
128
|
+
"_processor",
|
|
129
|
+
"_started",
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
def __init__(
|
|
133
|
+
self,
|
|
134
|
+
name: str,
|
|
135
|
+
trace_id: str | None,
|
|
136
|
+
group_id: str | None,
|
|
137
|
+
metadata: dict[str, Any] | None,
|
|
138
|
+
processor: TracingProcessor,
|
|
139
|
+
):
|
|
140
|
+
self._name = name
|
|
141
|
+
self._trace_id = trace_id or util.gen_trace_id()
|
|
142
|
+
self.group_id = group_id
|
|
143
|
+
self.metadata = metadata
|
|
144
|
+
self._prev_context_token: contextvars.Token[Trace | None] | None = None
|
|
145
|
+
self._processor = processor
|
|
146
|
+
self._started = False
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
def trace_id(self) -> str:
|
|
150
|
+
return self._trace_id
|
|
151
|
+
|
|
152
|
+
@property
|
|
153
|
+
def name(self) -> str:
|
|
154
|
+
return self._name
|
|
155
|
+
|
|
156
|
+
def start(self, mark_as_current: bool = False):
|
|
157
|
+
if self._started:
|
|
158
|
+
return
|
|
159
|
+
|
|
160
|
+
self._started = True
|
|
161
|
+
self._processor.on_trace_start(self)
|
|
162
|
+
|
|
163
|
+
if mark_as_current:
|
|
164
|
+
self._prev_context_token = Scope.set_current_trace(self)
|
|
165
|
+
|
|
166
|
+
def finish(self, reset_current: bool = False):
|
|
167
|
+
if not self._started:
|
|
168
|
+
return
|
|
169
|
+
|
|
170
|
+
self._processor.on_trace_end(self)
|
|
171
|
+
|
|
172
|
+
if reset_current and self._prev_context_token is not None:
|
|
173
|
+
Scope.reset_current_trace(self._prev_context_token)
|
|
174
|
+
self._prev_context_token = None
|
|
175
|
+
|
|
176
|
+
def __enter__(self) -> Trace:
|
|
177
|
+
if self._started:
|
|
178
|
+
if not self._prev_context_token:
|
|
179
|
+
logger.error("Trace already started but no context token set")
|
|
180
|
+
return self
|
|
181
|
+
|
|
182
|
+
self.start(mark_as_current=True)
|
|
183
|
+
return self
|
|
184
|
+
|
|
185
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
186
|
+
self.finish(reset_current=exc_type is not GeneratorExit)
|
|
187
|
+
|
|
188
|
+
def export(self) -> dict[str, Any] | None:
|
|
189
|
+
return {
|
|
190
|
+
"object": "trace",
|
|
191
|
+
"id": self.trace_id,
|
|
192
|
+
"workflow_name": self.name,
|
|
193
|
+
"group_id": self.group_id,
|
|
194
|
+
"metadata": self.metadata,
|
|
195
|
+
}
|
agents/tracing/util.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import uuid
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def time_iso() -> str:
|
|
6
|
+
"""Returns the current time in ISO 8601 format."""
|
|
7
|
+
return datetime.now(timezone.utc).isoformat()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def gen_trace_id() -> str:
|
|
11
|
+
"""Generates a new trace ID."""
|
|
12
|
+
return f"trace_{uuid.uuid4().hex}"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def gen_span_id() -> str:
|
|
16
|
+
"""Generates a new span ID."""
|
|
17
|
+
return f"span_{uuid.uuid4().hex[:24]}"
|
agents/usage.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@dataclass
|
|
5
|
+
class Usage:
|
|
6
|
+
requests: int = 0
|
|
7
|
+
"""Total requests made to the LLM API."""
|
|
8
|
+
|
|
9
|
+
input_tokens: int = 0
|
|
10
|
+
"""Total input tokens sent, across all requests."""
|
|
11
|
+
|
|
12
|
+
output_tokens: int = 0
|
|
13
|
+
"""Total output tokens received, across all requests."""
|
|
14
|
+
|
|
15
|
+
total_tokens: int = 0
|
|
16
|
+
"""Total tokens sent and received, across all requests."""
|
|
17
|
+
|
|
18
|
+
def add(self, other: "Usage") -> None:
|
|
19
|
+
self.requests += other.requests if other.requests else 0
|
|
20
|
+
self.input_tokens += other.input_tokens if other.input_tokens else 0
|
|
21
|
+
self.output_tokens += other.output_tokens if other.output_tokens else 0
|
|
22
|
+
self.total_tokens += other.total_tokens if other.total_tokens else 0
|
agents/version.py
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openai-agents
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: OpenAI Agents SDK
|
|
5
|
+
Project-URL: Homepage, https://github.com/openai/openai-agents-python
|
|
6
|
+
Project-URL: Repository, https://github.com/openai/openai-agents-python
|
|
7
|
+
Author-email: OpenAI <support@openai.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
Requires-Dist: griffe<2,>=1.5.6
|
|
22
|
+
Requires-Dist: openai>=1.66.0
|
|
23
|
+
Requires-Dist: pydantic<3,>=2.10
|
|
24
|
+
Requires-Dist: requests<3,>=2.0
|
|
25
|
+
Requires-Dist: types-requests<3,>=2.0
|
|
26
|
+
Requires-Dist: typing-extensions<5,>=4.12.2
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# OpenAI Agents SDK
|
|
30
|
+
|
|
31
|
+
The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.
|
|
32
|
+
|
|
33
|
+
<img src="docs/assets/images/orchestration.png" alt="Image of the Agents Tracing UI" style="max-height: 803px;">
|
|
34
|
+
|
|
35
|
+
### Core concepts:
|
|
36
|
+
|
|
37
|
+
1. [**Agents**](docs/agents.md): LLMs configured with instructions, tools, guardrails, and handoffs
|
|
38
|
+
2. [**Handoffs**](docs/handoffs.md): Allow agents to transfer control to other agents for specific tasks
|
|
39
|
+
3. [**Guardrails**](docs/guardrails.md): Configurable safety checks for input and output validation
|
|
40
|
+
4. [**Tracing**](docs/tracing.md): Built-in tracking of agent runs, allowing you to view, debug and optimize your workflows
|
|
41
|
+
|
|
42
|
+
Explore the [examples](examples) directory to see the SDK in action.
|
|
43
|
+
|
|
44
|
+
## Get started
|
|
45
|
+
|
|
46
|
+
1. Set up your Python environment
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
python -m venv env
|
|
50
|
+
source env/bin/activate
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
2. Install Agents SDK
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
pip install openai-agents
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Hello world example
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from agents import Agent, Runner
|
|
63
|
+
|
|
64
|
+
agent = Agent(name="Assistant", instructions="You are a helpful assistant")
|
|
65
|
+
|
|
66
|
+
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
|
|
67
|
+
print(result.final_output)
|
|
68
|
+
|
|
69
|
+
# Code within the code,
|
|
70
|
+
# Functions calling themselves,
|
|
71
|
+
# Infinite loop's dance.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
(_If running this, ensure you set the `OPENAI_API_KEY` environment variable_)
|
|
75
|
+
|
|
76
|
+
## Handoffs example
|
|
77
|
+
|
|
78
|
+
```py
|
|
79
|
+
from agents import Agent, Runner
|
|
80
|
+
import asyncio
|
|
81
|
+
|
|
82
|
+
spanish_agent = Agent(
|
|
83
|
+
name="Spanish agent",
|
|
84
|
+
instructions="You only speak Spanish.",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
english_agent = Agent(
|
|
88
|
+
name="English agent",
|
|
89
|
+
instructions="You only speak English",
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
triage_agent = Agent(
|
|
93
|
+
name="Triage agent",
|
|
94
|
+
instructions="Handoff to the appropriate agent based on the language of the request.",
|
|
95
|
+
handoffs=[spanish_agent, english_agent],
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
async def main():
|
|
100
|
+
result = await Runner.run(triage_agent, input="Hola, ¿cómo estás?")
|
|
101
|
+
print(result.final_output)
|
|
102
|
+
# ¡Hola! Estoy bien, gracias por preguntar. ¿Y tú, cómo estás?
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
if __name__ == "__main__":
|
|
106
|
+
asyncio.run(main())
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Functions example
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
import asyncio
|
|
113
|
+
|
|
114
|
+
from agents import Agent, Runner, function_tool
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@function_tool
|
|
118
|
+
def get_weather(city: str) -> str:
|
|
119
|
+
return f"The weather in {city} is sunny."
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
agent = Agent(
|
|
123
|
+
name="Hello world",
|
|
124
|
+
instructions="You are a helpful agent.",
|
|
125
|
+
tools=[get_weather],
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
async def main():
|
|
130
|
+
result = await Runner.run(agent, input="What's the weather in Tokyo?")
|
|
131
|
+
print(result.final_output)
|
|
132
|
+
# The weather in Tokyo is sunny.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
if __name__ == "__main__":
|
|
136
|
+
asyncio.run(main())
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## The agent loop
|
|
140
|
+
|
|
141
|
+
When you call `Runner.run()`, we run a loop until we get a final output.
|
|
142
|
+
|
|
143
|
+
1. We call the LLM, using the model and settings on the agent, and the message history.
|
|
144
|
+
2. The LLM returns a response, which may include tool calls.
|
|
145
|
+
3. If the response has a final output (see below for the more on this), we return it and end the loop.
|
|
146
|
+
4. If the response has a handoff, we set the agent to the new agent and go back to step 1.
|
|
147
|
+
5. We process the tool calls (if any) and append the tool responses messsages. Then we go to step 1.
|
|
148
|
+
|
|
149
|
+
There is a `max_turns` parameter that you can use to limit the number of times the loop executes.
|
|
150
|
+
|
|
151
|
+
### Final output
|
|
152
|
+
|
|
153
|
+
Final output is the last thing the agent produces in the loop.
|
|
154
|
+
|
|
155
|
+
1. If you set an `output_type` on the agent, the final output is when the LLM returns something of that type. We use [structured outputs](https://platform.openai.com/docs/guides/structured-outputs) for this.
|
|
156
|
+
2. If there's no `output_type` (i.e. plain text responses), then the first LLM response without any tool calls or handoffs is considered as the final output.
|
|
157
|
+
|
|
158
|
+
As a result, the mental model for the agent loop is:
|
|
159
|
+
|
|
160
|
+
1. If the current agent has an `output_type`, the loop runs until the agent produces structured output matching that type.
|
|
161
|
+
2. If the current agent does not have an `output_type`, the loop runs until the current agent produces a message without any tool calls/handoffs.
|
|
162
|
+
|
|
163
|
+
## Common agent patterns
|
|
164
|
+
|
|
165
|
+
The Agents SDK is designed to be highly flexible, allowing you to model a wide range of LLM workflows including deterministic flows, iterative loops, and more. See examples in [`examples/agent_patterns`](examples/agent_patterns).
|
|
166
|
+
|
|
167
|
+
## Tracing
|
|
168
|
+
|
|
169
|
+
The Agents SDK includes built-in tracing, making it easy to track and debug the behavior of your agents. Tracing is extensible by design, supporting custom spans and a wide variety of external destinations, including [Logfire](https://logfire.pydantic.dev/docs/integrations/llms/openai/#openai-agents), [AgentOps](https://docs.agentops.ai/v1/integrations/agentssdk), and [Braintrust](https://braintrust.dev/docs/guides/traces/integrations#openai-agents-sdk). See [Tracing](http://openai.github.io/openai-agents-python/tracing.md) for more details.
|
|
170
|
+
|
|
171
|
+
## Development (only needed if you need to edit the SDK/examples)
|
|
172
|
+
|
|
173
|
+
0. Ensure you have [`uv`](https://docs.astral.sh/uv/) installed.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
uv --version
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
1. Install dependencies
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
make sync
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
2. (After making changes) lint/test
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
make tests # run tests
|
|
189
|
+
make mypy # run typechecker
|
|
190
|
+
make lint # run linter
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Acknowledgements
|
|
194
|
+
|
|
195
|
+
We'd like to acknowledge the excellent work of the open-source community, especially:
|
|
196
|
+
|
|
197
|
+
- [Pydantic](https://docs.pydantic.dev/latest/) (data validation) and [PydanticAI](https://ai.pydantic.dev/) (advanced agent framework)
|
|
198
|
+
- [MkDocs](https://github.com/squidfunk/mkdocs-material)
|
|
199
|
+
- [Griffe](https://github.com/mkdocstrings/griffe)
|
|
200
|
+
- [uv](https://github.com/astral-sh/uv) and [ruff](https://github.com/astral-sh/ruff)
|
|
201
|
+
|
|
202
|
+
We're committed to continuing to build the Agents SDK as an open source framework so others in the community can expand on our approach.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
agents/__init__.py,sha256=Qd1eatUlALblGTqHV4o5jL-h65furZ-s0IK8RFNRGWY,5879
|
|
2
|
+
agents/_config.py,sha256=5qrDSZuguiL0gCTd_6f9J6ulpsRySueZ3re4lyd4PU0,743
|
|
3
|
+
agents/_debug.py,sha256=7OKys2lDjeCtGggTkM53m_8vw0WIr3yt-_JPBDAnsw0,608
|
|
4
|
+
agents/_run_impl.py,sha256=v9mMCT_v0pwGnPW-fydzHpdu1gI9pROC7Wvhe50IVrw,28522
|
|
5
|
+
agents/_utils.py,sha256=L21Hdl20U66Asp-W61yTnahmo8b6X58jsgdUBWb9_Rk,1685
|
|
6
|
+
agents/agent.py,sha256=Y0lnIva9qL_WJVUVxDQtSrMa0KuM5IXLWK0q6CzIxas,6297
|
|
7
|
+
agents/agent_output.py,sha256=xk17hMtFQSviQNydzt70ENvsPDTWgZazv1NhswC16e4,5345
|
|
8
|
+
agents/computer.py,sha256=XD44UgiUWSfniv-xKwwDP6wFKVwBiZkpaL1hO-0-7ZA,2516
|
|
9
|
+
agents/exceptions.py,sha256=F3AltRt27PGdhbFqKBhRJL9eHqoN4SQx7oxBn0GWmhs,1856
|
|
10
|
+
agents/function_schema.py,sha256=OgeuiDhLowhYt6T9CU-7Fk05uKIxPaDPgL2hdnMFjpQ,12666
|
|
11
|
+
agents/guardrail.py,sha256=3A355heAUkaGBmyKArq-3XVFunydlAZKkFRo8mHuH5w,9290
|
|
12
|
+
agents/handoffs.py,sha256=onlvwSCTNJKof2Ftk-qZ5-zxTNT9AimjvyOcxj4Rp38,8999
|
|
13
|
+
agents/items.py,sha256=kvhgsyKyIxkycUw33fKKX17SAQyIo4jGwyFLqgroB7I,8030
|
|
14
|
+
agents/lifecycle.py,sha256=wYFG6PLSKQ7bICKVbB8oGtdoJNINGq9obh2RSKlAkDE,2938
|
|
15
|
+
agents/logger.py,sha256=p_ef7vWKpBev5FFybPJjhrCCQizK08Yy1A2EDO1SNNg,60
|
|
16
|
+
agents/model_settings.py,sha256=lKYXNS6M6R7Ybku7o3sAfeyasXOctwHVRk3joYGe7Nk,1425
|
|
17
|
+
agents/result.py,sha256=vBLf6wUMIeCVcLKoaXLtxXZzmqK2QYRoba76uRCjAcs,8276
|
|
18
|
+
agents/run.py,sha256=GLPPfHH7MswO_5oW27y7RsZVY5rbkvyCBxG4kbN5y-Q,37064
|
|
19
|
+
agents/run_context.py,sha256=vuSUQM8O4CLensQY27-22fOqECnw7yvwL9U3WO8b_bk,851
|
|
20
|
+
agents/stream_events.py,sha256=ULgBEcL_H4vklZoxhpY2yomeoxVF0UiXvswsFsjFv4s,1547
|
|
21
|
+
agents/strict_schema.py,sha256=FEyEvF3ZjxIHRLmraBGZyjJjuFiPCZGaCFV22LlwaTQ,5783
|
|
22
|
+
agents/tool.py,sha256=I6MD3H3wB9ka9FUOg6hlx9Swe9fceSnbH2BPMmNYXl0,10629
|
|
23
|
+
agents/usage.py,sha256=-MZOmSDVdWxA2V_yVVnmUcwVcLdvYFccv0HXZ7Ow3_A,733
|
|
24
|
+
agents/version.py,sha256=bkeg2DaYBS8OnV7R7J6OuF5pNA__0mJ4QZsJjC1DTI0,223
|
|
25
|
+
agents/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
agents/extensions/handoff_filters.py,sha256=2cXxu1JROez96CpTiGuT9PIuaIrIE8ksP01fX83krKM,1977
|
|
27
|
+
agents/extensions/handoff_prompt.py,sha256=oGWN0uNh3Z1L7E-Ev2up8W084fFrDNOsLDy7P6bcmic,1006
|
|
28
|
+
agents/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
+
agents/models/_openai_shared.py,sha256=4Ngwo2Fv2RXY61Pqck1cYPkSln2tDnb8Ai-ao4QG-iE,836
|
|
30
|
+
agents/models/fake_id.py,sha256=lbXjUUSMeAQ8eFx4V5QLUnBClHE6adJlYYav55RlG5w,268
|
|
31
|
+
agents/models/interface.py,sha256=dgIlKyPaCbNRTHXxd6x7OQwJuAelG3F-C19P-aacHWQ,3129
|
|
32
|
+
agents/models/openai_chatcompletions.py,sha256=pVAS0WnXhCUR1XK90KCDf985TaiWEkfkjgvdiOHamxU,37880
|
|
33
|
+
agents/models/openai_provider.py,sha256=0F_tiftdpTx3mDj0fWzthjw8ZC91HAs1kHQs5oEYnDE,2295
|
|
34
|
+
agents/models/openai_responses.py,sha256=PuUSByOvq7eeNLC3OWH8JUcvy8icy9ROxxv2O2-rGBQ,13167
|
|
35
|
+
agents/tracing/__init__.py,sha256=pp2_mBCQGL9oN6_czCWHQsV4ZTEOcy1AVxdjQ41PNr0,2424
|
|
36
|
+
agents/tracing/create.py,sha256=PAhfJKAeJ8jbZvxylTiikU_LqAhezYHphR4jG5EdaAE,12110
|
|
37
|
+
agents/tracing/logger.py,sha256=J4KUDRSGa7x5UVfUwWe-gbKwoaq8AeETRqkPt3QvtGg,68
|
|
38
|
+
agents/tracing/processor_interface.py,sha256=wNyZCwNJko5CrUIWD_lMou5ppQ67CFYwvWRsJRM3up8,1659
|
|
39
|
+
agents/tracing/processors.py,sha256=iGtVJMmOZZqpNBr9S7Xbp-rvu7A92DKYOkXwExgkwEE,9706
|
|
40
|
+
agents/tracing/scope.py,sha256=x1m-aYilS1DeeV4L7Ckv55LVWod7c_nnTKoCGhJCumk,1372
|
|
41
|
+
agents/tracing/setup.py,sha256=P5JaIcHej6m62rb27bSutN2Bqv0XSD9Z_Ki7ynCVdbs,6728
|
|
42
|
+
agents/tracing/span_data.py,sha256=UQUPpMQ7Z1XOqKFJNHUxAJUVPwa6JMfGa7dm_NovuhQ,4574
|
|
43
|
+
agents/tracing/spans.py,sha256=KWCqcRwUlt85NCZPQp98UIF5vAQAVWuVWQh3tgPK0WE,6605
|
|
44
|
+
agents/tracing/traces.py,sha256=GL9EoEQKVk7eo0BcfRfQ6C7tdzlmPhkneQn4fdsCdqA,4774
|
|
45
|
+
agents/tracing/util.py,sha256=BsDvn2rjE4SRQvfm55utljT8agdA0Z36KWXd1vdx4hs,392
|
|
46
|
+
openai_agents-0.0.2.dist-info/METADATA,sha256=4usCZcGhHblA5qcC2MwN4ybHHdvfuC2wzqqos5xFBVo,6797
|
|
47
|
+
openai_agents-0.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
48
|
+
openai_agents-0.0.2.dist-info/licenses/LICENSE,sha256=E994EspT7Krhy0qGiES7WYNzBHrh1YDk3r--8d1baRU,1063
|
|
49
|
+
openai_agents-0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OpenAI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
openai-agents/example.py
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: openai-agents
|
|
3
|
-
Version: 0.0.1
|
|
4
|
-
Summary: Loading...
|
|
5
|
-
Project-URL: Homepage, https://github.com/openai/openai-python
|
|
6
|
-
Project-URL: Issues, https://github.com/openai/openai-python/issues
|
|
7
|
-
Author-email: Kevin Whinnery <kwhinnery@openai.com>
|
|
8
|
-
License-Expression: MIT
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Requires-Python: >=3.8
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
|
|
15
|
-
# Placeholder
|
|
16
|
-
|
|
17
|
-
Loading...
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
openai-agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
openai-agents/example.py,sha256=jQxgMu2wujV5-EV7SIHDYnIfEhmJAzxyn2XKqYliCB0,43
|
|
3
|
-
openai_agents-0.0.1.dist-info/METADATA,sha256=y6c1UnNb1SAidh-8ddENunKq7yMrPVFNpk1SLbngyFs,491
|
|
4
|
-
openai_agents-0.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
-
openai_agents-0.0.1.dist-info/licenses/LICENSE,sha256=7moMRMcANjVm7HlKs31_qzF5wrZ5cPo8kEHa_X9IyUA,1063
|
|
6
|
-
openai_agents-0.0.1.dist-info/RECORD,,
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 OpenAI
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
File without changes
|
|
File without changes
|