Turn Context • AI Agent SDK

Turn Context and Runtime Protocol for PraisonAI Agents.

turn_context

AI Agent

Turn Context and Runtime Protocol for PraisonAI Agents.

This module defines the PreparedTurnContext dataclass and TurnRuntimeProtocol that standardize runtime preparation across different execution paths in the PraisonAI agent framework.

Design Goals:

  • Single immutable plan object passed into runtime run_turn
  • Standardize tool assembly, transcript building, and delivery channels
  • Eliminate duplication between native loop and plugin harnesses
  • Enable consistent metrics and tracing across harness types
  • Multi-agent safe: context is per-turn, not stored on shared agent globals

Import

python
from praisonaiagents.runtime import turn_context

Classes

Functions


Related Documentation