> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# In Process Turn Executor • AI Agent SDK

> InProcessTurnExecutor: Default turn executor — today's on-loop behaviour, no isolation.

# InProcessTurnExecutor

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

Default turn executor — today's on-loop behaviour, no isolation.

Zero-cost, dependency-free implementation of
:class:`TurnExecutorProtocol` for single-process deployments. It runs each
turn directly on the current event loop exactly as the gateway does today,
so selecting it (or leaving the executor unset) is byte-for-byte backward
compatible and introduces no dependency. It provides **no** blast-radius
isolation: a turn that wedges the loop still affects the process — choosing
an isolated executor (subprocess / container / remote, in the wrapper) is
what contains a bad turn to its own worker.

All turns share one worker (the current process/loop), so every placement
carries the same constant `worker_id` at `epoch` 0, and `teardown`
is inert — an in-process turn is cancelled through the existing
`cancel_token` when the holding task exits, so there is no worker to
reclaim. The `limits` argument is accepted for protocol symmetry but is
inert here (no separate worker to bound).

## Methods

> [card] [place()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/InProcessTurnExecutor-place.md)
>
> Instance method.

> [card] [execute\_turn()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/InProcessTurnExecutor-execute_turn.md)
>
> Instance method.

> [card] [teardown()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/InProcessTurnExecutor-teardown.md)
>
> Instance method.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L7619)
>
> `praisonaiagents/gateway/protocols.py` at line 7619


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.