> ## 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 Context Builder Protocol • AI Agent SDK

> TurnContextBuilderProtocol: Protocol for building PreparedTurnContext instances.

# TurnContextBuilderProtocol

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Protocol for building PreparedTurnContext instances.

This protocol defines the interface for context builders that prepare
turn contexts from agent configuration and request parameters.

## Methods

<CardGroup cols={2}>
  <Card title="build_context()" icon="function" href="../functions/TurnContextBuilderProtocol-build_context">
    Build a prepared turn context from agent and request.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/protocols.py#L98">
  `praisonaiagents/runtime/protocols.py` at line 98
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Context Concept" icon="layer-group" href="/docs/docs/concepts/context" />

  <Card title="Context Management" icon="sliders" href="/docs/docs/features/context-management" />

  <Card title="Context Strategies" icon="diagram-project" href="/docs/docs/features/context-strategies" />
</CardGroup>
