Skip to content

Commit b3a8aab

Browse files
docs: Document openai-agents control-flow
1 parent 1eeb5df commit b3a8aab

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

sentry_sdk/integrations/openai_agents/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ def _patch_tools() -> None:
5252

5353

5454
class OpenAIAgentsIntegration(Integration):
55+
"""
56+
Typical interaction with the library:
57+
1. The user creates an Agent instance with configuration, including system instructions sent to every Responses API call.
58+
2. The user passes the agent instance to a Runner, which returns the agent execution response synchronously or asynchronously (the latter is called streaming).
59+
3. In a loop, the agent repeatedly calls the Responses API, maintaining a conversation history that includes previous messages and tool results, which is passed to each call.
60+
61+
Local tools are run based on the return value from the Responses API as a post-API call step in the above loop.
62+
Hosted MCP Tools are run as part of the Responses API call, and involve OpenAI reaching out to an external MCP server.
63+
An agent can handoff to another agent, also directed by the return value of the Responses API and run post-API call in the loop.
64+
Handoffs are a way to switch agent-wide configuration.
65+
"""
66+
5567
identifier = "openai_agents"
5668

5769
@staticmethod

0 commit comments

Comments
 (0)