Skip to content

Add simplified run() API for OpenAI Agents SDK integration#153

Closed
danielmillerp wants to merge 1 commit into
mainfrom
dm/simplify-open-ai-agents-sdk
Closed

Add simplified run() API for OpenAI Agents SDK integration#153
danielmillerp wants to merge 1 commit into
mainfrom
dm/simplify-open-ai-agents-sdk

Conversation

@danielmillerp
Copy link
Copy Markdown
Contributor

  • New run() method accepts standard Agent objects from OpenAI SDK
  • Automatically converts ModelSettings and FunctionTool to serializable format
  • Provides clean DX matching OpenAI Agents SDK with just task_id param
  • Works in Temporal workflows, sync agents (FastACP), and standalone scripts

Example usage:
from agents import Agent, function_tool, ModelSettings

@function_tool
def my_tool(param: str) -> str:
    return f"Result: {param}"

agent = Agent(
    name="My Agent",
    instructions="Help users",
    model="gpt-4o",
    model_settings=ModelSettings(parallel_tool_calls=True),
    tools=[my_tool]
)

result = await adk.providers.openai.run(
    agent=agent,
    input="Hello",
    task_id=task_id
)

- New run() method accepts standard Agent objects from OpenAI SDK
- Automatically converts ModelSettings and FunctionTool to serializable format
- Provides clean DX matching OpenAI Agents SDK with just task_id param
- Works in Temporal workflows, sync agents (FastACP), and standalone scripts

Example usage:
    from agents import Agent, function_tool, ModelSettings

    @function_tool
    def my_tool(param: str) -> str:
        return f"Result: {param}"

    agent = Agent(
        name="My Agent",
        instructions="Help users",
        model="gpt-4o",
        model_settings=ModelSettings(parallel_tool_calls=True),
        tools=[my_tool]
    )

    result = await adk.providers.openai.run(
        agent=agent,
        input="Hello",
        task_id=task_id
    )
@danielmillerp danielmillerp force-pushed the dm/simplify-open-ai-agents-sdk branch from 4e84762 to 5e4a37b Compare October 16, 2025 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant