Create Context Agent • AI Agent SDK
create_context_agent: Factory function to create a ContextAgent following Context Engineering and PRD methodology.
create_context_agent
Function
</div>
This function is defined in the context_agent module.
Factory function to create a ContextAgent following Context Engineering and PRD methodology.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph LR
input["Input Data"] --> agent["Agent: create_context_agent"]
agent --> output["Output Result"]
style agent fill:#8B0000,color:#fff
style input fill:#8B0000,color:#fff
style output fill:#8B0000,color:#fffSignature
def create_context_agent(llm: Optional[Union[str, Any]]) -> ContextAgentParameters
ParamField
OptionalLanguage model to use (e.g., “gpt-4o-mini”, “claude-3-haiku”) **kwargs: Additional arguments to pass to ContextAgent constructor
Returns
ResponseField
ContextAgentConfigured ContextAgent for comprehensive context generation following PRD principles
Uses
ContextAgent
Source
View on GitHubpraisonaiagents/agent/context_agent.py at line 2443