-
Notifications
You must be signed in to change notification settings - Fork 84
feat(docs): add docs about openai agents with temporal #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be some pretty fundamental misunderstandings of how the integration works. We should also check with the documentation team. I'm not sure this is where we would want information like this to live.
docs/openai_agents/ARCHITECTURE.md
Outdated
participant T as Tools | ||
|
||
C->>W: Start Workflow | ||
W->>A: Create Activity (implicit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't accurate. The agent isn't initialized in the activity, and the tool (also handoff, etc) processing doesn't happen in the activity either. The activity is actually a Model
invocation. One request response pair from the underlying model implementation. (OpenAI, litellm)
docs/openai_agents/ARCHITECTURE.md
Outdated
## 🔄 **Core Integration Mechanism** | ||
|
||
### **Implicit Activity Creation** | ||
The integration's key innovation is automatic Temporal Activity creation for every agent invocation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Model, not agent invocation. I know the terminology isn't very universal, but in the Agents SDK, it is a model and not an Agent.
|
||
```python | ||
# What you write | ||
result = await Runner.run(agent, input="Hello") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be mentioned that these comments are only accurate in the context of a workflow with the Plugin registered, otherwise none of that happens at all.
C[Client Application] | ||
end | ||
|
||
subgraph "Temporal Layer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this diagram is misleading. It is not the case that there is a simple nesting of OpenAI concepts inside an implicit activity. Really the Runner + Agent are embedded in a workflow, and the model invocations are in the implicit activity.
What was changed
This PR adds comprehensive documentation for the OpenAI Agents SDK integration with Temporal, providing developers with detailed implementation guides, architectural patterns, and best practices for building AI agent workflows.
New Documentation Structure
docs/openai_agents/README.md
- High-level overview and architecture guidedocs/openai_agents/BASIC.md
- Fundamental agent patterns and tool integrationdocs/openai_agents/AGENT_PATTERNS.md
- Advanced multi-agent architectures and coordinationdocs/openai_agents/TOOLS.md
- Comprehensive tool usage (code interpreter, file search, image generation)docs/openai_agents/HANDOFFS.md
- Agent collaboration and message filtering patternsdocs/openai_agents/HOSTED_MCP.md
- Model Context Protocol integrationdocs/openai_agents/MODEL_PROVIDERS.md
- Custom LLM provider integration (LiteLLM, Ollama, GPT-OSS)docs/openai_agents/REASONING_CONTENT.md
- Accessing model reasoning and thought processesdocs/openai_agents/CUSTOMER_SERVICE.md
- Conversational workflows with escalation capabilitiesdocs/openai_agents/FINANCIAL_RESEARCH_AGENT.md
- Complex multi-agent financial analysis systemdocs/openai_agents/RESEARCH_BOT.md
- Multi-agent research system with planning, search, and synthesisDocumentation Features
Why?
The OpenAI Agents SDK integration with Temporal represents a powerful combination of AI capabilities and durable execution, but developers need comprehensive guidance to leverage this integration effectively. This documentation addresses several critical needs:
Developer Experience
Production Readiness
Ecosystem Growth
Integration Value
Checklist
Closes
How was this tested:
Any docs updates needed?
openai_agents/README.md
has been updated to serve as a high-level overviewdocs/openai_agents/
docs.temporal.io
to reference this new documentation suiteDocumentation Impact
This PR significantly enhances the Temporal repository's documentation by providing: