> ## 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.

# Turn Runtime Protocol • AI Agent SDK

> TurnRuntimeProtocol: Protocol for turn-based runtime execution.

# TurnRuntimeProtocol

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

AI Agent

Protocol for turn-based runtime execution.

This protocol defines the interface that runtimes must implement to
execute prepared turn contexts. It standardizes the execution contract
across different runtime types (native, plugin, managed, etc.).

## Methods

> [card] [run\_turn()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TurnRuntimeProtocol-run_turn.md)
>
> Execute a single turn using the prepared context.

> [card] [supports\_runtime\_mode()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TurnRuntimeProtocol-supports_runtime_mode.md)
>
> Check if this runtime supports the given execution mode.

> [card] [get\_supported\_modes()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TurnRuntimeProtocol-get_supported_modes.md)
>
> Get all runtime modes supported by this implementation.

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
class MyRuntime:
        async def run_turn(self, context: PreparedTurnContext) -> str:
            # Execute the turn using the prepared context
            return "response"
    
    # Use with prepared context
    context = PreparedTurnContext(...)
    runtime = MyRuntime()
    result = await runtime.run_turn(context)
```

## Source

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


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