| Argument | Type | Description | Default | | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | | **agent** | `Agent` | The (initial) agent to be called. | (required) | | **messages** | `List` | A list of message objects, identical to [Chat Completions `messages`](https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages) | (required) | | **context_variables** | `dict` | A dictionary of additional context variables, available to functions and Agent instructions | `{}` | | **max_turns** | `int` | The maximum number of conversational turns allowed | `float("inf")` | | **model_override** | `str` | An optional string to override the model being used by an Agent | `None` | | **execute_tools** | `bool` | If `False`, interrupt execution and immediately returns `tool_calls` message when an Agent tries to call a function | `True` | | **stream** | `bool` | If `True`, enables streaming responses | `False` | | **debug** | `bool` | If `True`, enables debug logging | `False` |