Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openai/openai-agents-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: openai/openai-agents-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 9 commits
  • 17 files changed
  • 9 contributors

Commits on Jul 8, 2025

  1. docs: mention 'name' is required in Agent constructor . fix: mention …

    …'name' as required in Agent init doc (#1033)
    
    ## What
    
    Updated the docs under `docs/agents.md` to clarify that the `name`
    argument is required when initializing an `Agent`.
    
    ## Why
    
    Without this clarification, users get a confusing error:
    `TypeError: Agent.__init__() missing 1 required positional argument:
    'name'`
    
    This matches the actual constructor in the source code and helps future
    devs avoid frustration.
    
    ## Reference
    
    - Source:
    [`agent.py`](https://github.com/openai/openai-agents-python/blob/main/src/agents/agent.py)
    maneeshanif authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    586d4b2 View commit details
    Browse the repository at this point in the history
  2. Fix agent lifecycle example output to reflect correct hook execution …

    …order (#1015)
    
    **Problem:**
    The expected output in the agent lifecycle example incorrectly shows
    agent start hooks (`on_start`) running after tool execution and multiple
    times for the same agent. This misleads developers about when these
    lifecycle events actually occur.
    
    **Solution:**
    Updated the expected output to accurately reflect the OpenAI Agents
    framework behavior:
    - Agent start hooks run immediately when an agent begins execution
    - Start hooks only run once per agent activation, controlled by the
    `should_run_agent_start_hooks` flag
    - After handoffs, the new agent's start hook runs as the first event
    DanielHashmi authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    f09874c View commit details
    Browse the repository at this point in the history
  3. Support mcp prompts (#1010)

    ### Summary
    
    Add MCP prompt support to enable user-controlled agent instruction
    generation. This enhancement allows MCP servers to provide prompts that
    can be used to dynamically generate agent instructions, enabling more
    flexible and user-controlled agent behavior.
    
    **Key changes:**
    - Added abstract `list_prompts()` and `get_prompt()` methods to base
    `MCPServer` class
    - Implemented prompt support in `MCPServerStdio` and
    `MCPServerStreamableHttp` classes
    - Added comprehensive test suite for prompt functionality
    - Created example MCP prompt server with working demonstration
    - Updated documentation with prompt usage examples
    
    **Note:** This PR implements MCP prompt support only. Resource support
    is not included in this implementation.
    
    ### Test plan
    
    - **Unit tests**: Added 11 comprehensive tests in
    `tests/mcp/test_prompt_server.py` covering:
      - Prompt listing and retrieval
      - Argument formatting and validation
      - Agent integration with prompt-generated instructions
      - Streaming and non-streaming scenarios
      - Error handling for missing prompts
    - **Integration tests**: Updated existing MCP test suite to handle new
    abstract methods
    - **Example verification**: Created working example with MCP prompt
    server and client
    - **All tests pass**: 450/450 tests passing after adding optional
    dependencies
    
    ### Issue number
    
    Partially addresses #544 (prompts only, resources not implemented)
    
    ### Checks
    
    - [x] I've added new tests (if relevant)
    - [x] I've added/updated the relevant documentation
    - [x] I've run `make lint` and `make format`
    - [x] I've made sure tests pass
    
    ---------
    
    Co-authored-by: thein <thein@MacBook-Pro.local>
    thoo and thein authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    d1d2ecc View commit details
    Browse the repository at this point in the history
  4. Add on_start support to VoiceWorkflowBase and VoicePipeline (#922)

    I added an optional `on_start()` method to `VoiceWorkflowBase`, allowing
    voice workflows to emit an initial TTS message before any user input.
    This aligns with the usage pattern suggested in #488
    
    The `VoicePipeline._run_multi_turn()` method was updated to call this
    hook and stream any yielded messages via TTS before transcription
    begins. No changes are required to existing workflows, as the method
    defaults to returning an empty `AsyncIterator[str]`.
    
    Resolves #488 and thus improves UX for voice agents that need to greet
    or instruct users proactively. All tests pass under Python 3.12. Let me
    know if you'd like an example workflow or docs added in a follow-up!
    vrtnis authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    e5ba91b View commit details
    Browse the repository at this point in the history
  5. Add Makefile check rule to run all the linters and checkers (#1038)

    It adds a Makefile rule `check` to run all linters and checkers in a
    single command.
    
    With only `make check` instead of 3-4 commands, it can help to forget
    one of them before pushing a PR.
    ant31 authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    6358cd9 View commit details
    Browse the repository at this point in the history
  6. Support for file_input content (#fix 893) (#1009)

    PDF and file upload are supported by litellm and various models. 
    
    This PR enables them. 
    
    fixes #893
    ant31 authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    1720e4a View commit details
    Browse the repository at this point in the history
  7. description_override is not properly used for function_schema.descrip…

    …tion (#1000)
    
    Describe the bug
    A clear and concise description of what the bug is.
    
    In the function_schema method of the OpenAI Agents SDK, the following
    line:
    
    ```python
    description=description_override or doc_info.description if doc_info else None
    ```
    
    does not honor description_override when `use_docstring_info=False`.
    This happens because of operator precedence in Python. Without
    parentheses, the expression is interpreted as:
    
    ```python
    description=(description_override or doc_info.description) if doc_info else None
    ```
    So when doc_info is None, even if description_override is set, it falls
    back to None
    
    Debug information
    Python version (e.g. Python 3.10)
    Repro steps
    
    ```python
    from agents.function_schema import function_schema
    
    def my_func():
        pass
    
    schema = function_schema(
        my_func,
        description_override ="CustomDescription",
        use_docstring_info=False
    )
    
    print(schema.description) # Expected: "CustomDescription", Actual: None
    ```
    Expected behavior
    
    Even when use_docstring_info=False, if description_override is provided,
    it should be used for description.
    
    Suggested Fix:
    Update this line:
    description=description_override or doc_info.description if doc_info
    else None
    To this (with parentheses to enforce correct evaluation):
    description=description_override or (doc_info.description if doc_info
    else None)
    HafizFasih authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    e251fa6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c92fe77 View commit details
    Browse the repository at this point in the history
  9. Fix #976 MCP filtering, make agent and run ctx optional (#977)

    This is a patch to address the most pressing issue of #976 while we
    discuss whether or not these parameters should exist in `list_tools` or
    should be migrated elsewhere.
    
    Resolves #976
    njbrake authored Jul 8, 2025
    Configuration menu
    Copy the full SHA
    db85a6d View commit details
    Browse the repository at this point in the history
Loading