openai_agentic_loop

Agentic loop controller for the Responses API pipeline.
On this page

Agentic loop controller for the Responses API pipeline.

Configuration Notes

Manages iteration bookkeeping in on_request_body, extracts tool calls from non-streaming response bodies, and evaluates loop control in on_response_body (end-of-stream), writing filter_results for iterative_request_router transitions.

Also extracts tool_search_call items into ResponsesState.tool_search_calls so openai_mcp_dispatch can load deferred connectors on the next iteration without forwarding those items to the inference backend.

Configuration

FieldTypeRequiredDescription
max_infer_itersintegernoMaximum number of inference loop iterations (Praxis-only, not part of the OpenAI API spec). When the iteration counter reaches this limit, the loop returns a 508 Loop Detected error.

Examples

Example 1

filter: openai_agentic_loop

Example 2

filter: openai_agentic_loop
max_infer_iters: 10