Build Context • AI Agent SDK
build_context: Build a prepared turn context from agent and request.
build_context
Method
</div>
This is a method of the TurnContextBuilderProtocol class in the protocols module.
Build a prepared turn context from agent and request.
Signature
def build_context(agent: AgentProtocol, prompt: str) -> PreparedTurnContextParameters
ParamField
AgentProtocolThe agent instance
ParamField
strThe user prompt for this turn **kwargs: Additional request parameters
Returns
ResponseField
PreparedTurnContextA prepared turn context ready for execution
Source
View on GitHubpraisonaiagents/runtime/protocols.py at line 106